---
title: "Deploy SFTPGo"
description: "Ship files anywhere: your own SFTP, WebDAV, and web file server."
category: "Storage"
url: https://railway.com/deploy/sftp-go
---

# Deploy SFTPGo

Ship files anywhere: your own SFTP, WebDAV, and web file server.

**[Deploy SFTPGo on Railway](https://railway.com/template/sftp-go)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/sftp-go/manifest.json

- **Creator:** Rakit
- **Category:** Storage

## Template content

### sftpgo https://raw.githubusercontent.com/drakkan/sftpgo/main/img/logo.png

- **Image:** drakkan/sftpgo:v2.7.6
- **Public domain:** Yes

## Documentation

# Deploy and Host SFTPGo on Railway

SFTPGo is a full-featured, actively maintained file transfer server: SFTP, HTTP/S, FTP/S, and WebDAV behind one WebAdmin, with a web client users can drag files into. It manages users, roles, quotas, and 2FA out of the box and stores everything in SQLite — no external database required.

## About Hosting SFTPGo

Hosting SFTPGo takes one service and one volume. The WebAdmin, WebClient, and REST API all listen on port `8080`, with health at `/healthz`. On first visit the WebAdmin opens a setup wizard that creates the initial administrator; after that, every admin, user, and role lives in the SQLite database on the volume. The volume holds the database, SSH host keys, and user files, so a redeploy loses nothing. The web binding also rejects any Host header other than the public domain and the health-check host. SFTP on port `2022` is reachable from inside the project and can be exposed externally through an optional TCP proxy.

## Common Use Cases

- Exchange files with business partners over SFTP without running a VM.
- Give teams a drag-and-drop web client with per-user folders, quotas, and permissions.
- Replace an aging FTP server with SFTP/FTPS plus web access from any browser.
- Expose storage as WebDAV for apps and desktop clients.
- Bridge local, S3-compatible, Azure, or Google Cloud storage through one protocol gateway.
- Send webhooks and event rules on uploads, downloads, and user actions.

## Dependencies for SFTPGo Hosting

- Official Docker image `drakkan/sftpgo:v2.7.6` (pinned; about 55 MB, multi-architecture).
- One persistent volume attached at `/var/lib/sftpgo`.
- No PostgreSQL, Redis, or any other service: SFTPGo uses SQLite on the volume.

### Implementation Details

First run: open `https://YOUR-DOMAIN/web/admin` and the **setup wizard** creates the initial administrator. That account can then create users, roles, virtual folders, and event rules from the WebAdmin.

| Path | Purpose |
| --- | --- |
| `/web/admin` (port `8080`) | WebAdmin — setup wizard, then login |
| `/web/client` (port `8080`) | WebClient — browser file access for users |
| `/healthz` | Health check, used by Railway |
| `:2022` | SFTP — private network, optional public TCP proxy |
| `/var/lib/sftpgo` | SQLite database, SSH host keys, and user files — attach the volume here |

The template sets user home directories to `/var/lib/sftpgo/data` so the database and the files share one volume, and enables Host-header validation on the web binding: only the service's public domain and Railway's health-check host are accepted.

## Comparison with Alternatives

✅ = built-in, ❌ = not available or requires extra work.

| Capability | This template (SFTPGo) | File Browser | Dufs |
| --- | --- | --- | --- |
| Actively maintained upstream | ✅ (releases weekly) | ❌ (upstream advises treating it as unmaintained) | ✅ |
| SFTP, FTPS, WebDAV, and HTTP in one server | ✅ | ❌ (web UI only) | ⚠️ (WebDAV and HTTP only) |
| Web admin with users, roles, and quotas | ✅ | ❌ (single user model) | ❌ |
| Two-factor authentication | ✅ | ❌ | ❌ |
| Host-header validation on the web binding | ✅ | ❌ | ❌ |
| Cloud storage backends (S3, Azure, GCS) | ✅ | ❌ | ❌ |
| Event rules and webhooks | ✅ | ❌ | ❌ |

Sources: the [SFTPGo repository](https://github.com/drakkan/sftpgo), the [File Browser security advisories](https://github.com/filebrowser/filebrowser#security), and the [Dufs repository](https://github.com/sigoden/dufs).

## Security Considerations

- Create the initial administrator immediately after deploy and enable two-factor authentication for it; the setup wizard is open to whoever visits first.
- Host-header validation rejects requests whose Host is neither the public domain nor the health-check host — add any custom domain to the allowlist when you attach one.
- The image runs as an unprivileged user; the container starts as root only so the volume is writable, matching Railway's root-owned volume mounts.
- Keep one replica: SQLite and user home directories live on a single volume.
- Exposing SFTP externally through the TCP proxy is optional; private-network access is free and safer. If you enable it, prefer key-based user authentication and SFTPGo's built-in rate limiting and defender.
- SFTPGo is AGPL-3.0. Deploying the unmodified image is fine; if you modify it, be ready to share the modified source.

## Why Deploy SFTPGo on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying SFTPGo on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.

One service and one volume replace a VM, an FTP daemon, and a file server — and the files that grow on the volume are yours, with automatic HTTPS in front.

## Similar templates

- [RustFS | (Just Updated) S3 Object Store, Public URL and Keys Set](https://railway.com/deploy/rustfs-or-just-updated-s3-object-store-p) — S3-compatible object store, keys and public URL preset, volume kept
- [TimescaleDB](https://railway.com/deploy/timescaledb-railway-template) — A PostgreSQL-based time-series database for analytics on Railway.
- [Neo4j 2026.10 Community](https://railway.com/deploy/neo4j-202610-community) — Neo4j graph database with APOC, Browser, Bolt TCP proxy and a volume

Open this page in a browser: https://railway.com/deploy/sftp-go
