How to install Seafile on Fedora Server

In this tutorial, we will learn how to install Seafile on the latest Fedora Server.

Seafile is an open-source, self-hosted cloud storage and file syncing solution that offers client applications for Windows, Mac, Linux, iOS, and Android. The server component of Seafile can be installed on Linux, Windows, and Mac OS X.

Step 1: Update System

Before we proceed with the installation of Seafile, it is recommended that we update the system packages to their latest version.

sudo dnf update -y

Step 2: Install Dependencies

Next, we need to install the dependencies required for Seafile on Fedora Server.

sudo dnf install epel-release -y
sudo dnf install python3 python3-pip python3-setuptools python3-devel python3-apache-mod_wsgi libev-devel libsemanage-python -y
sudo dnf install mysql-devel libffi-devel openldap-devel zlib-devel openssl-devel -y

Step 3: Install MariaDB

Seafile uses a MariaDB database to store its data. If you have not installed MariaDB on your system, proceed with this step. Otherwise, skip this step and move to the next.

sudo dnf install mariadb mariadb-server -y
sudo systemctl start mariadb
sudo systemctl enable mariadb
sudo mysql_secure_installation

Step 4: Create a Database

We need to create a database and user for Seafile to access the database. Open MySQL shell and execute the following commands:

sudo mysql -u root -p
CREATE DATABASE seafile_db;
GRANT ALL PRIVILEGES ON seafile_db.* TO 'seafile_user'@'localhost' IDENTIFIED BY 'seafile_password';
FLUSH PRIVILEGES;
exit

Step 5: Install Seafile

Next, we need to download the Seafile server package from its official website and extract it to the desired directory.

wget https://download.seafile.com/d/342782d0a3/files/?p=/pro/seafile-pro-server_8.0.1_x86-64.tar.gz&dl=1 -O seafile-server.tar.gz
sudo mkdir /opt/seafile
sudo tar xzf seafile-server.tar.gz -C /opt/seafile/

Step 6: Configure Seafile

Next, we need to configure Seafile by editing the configuration files.

cd /opt/seafile/seafile-server-*
sudo ./setup-seafile.sh

We need to input the following when prompted:

Please choose the server name: localhost
Please specify a domain name for the web server: servername.example.com
Please choose a port for Seahub (default:8000):
Do you want to use Apache as your web server? [Y/n]: n
Please input the folder name for your Seafile data directory. Use a volume with enough free space.: /opt/seafile-data
Please enter the initial admin email address: your_email@example.com
Please enter the initial admin password: your_secure_password

Step 7: Start Seafile

Finally, we need to start the Seafile service.

sudo /opt/seafile/seafile-server-latest/seahub.sh start-fastcgi
sudo /opt/seafile/seafile-server-latest/seafdav.sh start

Conclusion

Congratulations! You have successfully installed Seafile on Fedora Server. You can now access the Seafile web interface by browsing to http://localhost:8000 or http://servername.example.com:8000 in your web browser.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!