From ArchWiki

This article or section is out of date.

Reason: please use the first argument of the template to provide a brief explanation. (Discuss in Talk:Seafile)

Seafile is an open source cloud storage system, with advanced support for file syncing, privacy protection and teamwork.

Collections of files are called libraries, and each library can be synced separately. A library can be encrypted with a user chosen password. This password is not stored on the server, so even the server admin cannot view your file contents.

Seafile lets you create groups with file syncing, wiki, and discussion -- enabling easy collaboration around documents within a team.

This article covers the installation of the Seafile server. If you only require a client to access a Seafile server, install seafile-clientAUR or seafileAUR.


Install the seafile-serverAUR package. It is part of the split package seafileAUR which produces more than one package, but not all of them are necessarily needed in your case. Consider also installing the seahubAUR package, which provides the web frontend.


Change to the seafile user (automatically created by the seafile-server package). The following commands are to be executed as that user unless otherwise stated.

Create the directory layout for the new seafile server instance and change directory to it:

[seafile]$ mkdir -p ~/
[seafile]$ cd ~/

To create the configuration for the seafile server instance choose and follow the 'setup' section of one of the following options shown in the seafile manual:

Those initial setup steps can be done with the seafile-admin command as the seafile user. Be sure to execute them in the correct directory:

Note: seafile-admin only works if you also installed the seahubAUR package beforehand.
[seafile]$ cd $HOME/
[seafile]$ seafile-admin setup

If you wish to have non-english consistent language support you need to compile your language by executing the following command:

[seafile]$ cd $HOME/<yourlanguage>/LC_MESSAGES/
[seafile]$ msgfmt -o django.po

Next we need to add this default language to the settings now:

[seafile]$ echo "LANGUAGE='<yourlanguage>'" >> ~/

Edit seafile-server@.service and replace the two occurences of %i in it with the actual $HOME for the user set up in #Installation.

If you did not yet setup nginx and if you want to test out Seafile's own web-frontend-implementation seahub purely, you have to edit seafile-server@.service and delete the --fastcgi parameter from the start script, as fastcgi is not supported with seahub-only.

To manually start your new seafile server, start

If it starts up fine, you may also enable the service.

After starting the seafile server daemon, you can create an admin user for your seafile instance:

[seafile]$ cd $HOME/
[seafile]$ seafile-admin create-admin

Deploy an instance with Nginx

In order to deploy Seafile's webinterface "seahub" with Nginx, you can use an Nginx configuration similar to this:

server {
    listen 80;
    return 301 https://$server_name$request_uri;

server {
    listen 443;
    ssl on;
    ssl_certificate /etc/ssl/certs/;
    ssl_certificate_key /etc/ssl/private/server.key;

    location / {
        fastcgi_param   SCRIPT_FILENAME     $document_root$fastcgi_script_name;
        fastcgi_param   PATH_INFO           $fastcgi_script_name;

        fastcgi_param   SERVER_PROTOCOL     $server_protocol;
        fastcgi_param   QUERY_STRING        $query_string;
        fastcgi_param   REQUEST_METHOD      $request_method;
        fastcgi_param   CONTENT_TYPE        $content_type;
        fastcgi_param   CONTENT_LENGTH      $content_length;
        fastcgi_param   SERVER_ADDR         $server_addr;
        fastcgi_param   SERVER_PORT         $server_port;
        fastcgi_param   SERVER_NAME         $server_name;

        fastcgi_param   HTTPS on;
        fastcgi_param   HTTP_SCHEME https;

    location /seafhttp {
        rewrite ^/seafhttp(.*)$ $1 break;
        client_max_body_size 0;

    location /media {

You also have to add the following values to your ccnet.conf and if you are using HTTPS with nginx, as uploads fail otherwise [1], [2]. Remember to edit these files as user seafile




First, stop each of your seafile server instances (e.g., repeat for,, etc.).

Upgrade seafile-serverAUR from the Arch User Repository.

Repeat the following for each seafile server instance:

  • Change directory to the server instance's 'seafile-server' subdirectory:
    [seafile]$ cd /srv/seafile/
  • Run the preupgrade script (Or do the steps by hand, see the Seafile wiki):
    [seafile]$ seahub-preupgrade
  • Run the appropriate seafile/seahub upgrade script from the upgrade subdirectory:
    • For a minor upgrade (x.y.a to x.y.b with a < b):
      [seafile]$ ./upgrade/
    • For a major upgrade (x.y.a to z.w.b with x < z || y < w):
      [seafile]$ ./upgrade/
  • Repeat the steps for language mentioned in the installation guide

Lastly, start each of your seafile server instances again (e.g., repeat for,, etc.).

Running Seafile garbage collector

To release storage space held by unused blocks, you will want to run Seafile's garbage collector. Specifically, the garbage collector program will remove:

  • blocks belonging to nonexistent libraries
  • out-dated blocks based on that library's history length limits

First, make sure to shutdown the Seafile program on your server. For Professional Edition v.3.1.11 on, online garbage collection operation is supported.

Now, to see how much garbage will be collected before making changes:

[seafile]$ seafserv-gc -c /srv/seafile/ -d /srv/seafile/ --dry-run

If the output looks okay, proceed to run the same command without the --dry-run argument.

See also