Skip to content

Self-host AFFiNE

updated Sep 2026prices checked · Jul 2026Install verified on Ubuntu 26.04 · Sep 2026 · how we test
We earn commissions when you shop through the links below. Full disclosure →

A workspace that combines documents, whiteboards and databases on one canvas, with a local-first editor and real-time collaboration. The self-hosted server runs with PostgreSQL and Redis; upstream plans for at least 2 GB of RAM.

Key facts

CategoryNotes
LicenseMIT (client) + AFFiNE EE License (server; Community Edition parts MPL-2.0)
StackTypeScript, Node.js, Rust, PostgreSQL, Redis
Min RAM2048 MB
Official imageyes
Measured idle RAM213 MB
Difficulty

What you need

  • Any VPS with at least 2048 MB of RAM
  • A domain you control — most self-hosted setups need HTTPS in front of them
  • Under an hour if you've used Docker before
Where to host itaffiliate disclosure
Hetzner Cloudrun it on
From $23.59/mo · 2 vCPU / 4 GB / 80 GB · EU + US
Get Hetzner Cloud (opens in new tab)
Kamaterafree trial
From $4/mo · 1 vCPU / 1 GB / 20 GB · US + EU + Asia
Start free on Kamatera → (opens in new tab)
DigitalOceanalso works on
From $6/mo · 1 vCPU / 1 GB / 25 GB · US + EU + Asia
Deploy on DigitalOcean → (opens in new tab)

Paid link — we earn a commission if you shop through it.

Install

Run these commands on your server:

# AFFiNE — the official Compose file (server + migration job + PostgreSQL + Redis)
mkdir -p affine/config && cd affine
curl -L -o docker-compose.yml https://github.com/toeverything/AFFiNE/releases/latest/download/docker-compose.yml
curl -L -o config/config.json https://github.com/toeverything/AFFiNE/releases/latest/download/config.json.example
# server.externalUrl is the base AFFiNE uses for the external links it generates; set it to the address you browse to (replace SERVER_IP with your server's public IP or domain)
sed -i 's|"externalUrl": ".*"|"externalUrl": "http://SERVER_IP:3010"|' config/config.json
docker compose up -d
# open http://SERVER_IP:3010 and create the admin account

An alternative to

More in Notes

We use analytics cookies (Google Analytics, PostHog) to see which guides are useful. No ad networks, no cross-site tracking. See our privacy policy.