Seafile – File Syncing and Collaboration for Teams on Linux Centos 6.4 / RHEL

Posted: May 23, 2013 in FX Pipeline, Linux

seafile seafile-logo-en

Seafile – File synchronization and collaboration for teams
If you are in a small team with a few people, you can create a group in Seafile and invite other team members. Team members can then maintain file libraries together. You may collaborate around the files online. With file synchronization, it’s also easy to work on a set of files together.

  • Private

    Deploy on your own servers, under your control. It’s open source. You can add features as you wish.

  • Convenient

    You can download and upload files on the website. You can also sync files to your computers with Seafile client program.

  • Reliable

    Seafile keeps every version of your files. You may restore a file to an older version, or restore a mistakenly deleted file.

  • Secure

    You may encrypt a file library with a password. The password won’t be stored by the server. So even the server administrator cannot view your private data.

Seafile Professional Edition — A Comprehensive Collaboraton Platform


File Syncing and Sharing

Organize files into libraries. Each library can be shared between users and into groups. A library can also be selectively synced into any device.


Collaboration and Discussion

Edit and comment files online. Messaging, group discussion, activity notification and file versions make collaboration easy and reliable.



It’s simple and efficient to maintain a to-do list and assign tasks online, with a plain text file or with the tasks module.


Tags and Searching

Tag files, tasks and messages, organizing items in your way. Searching makes it even easier to find items.

Seafile Server Setup in CentOS 6.4

#Install Seafile in CentOS 6.4

yum install -y sqlite python-simplejson python-setuptools python-imaging python-argparse

#Download and install the latest version of Seafile
mkdir /opt/seafile
mkdir /opt/seafile/install
cd /opt/seafile/

tar -xzf seafile-server_1.6.1_x86-64.tar.gz

mv seafile-server* install/
cd install/seafile-server-1.6.1/

./ start


#you can enable debug on Seahub to see what is wrong.

Add “DEBUG = True” in, and restart your Seahub by :-
./ restart

[root@elitebook seafile-server-1.6.1]# ./

You are running this script as ROOT. Are you sure to continue?
[yes|no] yes

This script will guide you to config and setup your seafile server.

Make sure you have read seafile server manual at

Press [ENTER] to continue
Checking packages needed by seafile …

Checking python on this machine …
Find python: python2.6

Checking python module: setuptools … Done.
Checking python module: python-simplejson … Done.
Checking python module: python-imaging … Done.
Checking python module: python-sqlite3 … Done.

Checking for sqlite3 …Done.

Checking Done.

It seems you have created a ccnet configuration before.
Do you want to use the existing configuration?
[yes|no] yes

Existing ccnet configuration would be used.

Where do you want to put your seafile data?
Note: Please use a volume with enough free space.
[default: /opt/seafile/install/seafile-data ]

It seems you have existing seafile data in /opt/seafile/install/seafile-data.
Do you want to use the existing seafile data?
[yes|no] yes
This is your config information:

ccnet config: use existing config in /opt/seafile/install/ccnet
seafile data dir: use existing data in /opt/seafile/install/seafile-data

If you are OK with these configuration, press [ENTER] to continue.

Seahub is the web interface for seafile server.
Now let’s setup seahub configuration. Press [ENTER] to continue
Please specify the email address and password for seahub admininstrator.
You would use them to login as admin on your seahub website.

Please specify the email address for seahub admininstrator:
[seahub admin email]:

Please specify the passwd you want to use for seahub admininstrator:
[seahub admin password]:
Please ensure the passwd again:
[seahub admin password again]:
This is your seahub admin username/password

admin user name:
admin password: **************
If you are OK with these configuration, press [ENTER] to continue.

Now sync seahub database …

Loading ccnet config from /opt/seafile/install/ccnet
Loading seafile config from /opt/seafile/install/seafile-data
Creating tables …
Installing custom SQL …
Installing indexes …
No fixtures found.


Your seafile server configuration has been finished successfully.

run seafile server: ./ { start | stop | restart }
run seahub server: ./ { start <port> | stop | restart <port> }

If you are behind a firewall, remember to allow input/output of these tcp ports:

