VOOZH about

URL: https://dev.to/vultr/deploying-seafile-secure-file-sync-on-ubuntu-2404-3ggi

⇱ Deploying Seafile Secure File Sync on Ubuntu 24.04 - DEV Community


Seafile is an open-source file sync and share platform focused on speed, reliability, and end-to-end encrypted libraries, with desktop and mobile clients across every major platform. This guide deploys Seafile CE on Ubuntu 24.04 using the official Docker Compose manifests, the SeaDoc collaboration service, and Caddy for automatic HTTPS. By the end, you'll have Seafile syncing files securely at your domain.


Set Up the Directory Structure

1. Create and own the install directory:

$sudo mkdir -p /opt/seafile
$sudo chown -R $USER:$USER /opt/seafile
$cd /opt/seafile

2. Download the environment template:

$wget -O .env https://manual.seafile.com/latest/repo/docker/ce/env

3. Generate a 40-character JWT key:

$sudo apt install pwgen -y
$pwgen -s 40 1

4. Edit the environment file:

$nano .env

Set at minimum:

SEAFILE_SERVER_HOSTNAME=seafile.example.com
SEAFILE_SERVER_PROTOCOL=https
JWT_PRIVATE_KEY=YOUR_40_CHAR_KEY
SEAFILE_MYSQL_DB_PASSWORD=STRONG_DB_PASSWORD
INIT_SEAFILE_MYSQL_ROOT_PASSWORD=STRONG_ROOT_PASSWORD
INIT_SEAFILE_ADMIN_EMAIL=admin@example.com
INIT_SEAFILE_ADMIN_PASSWORD=STRONG_ADMIN_PASSWORD

Download the Compose Manifests

Seafile ships three official Compose files. Download them into the same directory:

$wget https://manual.seafile.com/latest/repo/docker/ce/seafile-server.yml
$wget https://manual.seafile.com/latest/repo/docker/seadoc.yml
$wget https://manual.seafile.com/latest/repo/docker/caddy.yml
  • seafile-server.yml — core Seafile, MariaDB, Memcached
  • seadoc.yml — collaborative document editor
  • caddy.yml — reverse proxy with automatic Let's Encrypt TLS

Deploy with Docker Compose

1. Add your user to the Docker group:

$sudo usermod -aG docker $USER
$newgrp docker

2. Start all three manifests together:

$docker compose up -d

3. Verify the services are running:

$docker compose ps

The first start initializes the MariaDB schema and Seafile data directories — give it a minute.


Access Seafile

Open https://seafile.example.com in a browser and sign in with INIT_SEAFILE_ADMIN_EMAIL / INIT_SEAFILE_ADMIN_PASSWORD from .env. Create a library to begin syncing.


Next Steps

Seafile is running and served securely over HTTPS. From here you can:

  • Install the desktop and mobile clients for two-way library sync
  • Create encrypted libraries for client-side end-to-end encryption
  • Enable SeaDoc collaborative editing on documents inside libraries

For the full guide with additional tips, visit the original article on Vultr Docs.