Railway

Deploy Seafile

Dropbox Alternative. File sync, sharing, versioning & collaborative editing

Deploy Seafile

Just deployed

Just deployed

/shared

/shared

Just deployed

/data

Just deployed

/var/lib/mysql

Seafile logo

Deploy and Host Seafile on Railway

Seafile is an open-source file sync and share platform — a self-hosted Dropbox alternative developed in the open at github.com/haiwen. It organises storage into libraries: independent, versioned repositories that can be shared by link, synced selectively, or encrypted client-side with a password the server never stores. Files are split into blocks and deduplicated, so editing one slide in a 400 MB deck transfers only the changed chunks.

Deploy Seafile Community Edition 13.0.25 on Railway with six services already wired together: seafile (Seahub, seaf-server and the Go fileserver), seadoc for collaborative documents, notification-server for realtime updates, mariadb, a managed Redis for cache and sessions, and seafile-proxy, a Caddy router holding the only public domain. Seahub's session cookie is SameSite=Lax, so every browser-facing component must answer on one origin, and the proxy path-splits that hostname across the three backends.

Seafile Railway architecture

Getting Started with Seafile on Railway

The public URL belongs to seafile-proxy, not to seafile — it looks like https://your-app.up.railway.app. Open it and Seahub's sign-in page loads. First boot creates one administrator from INIT_SEAFILE_ADMIN_EMAIL and INIT_SEAFILE_ADMIN_PASSWORD on the seafile service; both are read only while the user table is empty, so changing them later does nothing. Public registration is off by default, so invite colleagues from System Admin → Users → Add user.

Click New Library, name it, and drag a file in — the upload goes through the Go fileserver at /seafhttp, and downloading it again proves the volume is mounted and writable. Then choose New → SeaDoc and type into the document: the editor loads through /sdoc-server, so content that survives a reload confirms the proxy routing and the shared JWT_PRIVATE_KEY are correct. Finally open /sys/info/, which reports the edition, version and your file counts.

Seafile library listing an image, a markdown file and a SeaDoc document Seafile SeaDoc editor with a formatted team handbook open Seafile system admin page showing Community Edition version and storage

About Hosting Seafile

Teams self-host Seafile when data residency matters, when per-seat pricing stops making sense, or when files are too large for a browser upload widget.

  • Libraries instead of folders — each separately shared, versioned and snapshotted, with its own trash
  • Block-level sync and deduplication — only changed chunks travel
  • Client-side encrypted libraries — the password never reaches the server
  • SeaDoc collaborative editing — realtime co-editing with comments for notes and wikis
  • Clients everywhere — Windows, macOS, Linux, iOS, Android, SeaDrive and WebDAV

seafile holds all durable state on a /shared volume: file blocks, configuration and logs. mariadb holds seafile_ccnet for users and groups, seafile_core for library metadata and seafile_hub for Seahub's Django tables. Redis backs the cache and sessions, while seadoc and notification-server are stateless helpers reading MariaDB directly with a shared JWT key.

Why Deploy Seafile on Railway

  • Six services provisioned and networked together in one deploy
  • Persistent volumes for file blocks and the MariaDB data directory
  • HTTPS and certificates handled at the edge, with no Let's Encrypt setup
  • Private networking between Seahub, SeaDoc, the notification server and the database
  • Managed Redis with no separate account to create
  • Usage-based pricing, so an idle team library costs very little

Common Use Cases

  • Team file server replacement — libraries with per-group permissions, expiring share links and version history
  • Large-file research and media work — block-level sync keeps multi-gigabyte datasets and video projects in sync
  • Internal knowledge base — SeaDoc documents and Seafile's wiki views cover runbooks and handbooks
  • Compliance-sensitive storage — encrypted libraries and self-hosted residency where public cloud is not allowed

Dependencies for Seafile

  • seafileltd/seafile-mc:13.0-latest — Seafile Community Edition 13.0.25: Seahub, seaf-server, the Go fileserver and nginx
  • seafileltd/sdoc-server:2.0-latest — SeaDoc 2.0.9, the collaborative document backend
  • seafileltd/notification-server:13.0-latest — notification server 13.0.21, websocket push
  • mariadb:10.11 — the relational database behind all three Seafile schemas
  • Railway-managed Redis — Seahub cache and session store
  • gridalpha/seafile-railway — the Caddy edge router, built from caddy:2-alpine

Tags track a release line rather than plain latest, keeping the server and notification server version-matched while patches still land.