port of ccnet server:
port of seafile server:
port of seafile httpserver:
port of seahub: 8000

When problems occur, Refer to

for information.

[root@elitebook seafile-server-1.6.1]#

You can Login to Seafile Server by :-   (http://ip-address:8000)

http://elitebook:8000   (http://your-domain-name:8000)

Allow the Seafile admin port 8000 through iptables if you have any trouble to access admin console in remote systems

gedit /etc/sysconfig/iptables
# add these in that file
-A INPUT -p udp -m state –state NEW –dport 8000 -j ACCEPT
-A INPUT -p tcp -m state –state NEW –dport 8000 -j ACCEPT

# restart iptables and firewall rules
/etc/init.d/iptables restart


Seafile CLI client


  1. Download the client
    tar -xzf seafile-cli_1.6.1_x86-64.tar.gz
  2. Initialise & daemonize the client
    cd seafile-cli_1.6.1
    # choose a folder where to store the seafile client settings e.g ~/.seafile-client
    mkdir ~/.seafile-client            # create the settings folder
    ./seaf-cli init -d ~/.seafile-client  # initialise seafile client with this folder
    ./seaf-cli start
  3. Install seafile in your environment
    #link the full path of the exectuable
    ln -s `readlink -f seaf-cli` /usr/bin/
  4. Download a library from a server
    1. retrieve the library id by browsing on the server -> it’s in the url after /repo/
    2. then
      seaf-cli download -l "the id of the library" -s  "the url + port of server" -d "the folder where the library folder will be downloaded" -u "username on server" [-p "password"]
      seaf-cli status  # check status of ongoing downloads
      # Name  Status  Progress
      # Apps    downloading     9984/10367, 9216.1KB/s

    Note: if you not supply the password parameter in the command, it will be asked later, which is more safe.

    Example:seaf-cli download -l 0536c006-8a43-449e-8718-39f12111620d -s -d /tmp -u

  5. Download a library from a server and sync with an existing folder.
    # This is the same as download : replace download by sync 
    seaf-cli sync -l "the id of the library" -s  "the url + port of server" -d "the folder where the library folder will be downloaded" -u "username on server" -p "password"
  6. rejoice

Man documentation

seaf-cli is command line interface for seafile client.


init:           create config files for seafile client
start:          start and run seafile client as daemon
stop:           stop seafile client
list:           list local liraries
status:         show syncing status
download:       download a library from seafile server
sync:           synchronize an existing folder with a library in
                    seafile server
desync:         desynchronize a library with seafile server


Seafile client stores all its configure information in a config dir. The default location is ~/.ccnet. All the commands below accept an option -c <config-dir>.


Initialize seafile client. This command initializes the config dir. It also creates sub-directories seafile-data and seafile underparent-dirseafile-data is used to store internal data, while seafile is used as the default location put downloaded libraries.

seaf-cli init [-c <config-dir>] -d <parent-dir>


Start seafile client. This command start ccnet and seaf-daemonccnet is the network part of seafile client, seaf-daemon manages the files.

seaf-cli start [-c <config-dir>]


Stop seafile client.

seaf-cli stop [-c <config-dir>]


Download a library from seafile server

seaf-cli download -l <library-id> -s <seahub-server-url> -d <parent-directory> -u <username> [-p <password>]


Synchronize a library with an existing folder.

seaf-cli sync -l <library-id> -s <seahub-server-url> -d <existing-folder> -u <username> [-p <password>]


Desynchronize a library from seafile server

seaf-cli desync -d <existing-folder>
  1. So, with the command-line client, we are able to point at any folder on the server and sync it to another directory, where it will be in the compact and unreadable Seafile format. I wish to achieve precisely the reverse: upload all files from a local folder to a repository run by the main Seafile server, which can then be shared with non-local users.

    How is this accomplished? This would be “upload” and not “download”; neither, apparently, “sync”.

  2. Oops. Please ignore my comment. It’s hardly obvious, but “sync” works both ways (as expected), by duplicating everything, both at the central repository (usually seafile-data) AND on a “local” repository under ~/.seafile-client (assuming that was the name of the folder used for local sync).

    A bit wasteful, but it works.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s