How to Install Seafile for Self-Hosted File Sync

If you’re like me, you probably have a lot of files—photos, homework, work stuff, and random downloads—that end up scattered across different devices. I used to use cloud services like Google Drive and Dropbox. But I wanted something private, fast, and under my control. That’s how I discovered Seafile, a self-hosted file sync tool.

In this post, I’ll show you how I installed Seafile on my server. I’ll also explain what things mean in simple words, so you won’t feel lost. If you’ve never done this before, don’t worry. I’ll go step-by-step.

Oh, and don’t worry—there are no pop quizzes at the end.


What is Seafile?

Seafile (say it like “sea-file”) is an open-source software that lets you sync and share files between your devices—just like Dropbox or OneDrive. But here’s the cool part: instead of using someone else’s server, you run it yourself. That means you control your data.

Some terms you might not know:

  • Self-hosted: This means you run a service like Seafile on your own server or computer instead of using someone else’s.
  • Sync: Short for “synchronize.” It means keeping your files the same on all your devices.
  • Repository (or library): A folder you want to sync. Seafile calls it a “library.”

Why I Chose Seafile

I tried a few other tools like Nextcloud and Syncthing. They’re great too. But Seafile is super light, fast, and easy to set up. It also works well even with slow internet (which is sometimes all I have).

Another bonus: it didn’t gobble up all my server’s memory like a hungry hippo.

Here’s what I like about it:

  • It has a clean web interface (you can use it from a browser).
  • The desktop app works on Linux, macOS, and Windows.
  • It supports versioning (you can go back to old versions of files).
  • It’s free and open-source.

Plus, it just sounds like a pirate-themed file sync service. Arrr, matey, keep yer files in yer own digital treasure chest!


What You’ll Need

Before we start, you need a few things:

  • A computer or server with Linux (I use Ubuntu 22.04).
  • At least 1 GB RAM, but more is better.
  • Some basic terminal skills.
  • A domain name (optional but helpful).
  • An hour or so of quiet time and maybe a snack.

Step-by-Step: Installing Seafile on Ubuntu

Let’s get into the good stuff. I’ll walk you through how I installed Seafile.


Step 1: Update Your Server

Always start by updating your system.

sudo apt update && sudo apt upgrade -y

This keeps your packages fresh, like bread straight from the oven.


Step 2: Install Required Software

Seafile needs some tools to work. Let’s install them.

sudo apt install python3 python3-pip python3-setuptools \
python3-mysqldb mariadb-server nginx unzip -y

That looks like a lot, but don’t worry—most of it is just helpers that Seafile uses in the background.


Step 3: Set Up the Database

Seafile uses MariaDB, a database tool, to store info about users and files.

Log into MariaDB:

sudo mariadb

Then create a database and user:

CREATE DATABASE seafile_db CHARACTER SET = 'utf8mb4';
CREATE DATABASE seahub_db CHARACTER SET = 'utf8mb4';
CREATE USER 'seafileuser'@'localhost' IDENTIFIED BY 'yourpassword';
GRANT ALL PRIVILEGES ON seafile_db.* TO 'seafileuser'@'localhost';
GRANT ALL PRIVILEGES ON seahub_db.* TO 'seafileuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Write down the username and password. They’ll be useful soon.


Step 4: Download Seafile

Go to Seafile’s official download page and copy the link for the latest server version. You can also use this command:

wget https://s3.eu-central-1.amazonaws.com/download.seadrive.org/seafile-server-<version>.tar.gz

Replace <version> with the actual version number. Example: seafile-server-10.0.1.tar.gz.

Then extract it:

tar -xzf seafile-server-*.tar.gz
cd seafile-server-*/

Step 5: Run the Installer

Now run the setup script.

./setup-seafile-mysql.sh

This script will ask you questions—like your server name, domain, and database info. Just follow along. Use the details you set earlier.

Once it finishes, it sets up Seafile and Seahub (the web interface).


Step 6: Start Seafile and Seahub

Use these commands:

./seafile.sh start
./seahub.sh start

The first time you start Seahub, it’ll ask you to set an admin email and password.

Now you can access your Seafile web panel by going to:

http://your-server-ip:8000

Or if you set up a domain:

http://yourdomain.com:8000

Not secure yet, but we’ll fix that.


Bonus: Set Up HTTPS with Nginx

You don’t want to send your files over plain HTTP. Let’s make it secure with Nginx and Let’s Encrypt.

First, install Certbot:

sudo apt install certbot python3-certbot-nginx -y

Then run:

sudo certbot --nginx

Follow the steps and Certbot will configure HTTPS for you. It’s free and trusted by browsers.


Tips and Tricks

Here are a few things I learned the hard way:

  • If Seafile won’t start, check the seafile.log file. It gives clues.
  • Always back up your database. A crash without backup = sad day.
  • Don’t forget to open your firewall ports (8000, 443, 80).

Compare: Seafile vs Nextcloud vs Syncthing

Here’s how Seafile stacks up:

Seafile

  • Fast and lightweight
  • Focuses on syncing and sharing files
  • Easy to set up

Nextcloud

  • All-in-one (contacts, calendar, notes)
  • Heavier, uses more memory
  • More features but also more complex

Syncthing

  • Peer-to-peer only (no central server)
  • Good for private syncing between 2-3 devices
  • No web interface like Seafile

So if you just want fast and simple file sync, Seafile is a great middle ground.


What You Can Do with Seafile

Once you’ve installed it, here’s what you can do:

  • Sync folders between your laptop, desktop, and phone.
  • Share files with friends or coworkers.
  • Access files from anywhere in the world.
  • Use version history to roll back changes.

It’s like having your own private cloud, without the creepy data spying.


Final Thoughts

Installing Seafile wasn’t too hard once I took it step-by-step. I like knowing that my files stay with me. No one else is poking around in them. Plus, it runs fast—even on my old server that sounds like a jet engine.

If you’ve never hosted your own service before, this is a great project to start with. You’ll learn a lot, and you’ll actually use it every day.

Got stuck? Don’t worry. I’ve been there too. Just take a deep breath, read the logs, and maybe bribe your computer with some electricity and compliments. Computers like that. (Probably.)

What do you think? Would you give Seafile a try?

Leave a Reply