Installing and Setting Up Seafile Cloud

We have already introduced you to the Seafile cloud software. In this article we will show you how to install and set up Seafile on your server, for example a Raspberry Pi (as of 25.02.2023).

We will guide you through the installation step by step and tell you what commands you need to enter in the console of your server. The instructions are based on the official Seafile installation guide.

The prerequisite for a correct installation is that you already have your own server with your own hostname (e.g. You must also have an Nginx web server and MySQL installed. If you have followed our tutorial on setting up your own cloud, this is already the case.

Important: For wildcards in this tutorial (e.g. "[wildcard for user]"), also replace the square brackets (e.g. "user0815").

If you are using Ubuntu as your operating system, you can find instructions on how to install it in a few clicks here.

1. Install and download the necessary packages

First, install some packages that Seafile needs from the console:

sudo apt-get install -y python3 python3-setuptools python3-pip libmariadb-dev libmariadb-dev-compat && sudo apt-get install -y memcached libmemcached-dev

We install other required packages with:

sudo pip3 install --timeout=3600 django==3.2. future==0.18. mysqlclient==2.1. pymysql pillow==9.3. pylibmc captcha==0.4 markupsafe==2.0.1 jinja2 sqlalchemy==1.4.3 psd-tools django-pylibmc django_simple_captcha==0.5. pycryptodome==3.16. cffi==1.15.1 lxml

Now create the new user seafile:

sudo adduser seafile

Then create a new folder, distribute the rechete and enter it:

mkdir /opt/seafile && cd /opt/seafile && chown -R seafile: /opt/seafile

Now we continue as user seafile:

su seafile

Now look for the current server download. To do this, go to the Seafile page on your PC. If you are using the Raspberry Pi, you will need the download link given there (click on "Latest version" > file under "Assets" or similar > link something like "seafile-server_8.0.5_stable_pi.tar.gz"), otherwise the one for a 64bit Linux for example. Now you need to enter this download link and execute the following command on the Raspberry Pi:

sudo wget [INSERT DOWNLOAD LINK HERE] && sudo tar -xzvf *tar.gz

Now view all the files in this folder:


You should see something like "seafile-server-9.0.10" (or another version at the end) in the following list. You can now automatically navigate to this directory with the following command:

cd seafile-server-*

2. Setting up MySQL for Seafile

We will now let Seafile set up the MySQL database. This requires both the MySQL root password and the MySQL cloud user and password. You have already set up the credentials. Run the appropriate script:

sudo ./

You will be asked for the following information:

  • server name: Think of a name for your server, for example "my-cloud"

  • ip or domain of the server: Enter your server host here, e. g.

  • where to put seafile data: If you don't want to use an external storage medium for your data, press [Enter] again

  • port for the seafile fileserver: [Enter]

  • 1 or 2: If this question appears, type 1 and press [Enter] to confirm (rebuild databases)

  • host of mysql server: localhost

  • port of mysql server: 3306

  • password of the mysql root user: as specified earlier

  • mysql user of seafile: Your MySQL username, such as the one you created in our Raspberry Pi tutorial ...

  • passwort for mysql user: ... and the corresponding password.

  • (3x) database name: press [Enter] each time.

When the configuration is displayed again, confirm with [Enter].

This completes the setup of the MySQL databases for Seafile.

3. Enable SSL support

Now open a configuration file:

sudo vi ../conf/

Use the arrow keys to navigate to the appropriate line and change "http" to "https":


Save this file with [Esc] and ":wq" and [Enter].

4. Creating a seafile administrator

First, we need to make sure that the seafile user owns all the files we have placed in his home directory:

sudo chown -R seafile: /opt/seafile/

Start Seafile and Seahub (web interface) as seafile user with the following commands:

sudo -u seafile ./ start && sudo -u seafile ./ start

You will now be asked for an email address and password. Set these as you wish, but be sure to choose a secure password and remember it. You can use this administrator account to manage Seafile later.

We will now stop both services to finish configuring Nginx:

sudo -u seafile ./ stop && sudo -u seafile ./ stop

5. Nginx configuration

We have also created a configuration file for you to configure Nginx for Seafile. Replace ||HOST|| with your host in the file provided here

and use its contents as server settings (the following command opens the contents of the file):

sudo nano /etc/nginx/sites-enabled/default

Important: If you did not follow our Raspberry Pi instructions, make sure the files /var/www/ssl/cloudssl.crt and /var/www/ssl/cloudssl.key and /var/www/ssl/dhparam.pem exist and are certificate files for your SSL certificate.

We will now restart the Nginx web server:

sudo service nginx restart

6. Set up the seafile user and service

Now we want to make sure that the Seafile services are started when the system boots. The following method is only supported by newer operating systems (at least Debian 8 or Ubuntu 15.04).

Download 2 pre-configured files from our server. We will start with the first file with the following command:

sudo wget -q -O /etc/systemd/system/seafile.service -

This is followed by the second file, which is backed up with the following command:

sudo wget -q -O /etc/systemd/system/seahub.service -

Finally, we need to make sure that the files we have created are run at boot time:

sudo systemctl enable seafile.service && sudo systemctl enable seahub.service

Now we can start Seafile:

sudo -u seafile ./ start && sudo -u seafile ./ start

You should now be able to login to Seafile via the web interface by entering your host. If you are using a self-signed SSL certificate - as in the Raspberry Pi tutorial - bypass the browser warning by adding a security exception rule. Alternatively, you can set up a free Let'sEncrypt certificate, e. g. by following these instructions.

If you are having problems with Seafile, a reboot may help:

sudo shutdown -r now

7. Sharing another port

To use Seafile correctly on a home server, you need to open another port through your router. Follow this section of the general tutorial and also open up port 8082.

8. Update Seafile (later required)

If you want to update Seafile to the latest version, you can follow the steps below, if the update is not possible via the interface.

In short:

  • Change to the correct directory with cd /opt/seafile
  • Download and unpack the next higher version of Seafile, e.g. if you are using Seafile 6.0, first download version 6.1, then do the same for 6.2 to upgrade to 6.2 (see Download section).
  • Exit Seafile & Seahub (as described above).
  • Find the appropriate upgrade file as described here and run it.
  • You can then restart Seafile as described above.

9. Troubleshooting

If you encounter any errors, you can currently view any error messages from the /opt/seafile/ folder using the following command:

sudo -u seafile ./ start-fastcgi

An error that has been occurring more frequently lately has to do with an incorrect version name. You can find out how to change the configuration file here.

Cloud Server

Cloud server

Learn more about the highly available public SIM-Cloud

Learn more

10. Done!

Congratulations! The installation of Seafile is now complete. You can now login to the web interface by going to https://[YOURHOST.DYNDNS.COM] aufrufen.

Seafile web interface

Screenshot: Seafile web interface. This is how your Seafile will look like when accessed via the browser.

If you encounter any problems while using this tutorial, please have a look at our FAQ or contact us.

Otherwise, we hope you enjoy your Seafile-based cloud. You can now also install the mobile apps for iOS or Android to access your Seafile cloud from your smartphone.

Was this article helpful?

Did you like the article?

Cookie consent

By clicking «I agree», you consent to our website's use of cookies to give you the most relevant experience by remembering your preferences and repeat visits. However, you may visit «Manage сookies» to provide controlled consent. Learn more

Cookies settings


Necessary cookies are crucial for the basic functions of the website and the website will not work in its intended way without them.


Analytical cookies are used to understand how visitors interact with the website.


Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns.