Deploy AFFiNE

A basic, out-of-the-box setup of Affine.

Deploy AFFiNE

/var/lib/postgresql/data

Just deployed

/root/.affine

Just deployed

/data

Deploy and Host AFFiNE

One-click template for AFFiNE workspace. Auto-provisions backend, database, caching. Zero config required.

About Hosting AFFiNE

Template orchestrates AFFiNE NestJS server, PostgreSQL, Redis. Links environment variables and runs pre-deploy DB migrations automatically.

Common Use Cases

  • Instant self-hosted workspace deployment
  • Zero-config team wiki/whiteboard setup
  • Fast AFFiNE evaluation

Dependencies for AFFiNE Hosting

None. Template automatically spins up:

  • AFFiNE Web/API service
  • PostgreSQL database
  • Redis instance

Deployment Dependencies

Implementation Details

Custom start command handles DB migrations automatically: sh -c "node ./scripts/self-host-predeploy.js && node dist/main.js"

Healthcheck configured at /api/health with 120s timeout to allow initial DB setup.

Why Deploy AFFiNE 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 AFFiNE 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.


Template Content

More templates in this category

View Template
Rocky Linux
Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
51
View Template
Foundry Virtual Tabletop
Self-hosted virtual tabletop for role-playing games (license required)

Lucas
71
View Template
NEW
Double Commander in your browser
The Double Commander file manager in the cloud, from any device

Nermin Sabanovic
0