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.
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.
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.
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
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:
and change it to:
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).
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
11. Now provide the admin email address and password, and click Log in.
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.
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.