---
title: "Deploy AFFiNE"
description: "AFFiNE - Self-host version  "
category: "Starters"
url: https://railway.com/deploy/affine
---

# Deploy AFFiNE

AFFiNE - Self-host version  

**[Deploy AFFiNE on Railway](https://railway.com/template/affine)**

- **Creator:** Alan Ren's Projects
- **Category:** Starters
- **Total deploys:** 288

## Template content

### AFFiNE https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fraw.githubusercontent.com%2Fb42n1%2Funraid-templates%2Fmain%2Flogos%2Flogo-affine-original.png&f=1&nofb=1&ipt=0702a3163ab0debf98f91e4a1077fa4c85de29fe2c7bfbb411abdfd372b84408&ipo=images

- **Image:** ghcr.io/toeverything/affine-graphql:stable
- **Public domain:** Yes

### Redis https://devicons.railway.app/i/redis.svg

- **Image:** bitnami/redis:7.2.5

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:16

## Documentation

DON'T FORGET TO POINT THE PUBLIC URL TO THE PORT!!!

# Deploy and Host AFFiNE on Railway

AFFiNE is a privacy-focused, local-first, open-source alternative to Notion and Miro that combines docs, whiteboards, and databases in one workspace.

## About Hosting AFFiNE
Self-hosting AFFiNE requires Docker with three services: AFFiNE server, PostgreSQL, and Redis. Railway simplifies deployment by providing managed databases and automatic scaling.

## Common Use Cases
- Knowledge management and wikis
- Collaborative whiteboarding
- Project planning with kanban boards
- Team documentation
- Personal note-taking with privacy

## Dependencies for AFFiNE Hosting
- PostgreSQL 16+ (database)
- Redis 7+ (cache/sessions)
- Node.js 20+ (runtime)
- Docker (containerization)

### Deployment Dependencies
- [AFFiNE GitHub](https://github.com/toeverything/AFFiNE)
- [Self-Host Docs](https://docs.affine.pro/docs/self-host-affine)
- [Docker Compose](https://github.com/toeverything/AFFiNE/releases/latest/download/docker-compose.yml)
- [Railway Docs](https://docs.railway.com/quick-start)

## 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.


## Similar templates

- [open-excalidraw](https://railway.com/deploy/open-excalidraw) — Self-hostable collaborative drawing built on Excalidraw
- [caring-vibrancy](https://railway.com/deploy/caring-vibrancy) — Deploy and Host caring-vibrancy with Railway
- [Appsmith](https://railway.com/deploy/appsmith-1) — Low-code platform for internal tools, dashboards, and admin panels.

Open this page in a browser: https://railway.com/deploy/affine
