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.

Hey TecMint readers,

Exciting news! Every month, our top blog commenters will have the chance to win fantastic rewards, like free Linux eBooks such as RHCE, RHCSA, LFCS, Learn Linux, and Awk, each worth $20!

Learn more about the contest and stand a chance to win by sharing your thoughts below!

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.

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Join the TecMint Weekly Newsletter (More Than 156,129 Linux Enthusiasts Have Subscribed)
Was this article helpful? Please add a comment or buy me a coffee to show your appreciation.

1 Comment

Leave a Reply
  1. Hi, I’ve run the script and although the server appears to install fully, there isn’t a username and password generated. on the completion screen or an aio_seafile-server.log.

    Any ideas?
    Thanks in advance

    Reply

Got Something to Say? Join the Discussion...

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.