Environment Variables Reference

VariablePurpose
SEAFILE_SERVER_HOSTNAMEPublic hostname, taken from the proxy's domain
CSRF_TRUSTED_ORIGINSJSON list of trusted origins for POST requests
INIT_SEAFILE_ADMIN_EMAIL / _PASSWORDFirst administrator, created on an empty database only
JWT_PRIVATE_KEYShared signing key, identical on all three Seafile services
CACHE_PROVIDERredis — Seahub's cache backend
ENABLE_SEADOC / SEADOC_SERVER_URLTurns on the editor and where browsers reach it
ENABLE_GO_FILESERVERUses the faster Go upload and download path

Deployment Dependencies

Hardware Requirements for Self-Hosting Seafile

ResourceMinimumRecommended
CPU2 cores (> 2 GHz)4 cores
RAM2 GB across all services4–8 GB
Storage5 GB plus your filesSized to library growth and version history
RuntimeDockerDocker, MariaDB 10.11, Redis

MariaDB deserves the headroom: its InnoDB buffer pool keeps library listings fast. Version history and trash retain deleted blocks, so provision more disk than your current files need.

Self-Hosting Seafile with Docker

A minimal docker-compose.yml for self-hosting Community Edition 13:

services:
  mariadb:
    image: mariadb:10.11
    environment:
      MARIADB_ROOT_PASSWORD: your-root-password
    volumes: ["/opt/seafile-mysql:/var/lib/mysql"]
  redis:
    image: redis:8.2
  seafile:
    image: seafileltd/seafile-mc:13.0-latest
    ports: ["80:80"]
    volumes: ["/opt/seafile-data:/shared"]
    environment:
      SEAFILE_SERVER_HOSTNAME: files.example.com
      SEAFILE_MYSQL_DB_HOST: mariadb
      SEAFILE_MYSQL_DB_PASSWORD: your-db-password
      INIT_SEAFILE_MYSQL_ROOT_PASSWORD: your-root-password
      JWT_PRIVATE_KEY: at-least-32-random-characters
      CACHE_PROVIDER: redis
      REDIS_HOST: redis
      INIT_SEAFILE_ADMIN_EMAIL: me@example.com
      INIT_SEAFILE_ADMIN_PASSWORD: change-this

Bring it up and reset the administrator later if needed. These are shell commands:

docker compose up -d
docker exec -it seafile /opt/seafile/seafile-server-latest/reset-admin.sh

The installer is not re-entrant, so let one deployment finish initialising before redeploying or editing variables.

How Much Does Seafile Cost to Self-Host?

Seafile Community Edition is free and open source, with no user cap and no licence key. The paid Professional Edition adds full-text search, file locking and S3-style storage, sold per user per year. Self-hosting the Community Edition on Railway costs only what the six services consume — compute, the two volumes and egress — typically a few dollars a month for a small team.

FAQ

What is Seafile? Seafile is an open-source file sync and share server. It stores files as deduplicated blocks inside versioned libraries and syncs them to desktop, mobile, virtual-drive and WebDAV clients — a self-hosted Dropbox alternative.

What does this Railway template deploy? Six services: Seafile Community Edition 13.0.25, SeaDoc 2.0.9, notification-server 13.0.21, MariaDB 10.11, a managed Redis, and a Caddy proxy that owns the public domain and routes by path.

Why does the template include MariaDB and Redis? Seafile keeps users, groups, library metadata and Seahub's Django tables in three MariaDB databases, which SeaDoc and the notification server also read directly. Redis is Seahub's cache and session store, the default cache provider since version 13.

Why does SeaDoc show "Load doc content error"? Its API is not reachable at /sdoc-server. Check ENABLE_SEADOC is true, SEADOC_SERVER_URL uses the proxy's public domain, and JWT_PRIVATE_KEY is byte-identical on the seafile and seadoc services.

Is the version 13 metadata server included? No. It reads seafile.conf from the same /shared volume the main service mounts, and Railway volumes attach to exactly one service, so ENABLE_METADATA_MANAGEMENT stays false. SeaDoc, realtime notifications, tags and views are all available.


Template Content

More templates in this category

View Template
Garage S3 Storage
Ultra-light S3 server: fast, open-source, plug-and-play.

PROJETOS
8
View Template
Redis
Self Host Latest Redis with Railway

2
View Template
NEW
EasyImg
Simple self-hostable Nuxt.js personal image hosting system.

Muhammad Bilal
0