Self-host Seafile with Levelrail

Self-hosted file sync and share with real file-level versioning and client-side encryption options.

  • Authorhaiwen
  • LicenceAGPL-3.0-only
  • Memory1 GiB
  • Archarm64
  • Services3

How to self-host Seafile

  1. Pull the images

    3 images are pulled on your server.

    Show images
    • mariadb:11
    • memcached:latest
    • seafileltd/seafile-mc:13.0.28
  2. Create the app

    3 services start in a single Compose app, with 2 named volume mounts for your data, on port 80.

  3. Fill in the secrets

    8 secrets are generated and stored encrypted, 13 settings are preset, you do not have to fill in anything.

  4. Open it

    Without a domain the app gets an sslip.io address; add --domain SERVICE=HOST to use your own.

Seafile requirements

Memory
About 1 GiB
Architectures
amd64 image published, arm64 image published
Ports
80
Domain
Optional, an sslip.io address is used without one
Settings
none to fill in
License
AGPL-3.0-only, network copyleft (agpl) license
  • Listed. It is in the catalog but not verified. Back up the data volume before changing an image tag.
  • Host ports. It publishes port 80 on the host, so open them in the VPS firewall only if you want that.
  • Review. Image is not pinned to a version tag, so a redeploy can pull different code (memcached:latest).

Install Levelrail first

On a server with Levelrail running, run the command above, or open the dashboard: Apps, New app, Browse templates, then Seafile. New to Levelrail? Install it on a fresh VPS first.

docker pull ghcr.io/glincker/levelrail:latest

Then levelrail-cli login --device. See Getting started and the Seafile docs page.

Deploy Seafile your way

Every format below deploys the same pinned images. Pick the one that fits how you work.

Deploy Seafile from the CLI

levelrail-cli templates deploy seafile --name my-seafile

Deploy Seafile with the API

Create a token in the dashboard first. This one-click route deploys it as a trial app you can keep or remove.

curl -X POST -H "Authorization: Bearer $TOKEN" \
  https://levelrail.example.com/api/v1/service-templates/seafile/deploy

Seafile configuration

Seafile services

ServiceImagePortsVolumes
mariadb mariadb:11 none seafile_mariadb_data -> /var/lib/mysql
memcached memcached:latest none none
seafile seafileltd/seafile-mc:13.0.28 80 seafile_data -> /shared

Seafile environment variables

VariableServiceValue
MYSQL_DATABASE mariadb Preset by the template
MYSQL_PASSWORD mariadb Generated at deploy
MYSQL_ROOT_PASSWORD mariadb Generated at deploy
MYSQL_USER mariadb Generated at deploy
CACHE_PROVIDER seafile Preset by the template
INIT_SEAFILE_ADMIN_EMAIL seafile Preset by the template
INIT_SEAFILE_ADMIN_PASSWORD seafile Generated at deploy
INIT_SEAFILE_MYSQL_ROOT_PASSWORD seafile Generated at deploy
Show all 21 variables
  • JWT_PRIVATE_KEYseafileGenerated at deploy
  • MEMCACHED_HOSTseafilePreset by the template
  • MEMCACHED_PORTseafilePreset by the template
  • SEAFILE_MYSQL_DB_CCNET_DB_NAMEseafilePreset by the template
  • SEAFILE_MYSQL_DB_HOSTseafilePreset by the template
  • SEAFILE_MYSQL_DB_PASSWORDseafileGenerated at deploy
  • SEAFILE_MYSQL_DB_PORTseafilePreset by the template
  • SEAFILE_MYSQL_DB_SEAFILE_DB_NAMEseafilePreset by the template
  • SEAFILE_MYSQL_DB_SEAHUB_DB_NAMEseafilePreset by the template
  • SEAFILE_MYSQL_DB_USERseafileGenerated at deploy
  • SEAFILE_SERVER_HOSTNAMEseafilePreset by the template
  • SEAFILE_SERVER_PROTOCOLseafilePreset by the template
  • TIME_ZONEseafilePreset by the template

Ports and volumes

Ports
80
Volumes
2 named mounts: seafile_mariadb_data -> /var/lib/mysql, seafile_data -> /shared

Seafile FAQ

How much memory does Seafile need?

The catalog lists about 1 GiB of memory for Seafile across its 3 services.

Does Seafile run on arm64?

For Seafile, an arm64 image is published; amd64 is image published.

What licence is Seafile under?

Seafile is licensed under AGPL-3.0-only, which is network copyleft, so source sharing also applies when it is offered as a hosted service.

Does Seafile need configuration before it starts?

No. The template fills in its own defaults and generates secrets at deploy time.

Which database does Seafile bundle?

The template includes MySQL, running as its own service.

Which ports does Seafile use?

Seafile listens on port 80 inside the stack.

Where does Seafile keep its data?

In named volumes: seafile_mariadb_data mounted at /var/lib/mysql and seafile_data mounted at /shared.

Can I deploy Seafile on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list has an entry with the id seafile for this app, so check that entry as well. Dokku deploys container images with its own commands, so the pinned image mariadb:11, memcached:latest, seafileltd/seafile-mc:13.0.28 is what you deploy there.

levelrail-cli templates deploy seafile --name my-seafile