How to Install Seafile to Sync and Share Files on Ubuntu

Seafile is an open-source, small and secure cloud storage solution for file synchronization and sharing, built using C (at the core) and Python. It features file encryption and group sharing, organization of files into libraries and a library can be encrypted and protected using a password.

It extends your local disk space with the massive storage capacity on the Seafile server with reliable and efficient file syncing. Every file is encrypted before syncing to the central server. Sefiles also support enterprise features such as AD/LDAP integration, group syncing, department hierarchy, knowledge management, fine-grained permission control and more.

Recommended Read: How to Install Seafile to Sync and Share Files on CentOS 8

This guide will walk you through the steps to deploy Seafile as a private cloud storage server with Nginx as the reverse proxy service and MariaDB database server on a Ubuntu server.

System Requirements:

A fresh Ubuntu server with 2 Cores, 2GB or more RAM, 1GB SWAP or more and 100GB+ storage space for Seafile data.

Installing Seafile Server on Ubuntu

1. The easiest and recommended way to set up Seafile on Ubuntu is by using the automatic installation script. First, connect to your Ubuntu server via SSH, then run the following wget command at the command prompt to download the auto-installer script and run it with root privileges.

$ wget --no-check-certificate https://raw.githubusercontent.com/haiwen/seafile-server-installer/master/seafile-7.1_ubuntu
$ sudo sudo bash seafile-7.1_ubuntu 7.1.0

2. Next, the installer will prompt you to select the edition of Seafile to install, enter 1 for Community Edition (CE) and click Enter.

Install Seafile Community Edition on Ubuntu

Install Seafile Community Edition on Ubuntu

3. When the installation is complete, the installer will produce a report of the process as shown in the following screenshot. The report is also stored under the Seafile installation directory.

Seafile Installation Summary

Seafile Installation Summary

4. By default, the Seafile package is installed in /opt/seafile, use the ls command to view the contents of the directory.

# cd /opt/seafile/
# ls -lA
Seafile Installation Directory Contents

Seafile Installation Directory Contents

The core components of seafile are:

  • Seafile server (seaf-server) – the main data service daemon which listens on port 8082 by default. It handles raw file upload, download and syncing.
  • Ccnet server (ccnet-server) – the RPC (remote procedure call) service daemon designed to enable internal communication among multiple components.
  • Seahub (django) – the web front-end that is served by a light-weight Python HTTP server using gunicorn. By default, Seahub runs as an application within gunicorn.

5. During installation, the installer set up various services such as Nginx, Mariadb and Seafile-server. You can use the following systemctl commands to check if the services are up and running. To manage them where necessary, replace status with stop, start, restart, and is-enabled to apply the corresponding action on a particular service.

$ sudo systemctl status nginx
$ sudo systemctl status mariadb
$ sudo systemctl status seafile-server

6. Also, by default, the installer configures seahub to be accessed using the domain name seafile.example.com. You can set your domain name in the /etc/nginx/sites-available/seafile.conf configuration file.

$ sudo nano /etc/nginx/sites-available/seafile.conf

Look for the line:

server_name seafile.tecmint.lan;

and change it to:

server_name seafile.yourdomainname.com;
Set Your Domain Name in Nginx for Seafile

Set Your Domain Name in Nginx for Seafile

7. Then restart the Nginx service to apply the recent changes.

$ sudo systemctl restart nginx

8. If you have enabled the UFW firewall service on your server, you need to open port 80 and 443 in the firewall to allow HTTP and HTTPS requests to the Nginx server.

$ sudo ufw allow 80/tcp
$ sudo ufw allow 443/tcp
$ sudo ufw reload

9. Now that the seafile server is up and running, you can now access and start working with Seahub. Open your web browser and navigate using the following URL (remember to use the domain name that you configured in the Nginx configuration file for Seafile).

http://seafile.tecmint.lan

10. Once the login page load, log in with the admin user’s email address and password. To get them, check the seafile installation log file.

$ sudo cat /opt/seafile/aio_seafile-server.log
Seafile Admin Login Credentials

Seafile Admin Login Credentials

11. Now provide the admin email address and password, and click Log in.

Seafile Login Interface

Seafile Login Interface

12. The following screenshot shows the Seafile server web administration interface. Now proceed to change the default admin password and customize settings; create, encrypt and share libraries; link your devices and add or import users, and more.

Seafile Main Dashboard

Seafile Main Dashboard

To enable HTTPS for Nginx on Seafile server, see this guide: How to Secure Nginx with Let’s Encrypt on Ubuntu

There you have it, you have just set up a Seafile server with Nginx and MariaDB on a Ubuntu server. For more information, see the Seafile documentation. Give us feedback using the comment form below.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Support Us

We are thankful for your never ending support.

Aaron Kili

Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide
The Complete Linux System Administrator Bundle
Become an Ethical Hacker Bonus Bundle

You may also like...

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.