Deploy AppFlowy Cloud
Self-hosted AppFlowy: docs, databases and kanban. A Notion alternative.
pgvector
Just deployed
/var/lib/postgresql
AppFlowy-Cloud
Just deployed
MinIO
Just deployed
/data
AppFlowy-Worker
Just deployed
AppFlowy-Web
Just deployed
Redis
Just deployed
/data
Just deployed
Nginx
Just deployed
Deploy and Host AppFlowy on Railway
AppFlowy is the open-source Notion alternative with 77,000+ GitHub stars: docs, wikis, databases, kanban boards, calendars and real-time collaboration, with native desktop and mobile apps. This template self-hosts the full AppFlowy Cloud backend on Railway, with the API, auth, web app, background worker, Postgres, Redis and S3-compatible storage behind one HTTPS domain. Notion charges $10–20 per member per month, and AppFlowy's own Pro plan is $12 per member billed yearly. Self-hosted AppFlowy has no per-seat fees and costs about $15–25/month for your whole team.
What This Template Deploys
| Service | Purpose |
|---|---|
| Nginx | The public HTTPS entry point. Routes the web app, API, WebSockets, auth and file storage on one domain. |
| AppFlowy-Web | The browser version of AppFlowy, so you can use the workspace without installing anything. |
| AppFlowy-Cloud | AppFlowy's Rust API server: workspaces, documents, databases, sharing and real-time sync over WebSockets. |
| GoTrue | The authentication service: email and password sign-in, sessions and the admin account. |
| AppFlowy-Worker | Background jobs such as imports and file processing. |
| pgvector | Postgres 18 with pgvector for all workspace data and auth, on a volume at /var/lib/postgresql. |
| Redis | Cache and messaging between the API and worker, persisted to its volume. |
| MinIO | S3-compatible storage for images and attachments, on a volume at /data. |
That's 8 services, connected by Railway reference variables over the private network. Database, Redis, MinIO and JWT secrets are all generated at deploy time.
About Hosting AppFlowy
AppFlowy's desktop and mobile apps work offline on their own, but sync, collaboration, sharing and the web app need AppFlowy Cloud, a stack of several services. Self-hosting it normally means docker-compose with a mounted nginx config, an auth server, Postgres, Redis, MinIO and TLS, plus keeping all the URLs consistent so the apps can connect.
This template does that wiring for you. On Railway, Nginx is the single public domain, every service talks over the private network, and each internal URL is built from Railway variables. Postgres, Redis and MinIO keep their data on volumes. HTTPS is automatic, which the AppFlowy apps need to connect.
You set the admin account at deploy. The deploy form asks for GOTRUE_ADMIN_EMAIL and GOTRUE_ADMIN_PASSWORD. That account manages users. Email confirmation is skipped by default, so you can sign in straight away.
Close sign-ups when your team is in. New users can sign up by default. Once everyone has an account, set GOTRUE_DISABLE_SIGNUP to true on GoTrue and redeploy, so strangers can't create accounts on your server.
Typical cost: ~$15–25/month on Railway for the full stack, for your whole team. Ten people on Notion Business pay $200/month.
Deploy AppFlowy in Under 10 Minutes
- Click Deploy on Railway and enter an admin email and password. All 8 services start (about 5 minutes).
- Open the Nginx domain and sign in with your admin account in the web app.
- Install the AppFlowy desktop or mobile app, choose Self-hosted in its cloud settings, and enter your Railway URL.
- Create a workspace, invite teammates, and start writing pages, databases and boards.
- When everyone has joined, set
GOTRUE_DISABLE_SIGNUP=trueto close registration.
No docker-compose. No nginx config files. No per-seat pricing.
Common Use Cases
- Self-hosted Notion alternative. Docs, wikis and databases for your team on your own server.
- Team knowledge base. Company handbooks, meeting notes and project docs with real-time editing.
- Project management. Kanban boards, calendars and grid databases for tasks and roadmaps.
- Personal second brain. Sync notes and databases across desktop, mobile and web.
- Privacy-first workspaces. Keep sensitive documents off third-party clouds, which helps with compliance.
- Agencies and clients. Separate workspaces per client on one server, with no per-seat bills.
- Offline-first teams. Native apps work offline and sync to your server when back online.
Configuration
| Variable | Required | Description |
|---|---|---|
GOTRUE_ADMIN_EMAIL, GOTRUE_ADMIN_PASSWORD | ✅ Required | The admin account, entered at deploy. |
GOTRUE_DISABLE_SIGNUP | Optional | false by default. Set true to stop new sign-ups. |
GOTRUE_MAILER_AUTOCONFIRM | ✅ Set | true. Accounts work without email confirmation. |
GOTRUE_SMTP_HOST, _PORT, _USER, _PASS, _ADMIN_EMAIL | Optional | SMTP for invites and password resets, shared with AppFlowy-Cloud's mailer. |
GOTRUE_JWT_SECRET | 🔐 Auto-generated | Signs login tokens for GoTrue, the API and the worker. |
APPFLOWY_BASE_URL, APPFLOWY_WEB_URL, GOTRUE_SITE_URL | ✅ Auto-injected | Built from the Nginx public domain. Update them for a custom domain. |
APPFLOWY_DATABASE_URL | ✅ Auto-injected | Private connection to the pgvector Postgres service. |
APPFLOWY_S3_* | ✅ Auto-injected | MinIO bucket, endpoint and keys for file storage. |
MINIO_ROOT_PASSWORD, POSTGRES_PASSWORD, REDIS_PASSWORD | 🔐 Auto-generated | Internal credentials. |
NGINX_CONFIG_B64 | ✅ Set | Base64 of the Nginx config. Edit it only if you change routing. |
Email on the Hobby plan. Railway blocks outbound SMTP on Hobby, so invite and reset emails need Railway Pro or an email provider you can reach. Sign-in works without email, because confirmation is skipped.
AppFlowy on Railway vs. Alternatives
| AppFlowy on Railway | Notion | AppFlowy Cloud | Outline (self-hosted) | |
|---|---|---|---|---|
| Monthly cost | ~$15–25 for the whole team | $10–20 per member | $12/member yearly, $16 monthly | Hosting only |
| Self-hosted | ✅ Yes | ❌ No | ❌ No | ✅ Yes |
| Per-seat pricing | ✅ None | ❌ Per member | ❌ Per member | ✅ None |
| Databases and kanban | ✅ Yes | ✅ Yes | ✅ Yes | ❌ Docs only |
| Native desktop and mobile apps | ✅ Yes | ✅ Yes | ✅ Yes | ⚠️ Web-first |
| Works offline | ✅ Yes | ⚠️ Limited | ✅ Yes | ❌ No |
| License | ✅ AGPL-3.0 | ❌ Proprietary | ❌ Proprietary hosting | ⚠️ BSL 1.1 (source-available) |
Dependencies for AppFlowy Hosting
- Railway account. Pro ($20/month) is a good fit for an 8-service stack and SMTP email.
- The AppFlowy desktop or mobile apps, or just the included web app.
- Optional: an SMTP provider for invites and password resets.
Deployment Dependencies
- AppFlowy on GitHub: apps and releases
- AppFlowy Cloud on GitHub: the self-hosted backend
- AppFlowy Self-Hosting Guide: official reference
- Railway Volumes Documentation: persistence
Implementation Details
Nginx's config is stored base64-encoded in a variable and decoded at start. Placeholders are replaced with each service's private hostname and Railway's DNS resolver, so Nginx always finds services after redeploys. GoTrue keeps its tables in an auth schema in the same Postgres as AppFlowy, and MinIO serves attachments through /minio-api/ on the public domain.
The AppFlowy images track latest. Once your team depends on it, pin matching versions of AppFlowy-Cloud, AppFlowy-Worker, GoTrue and AppFlowy-Web, and back up Postgres and MinIO before upgrading.
Frequently Asked Questions
What is AppFlowy, and why self-host it? AppFlowy is an open-source workspace for docs, wikis, databases and boards, similar to Notion. Self-hosting removes per-seat fees and storage limits and keeps your data on your own server.
How much does self-hosted AppFlowy cost compared to Notion? About $15–25/month on Railway for the whole team. Notion is $10–20 per member per month, so a ten-person team pays $100–200/month.
How do I connect the AppFlowy desktop or mobile app to my server?
In the app's settings, switch the cloud option to Self-hosted and enter your Railway URL (https://your-app.up.railway.app), then sign in with your account.
Do I lose documents when Railway redeploys? No. Workspace data is in Postgres, files are in MinIO, and both are on volumes. Redeploys and restarts keep everything.
Can I stop strangers from signing up?
Yes. Set GOTRUE_DISABLE_SIGNUP=true on the GoTrue service and redeploy once your team has accounts. Then only the admin can add people.
Are AppFlowy AI features included? No. This template deploys the core AppFlowy Cloud stack without the separate AI service, so documents, databases, sync and collaboration work, but AI features don't.
Why Deploy and Host AppFlowy 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 AppFlowy on Railway, you get a complete self-hosted Notion alternative, with web, desktop and mobile apps syncing to your own server, for one flat monthly cost instead of a bill per seat.
Template Content
pgvector
pgvector/pgvector:pg18AppFlowy-Cloud
appflowyinc/appflowy_cloud:latestAPPFLOWY_MAILER_SMTP_TLS_KIND
TLS mode: "wrapper" for port 465, "required" for 587
MinIO
minio/minio:latestAppFlowy-Worker
appflowyinc/appflowy_worker:latestAppFlowy-Web
appflowyinc/appflowy_web:latestRedis
redis:8.2.1GOTRUE_SMTP_HOST
SMTP server hostname (e.g. smtp.resend.com, smtp.gmail.com)
GOTRUE_SMTP_PASS
SMTP password or provider API key
GOTRUE_SMTP_PORT
SMTP port — 465 for implicit TLS, 587 for STARTTLS
GOTRUE_SMTP_USER
SMTP username (Gmail address, or "resend" for Resend)
GOTRUE_ADMIN_EMAIL
Create Admin account email
GOTRUE_ADMIN_PASSWORD
Create Admin account password
GOTRUE_SMTP_ADMIN_EMAIL
"From" address shown to recipients (must be authorized sender)
Nginx
nginx:latest