AFFiNE

stack Documents / Productivity / Wiki

Workspace that mixes docs, whiteboards and databases, so a page can flip between writing and an endless canvas. Edits sync to this server as you type.

Install AFFiNE

It isn't in the main Portainer Templates list yet, so use this one. Portainer takes one URL at a time, so it swaps out whatever list you had before.

In Portainer, head to Settings --> App Templates, paste this in as the URL and save.

https://raw.githubusercontent.com/NotAFlightRisk/portainer-templates-extras/main/templates.json
  1. Open App Templates and pick AFFiNE.
  2. The form works as it comes, so change only what you want to.
  3. Hit Deploy the stack, then open http://<your-server>:3010 in a browser.

Before you start

Open http://<your-host>:3010 (or whichever port you picked). The first start takes a minute while it sets up the database, then it asks you to create the admin account, and whoever gets there first does, so do it straight away. The workspace it opens is only saved in your browser, so make a new one from the workspace menu (it goes on this server by default) and keep your docs there. In the admin panel at /admin, set the External URL under Settings --> Server to the address people actually use, or invite links point at localhost. New accounts can't invite anyone or make share links for their first 24 hours, which you can change under Settings --> Auth. Sign-ups need email (Settings --> Notification), so until then add people yourself under Accounts. Docs live in Postgres, in the postgres-data volume, uploads in affine-storage, and the server's own key in affine-config. Docs: docs.affine.pro

Settings

What the Portainer form asks for. With compose they go in the .env file instead.

VariableWhat it's forDefault
AFFINE_PORTHost port for the web UI 3010

Services

The containers this stack runs, with ports as they come out of the box.

ServiceImagePorts
affineghcr.io/toeverything/affine:stable3010:3010
postgrespgvector/pgvector:pg16Internal only
redisredis:8-alpineInternal only

More apps