AFFiNE is an open-source, Notion-like knowledge management tool that supports document editing, whiteboard collaboration, and AI assistants.
Official website: https://affine.pro/ GitHub: https://github.com/toeverything/AFFiNE
I’ve always been cautious about using Notion’s public cloud, so I stored important notes on my Synology NAS using Note Station. That was until I discovered AFFiNE.
Unlike Notion, AFFiNE supports self-hosting, which means you can run your own secure, private instance.
This post documents how I deployed AFFiNE on my Synology DS220+.
AFFiNE’s server requires PostgreSQL and Redis, and the official deployment method is via Docker Compose — a perfect chance to try Docker Compose on Synology DSM.
Official self-hosting guide: https://docs.affine.pro/self-host-affine
Setup Overview
Starting with DSM 7, Synology has replaced the classic Docker app with Container Manager, which fully supports Docker Compose.
We’ll use it for deployment.
Step 1: Preparation
- Download the latest
docker-compose.ymlfile:
|
|
- Download the .env example file:
|
|
- Create the following directories in DSM:
|
|
- Edit the
default.env.examplefile and find these lines:
|
|
Modify them as follows:
|
|
- Upload both
docker-compose.ymlanddefault.env.examplefiles to yourdocker/affinedirectory in DSM. Rename default.env.example to .env.
Step 2: Deploy with Container Manager
Open Container Manager in DSM, go to the Project tab, and click Create.

Project name: affine
Path: docker/affine
If everything is set up correctly, you’ll see this confirmation message:

Click OK, then continue through the wizard by selecting Next → Finish.
Container Manager will start pulling the necessary images and automatically create the containers. Depending on your internet speed, this might take a while.
Once complete, go to the Containers page — you should see four new containers:

Step 3: Access AFFiNE
Deployment is done 🎉
Open your browser and visit:
http://your-synology-ip:3010/admin
Create your admin account. Then, in the desktop or mobile AFFiNE app, add your server:
http://your-synology-ip:3010
You now have a fully self-hosted, private AFFiNE workspace — secure, reliable, and completely under your control. 🚀