Guides 11792 Published by

The guide walks you through setting up Seafile on a CentOS 8 server so you can keep files in sync across multiple machines or share them with teammates. It covers everything from updating the system and installing required packages to downloading the server binary, creating a dedicated user, setting proper ownership, initializing the database, starting the service, and accessing the web admin interface. The article also includes optional steps for creating shared folders, installing client tools, tips on common pitfalls like missing libraries or permission headaches, and how to keep Seafile updated with new releases. By following these instructions you’ll have a robust, open‑source sync solution that stays tidy, secure, and ready to use across your devices.



Install Seafile on CentOS 8 – Get Your Files in Sync, Not in a Jam

If you’re running a CentOS 8 server and need a robust way to keep files up‑to‑date across several machines (or share them with teammates), Seafile is one of the few open‑source options that actually feels like a proper file sync system rather than an endless list of dependencies. This guide will walk you through the quick‑start install, show why each step matters, and point out a couple of gotchas you’ll want to avoid.

1 . Make Sure Your System Is Ready
sudo dnf update -y && sudo dnf install -y epel-release

Updating pulls the latest security patches – you don’t want your server running an old kernel and then falling over on a newer library. The EPEL repo gives us packages we can pull for Seafile later.

2 . Install Required Packages
sudo dnf install -y python3 python3-pip git curl unzip

Seafile’s Python back‑end needs python3. pip will let you grab the latest wheel, and git, curl, unzip are handy for fetching the server tarball or any optional modules. If you skip this, later steps will fail with “module not found” errors.

3 . Grab Seafile’s Server Binary
mkdir -p ~/seafile && cd $_
curl -L https://download.seafile.com/p/pub/seafile-server_10.5.6_x86-64.tar.gz | tar xz

The official download link is a single compressed file. Using curl with the -L flag follows redirects automatically – otherwise you’d get an incomplete file and a cryptic “corrupted archive” error.

4 . Create a Dedicated User
sudo useradd -r seafile --shell /sbin/nologin

Running Seafile as its own system user isolates it from the rest of your environment and keeps logs tidy. --shell /sbin/nologin prevents accidental logins, which is handy if you’re using the server purely for file sync.

. Set Ownership & Permissions
sudo chown -R seafile:seafile ~/seafile/seafile-server_10.5.6_x86-64/

If you let Seafile run under your own user, any file created in the data directory will be owned by that account, which can lead to permission headaches later when other services or users need read/write access.

6 . Initialize the Database
cd ~/seafile/seafile-server_10.5.6_x86-64/
sudo -u seafile ./setup-seafile.sh

The interactive script asks for a data directory, port, and whether to use MySQL or SQLite. For most home labs, SQLite is fine – it’s lightweight, no extra service required. If you’re on a production machine with many users, consider PostgreSQL; the script will prompt you for connection details.

7 . Start Seafile
sudo -u seafile ./seafile.sh start

That’s it! The server boots up and listens on your chosen port (default 80 or 443 if you enabled HTTPS). You’ll see a line like:

> Seafile Server listening on 0.0.0.0:8082

If the process dies immediately, check /var/log/seafile.log for missing dependencies – a common culprit is libpq.so when PostgreSQL isn’t properly installed.

8 . Access the Web Admin Interface

Open your browser to:

http://your-server-ip:8082

The first time you hit it, Seafile will ask you to create an admin account – pick a strong password and remember it; this is how you’ll add users later.

9 . Create a Shared Folder (Optional)
curl -X POST -F "name=Project Docs" \
     -F "description=Docs for the new project" \
     -u admin:adminpass \
     http://your-server-ip:8082/api/v1/folder

This curl example shows you how to create a shared folder from the command line. You’ll get back JSON with a folder_id that you can then share with other users via email or direct link.

10 . Install the Client on Your Workstation

Seafile offers clients for Windows, macOS, and Linux. On CentOS, just download the .deb or .rpm. For example:

wget https://download.seafile.com/p/pub/seaf-cli-2.5.0-Linux_x86_64.tar.gz
tar xzf seaf-cli-*.tar.gz
sudo cp seafile /usr/bin/

Once installed, run seafile and point it at your server’s URL. The first sync will take a while if you have big libraries, but after that it’ll stay in the background like a silent guardian.

11 . Common Pitfalls
  • “Service not found” when trying to start Seafile – Make sure the seaf-server binary is executable (chmod +x seafile).
  • Permission errors on the data directory – Double‑check ownership; it’s easy to forget and end up with “cannot write file: Permission denied.”
  • Unnecessary bloating – Seafile brings a full Python stack. If you only need simple file sharing, consider Samba or even rsync. But if you need real-time sync across multiple clients, the overhead is worth it.
12 . Keep It Updated
cd ~/seafile/seafile-server_10.5.6_x86-64/
sudo -u seafile ./update.sh

Seafile releases frequent security patches; run this script after pulling a new tarball from the site.

That’s the whole shebang. You now have Seafile up and running on CentOS 8, with a clean user setup, ready to sync files across your devices. If you hit snags—like an update that breaks libpq or a sudden crash after a bad driver install—it usually boils down to missing libraries or wrong permissions.