Video coming soon…
🛠️ Setup AFFiNE — Docs, Whiteboards, and Databases in One
Deploy AFFiNE on Ubuntu with Docker, PostgreSQL, and Redis — a self-hosted workspace that merges Notion-style docs, a Miro-style canvas, and databases, on port 3040.
⚠️ This script is provided for demo and testing purposes only. Not intended for production use.
📦 Resources & Setup Scripts
Grab the automated bash script from GitHub to follow along with the video.
Quick Install:
wget https://raw.githubusercontent.com/mhmdali94/Docker/main/tools/affine/affine-ubuntu.sh
chmod +x affine-ubuntu.sh
sudo bash affine-ubuntu.sh
Tutorial Steps
1 Download the Script
wget https://raw.githubusercontent.com/mhmdali94/Docker/main/tools/affine/affine-ubuntu.sh
2 Make it Executable
chmod +x affine-ubuntu.sh
3 Run the Installer
The script installs Docker if needed, generates a 24-character database password, runs a one-off migration container, then starts AFFiNE with PostgreSQL 16 and Redis 7 on port 3040.
sudo bash affine-ubuntu.sh
4 Register the Admin Account
Open AFFiNE and sign up — the first account you register becomes the server admin:
http://<your-server-ip>:3040
Ports Used
| Port | Purpose |
|---|---|
| 3040 | Web app (host → container 3010) — first account is admin |
| internal | PostgreSQL 16 + Redis 7 (not published) |
| ./storage | Uploaded files and attachments (also ./db and ./config) |