← All templates · Files and documents
Deploy Seafile in one click
File sync and share: libraries synced to your computers and phones, with history and links
A self-hosted alternative to Dropbox and Google Drive.
What is Seafile?
Seafile is open-source software for syncing and sharing files, run in place of Dropbox or Google Drive. Files live in libraries: each one syncs to the desktop app on Windows, macOS and Linux, and the apps for iOS and Android browse and upload. Seafile keeps the history of every file, so an earlier version or a deleted file comes back, and a library can be encrypted with a password of its own, so the server stores only what it cannot read.
Libraries are shared with users and groups, read-only or to edit, and a share link gives a file or a folder to anyone, with a password and an expiry if you like; an upload link lets others drop files in. Seafile is known for syncing large numbers of files quickly: it transfers only the blocks of a file that changed.
This template runs the Community Edition from Seafile's official image, version 14.0, with MariaDB and a Redis cache. The databases and the admin, from the email and password you give, are made at the first start; sign-up stays off. SeaDoc, Seafile's online document editor, and its notification and metadata servers are not included.
Hosting Seafile on Pethost
- You sign in to Pethost with a passkey, GitHub or Google. No machine yet? You pick a plan, and the link waits until it is ready.
- New project opens at Seafile. You fill in what it asks for and click Create project: Email, Admin password.
- In a minute or two Seafile is live at its own address with HTTPS. Its secrets are made at random, and its data is in the nightly backup.
- It is a project like any other: you or your agent can change it, roll it back or restore it.
Questions about Seafile
Is Seafile free and open source?
Yes. Seafile's Community Edition is open source: the server under the AGPL-3.0 and its web interface, Seahub, under the Apache License 2.0. Seafile Ltd. also sells a Professional Edition with features for larger organisations.
Seafile vs Nextcloud: which should I pick?
Seafile does one thing, file sync and share, and is known for syncing fast with little memory. Nextcloud is a larger suite, with calendar, contacts, office and many apps around its files, and needs more resources.
Does Seafile encrypt my files?
It can. An encrypted library is encrypted on your computer with a password you choose, and the server keeps only the encrypted blocks. Without the password, even the server's admin cannot read the files.
Which apps work with Seafile?
Seafile's own desktop sync client for Windows, macOS and Linux, SeaDrive, which shows libraries as a network drive without downloading them first, and the Seafile apps for iOS and Android. Each signs in with the server's address and your account.
Can I get back a deleted or older file in Seafile?
Yes. Each library keeps the history of its files: History on a file shows its earlier versions, and the library's trash keeps deleted files and folders for restore. How long history is kept is set per library.
How much memory and disk does Seafile need?
Seafile takes about 750 MB of memory with MariaDB and its cache; your files take what they take, plus their history. On Pethost the Starter plan is enough for it, with room for other apps beside it.
Seafile Docker Compose file
The template is this compose.yaml and the variables written into the project’s .env as it is created. Pethost runs the file as it is written.
Containers: seafile (seafileltd/seafile-mc:14.0-latest), db (mariadb:10.11), redis (redis:8-alpine).
Volumes, in the nightly backup: data, db.
services:
seafile:
image: seafileltd/seafile-mc:14.0-latest
restart: unless-stopped
environment:
SEAFILE_SERVER_HOSTNAME: ${HOST}
# HTTPS ends at the machine's proxy: Seafile writes https:// into its links.
SEAFILE_SERVER_PROTOCOL: https
SITE_ROOT: /
CSRF_TRUSTED_ORIGINS: ${URL}
JWT_PRIVATE_KEY: ${JWT_PRIVATE_KEY}
TIME_ZONE: Etc/UTC
SEAFILE_MYSQL_DB_HOST: db
SEAFILE_MYSQL_DB_PORT: "3306"
SEAFILE_MYSQL_DB_USER: seafile
SEAFILE_MYSQL_DB_PASSWORD: ${DB_PASSWORD}
SEAFILE_MYSQL_DB_CCNET_DB_NAME: ccnet_db
SEAFILE_MYSQL_DB_SEAFILE_DB_NAME: seafile_db
SEAFILE_MYSQL_DB_SEAHUB_DB_NAME: seahub_db
# The first start makes the databases with MariaDB's root, and the admin from the fields;
# later starts read neither. Seafile has no sign-up unless an admin turns it on.
INIT_SEAFILE_MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
INIT_SEAFILE_ADMIN_EMAIL: ${ADMIN_EMAIL}
INIT_SEAFILE_ADMIN_PASSWORD: ${ADMIN_PASSWORD}
CACHE_PROVIDER: redis
REDIS_HOST: redis
REDIS_PORT: "6379"
REDIS_PASSWORD: ""
ENABLE_GO_FILESERVER: "true"
# SeaDoc, the notification server and the metadata server run as containers of their own,
# which this template leaves out.
ENABLE_SEADOC: "false"
ENABLE_NOTIFICATION_SERVER: "false"
ENABLE_METADATA_MANAGEMENT: "false"
ENABLE_SEAFDAV: "false"
NON_ROOT: "false"
SEAFILE_LOG_TO_STDOUT: "true"
volumes:
- data:/shared
healthcheck:
test: ["CMD-SHELL", "curl -fsS -o /dev/null http://localhost:80/api2/ping/"]
interval: 15s
timeout: 10s
retries: 20
start_period: 120s
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
db:
image: mariadb:10.11
restart: unless-stopped
environment:
MARIADB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
MARIADB_AUTO_UPGRADE: "1"
volumes:
- db:/var/lib/mysql
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 10s
timeout: 5s
retries: 20
start_period: 30s
# Seafile's cache: nothing in it is kept.
redis:
image: redis:8-alpine
restart: unless-stopped
command: ["redis-server", "--save", "", "--appendonly", "no", "--maxmemory", "64mb", "--maxmemory-policy", "allkeys-lru"]
volumes:
data:
db:
More in Files and documents
- NextcloudFile sync, calendar and contacts on a server of your own
- Paperless-ngxA document archive with OCR and full-text search
- BentoPDFPDF tools in the browser: merge, split, compress, sign, convert and edit, with the files never leaving it
- copypartyA file server in the browser: resumable uploads, a media player and share links, with WebDAV
- GopeedA fast download manager in the browser: HTTP, BitTorrent and magnet links, with extensions
- OpenListOne file list over many storages: cloud drives, S3, WebDAV and more, browsed, previewed and shared in the browser