DEV Community

Sh Raj
Sh Raj

Posted on Fully Autonomous

AFFiNE Self-Hosting: A Local-First Workspace for Docs, Whiteboards, and Tables

AFFiNE Self-Hosting: A Local-First Workspace for Docs, Whiteboards, and Tables

A team knowledge base usually starts as a document editor and slowly becomes something else: project notes, diagrams, databases, meeting records, and shared planning boards. The problem is that those pieces often live in separate products, each with its own permissions, export format, and collaboration model.

AFFiNE tries to bring those working surfaces into one workspace. It combines documents, whiteboards, tables, and knowledge management, with a local-first approach and an option to run the server on infrastructure you control.

The project appeared at daily position #14 in the November 20, 2026 GitHub Trending snapshot, with 182 new stars recorded at 06:58 UTC. Its release history also shows the pre-release tag 2026.11.18-canary.905, published on November 18. AFFiNE is not a new project; the current signal is renewed attention around an actively developed workspace and its canary builds.

AFFiNE official project artwork

Official AFFiNE project artwork. Source: AFFiNE repository.

AFFiNE workspace screenshot from the project README

Product visual linked from the official repository README.

What local-first means here

AFFiNE is more than a document editor with a whiteboard tab. Its model is a workspace where a document, a database-like table, and a visual canvas can live together. The local-first design is intended to make editing responsive and keep a usable local copy of work, while synchronization and collaboration connect devices and teammates.

Do not confuse local-first with serverless. A self-hosted deployment still runs a server stack. The official Docker Compose setup includes the AFFiNE server, a migration job, PostgreSQL, Redis, persistent volumes, and configuration. Local-first describes how the client works with data; self-hosting describes who operates the synchronization and storage services.

That distinction is useful when deciding what you want to control:

  • A single person who mainly needs a private notebook may prefer the desktop app and its local storage.
  • A team that needs shared workspaces, accounts, and cross-device collaboration may want the self-hosted server.
  • A company that does not want to maintain databases, backups, upgrades, and HTTPS may prefer the managed service.

Start a self-hosted evaluation

The official guide recommends Docker Compose v2. It stores data relative to the deployment directory, so choose a stable path before starting.

mkdir affine
cd affine
mkdir -p config

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
Enter fullscreen mode Exit fullscreen mode

Edit config/config.json and set the external URL users will open. For a local test, the documented default is:

{
  "$schema": "https://github.com/toeverything/affine/releases/latest/download/config.schema.json",
  "server": {
    "name": "AFFiNE Self-hosted",
    "externalUrl": "http://localhost:3010"
  },
  "copilot": {
    "enabled": true,
    "byok": {
      "enabled": true
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Then start the stack and check its status:

docker compose up -d
docker compose ps
Enter fullscreen mode Exit fullscreen mode

Open http://localhost:3010 and create the initial administrator account. The documentation recommends planning for at least four CPU cores and 2 GB of RAM for basic use, plus storage for PostgreSQL data, uploaded files, and configuration.

For a public deployment, set server.externalUrl to the final HTTPS address and configure the reverse proxy before inviting users. New official Compose deployments do not require a separate .env file for ordinary settings; those belong in config/config.json.

Backups and AI need deliberate configuration

A complete backup is not just a database dump. AFFiNE's guide lists three pieces:

  1. PostgreSQL, which holds users, workspaces, documents, permissions, and server metadata.
  2. Uploaded blobs, such as images and attachments, when filesystem storage is used.
  3. Configuration, including config/config.json, the Compose file, and legacy .env values where applicable.

Test a restore before relying on a backup. A database-only restore can bring back document metadata while leaving uploaded files missing.

The current configuration example enables Copilot and BYOK. That does not mean model inference happens locally. BYOK lets a workspace owner configure provider credentials, and the provider may be external. If your privacy requirement is that no document content leaves your server, disable the AI feature or review the configured provider and its data-handling terms before enabling it.

Releases, licence, and operational trade-offs

The release 2026.11.18-canary.905 is explicitly marked as a pre-release. It is useful evidence of active development, but it is not a reason to put a canary build into a production workspace. The official upgrade guide says to choose a target version, read its release notes, back up PostgreSQL and uploaded files, compare Compose files, and verify the restore path. Do not blindly track a moving image tag.

AFFiNE is also a multi-licence repository. The community server code and Enterprise Edition components have separate package-level notices; the backend/server tree includes an EE licence, while community-edition server code is under MPL-2.0. Check the licence for the exact package you plan to modify or redistribute instead of assuming one top-level notice covers every component.

The operational trade-off is straightforward: self-hosting gives you control over data location, domain, backups, and infrastructure policy, but you inherit upgrades, database operations, storage monitoring, mail/OAuth configuration, and incident response.

Choose When it fits
AFFiNE self-hosted You want an integrated workspace and are prepared to operate the server
Obsidian You mainly need personal Markdown notes and a plugin ecosystem
Outline You want a focused team wiki with a simpler knowledge-base model
Notion You prefer a managed workspace and do not want to operate the stack
AppFlowy You want to compare another open-source workspace with a similar goal

A sensible evaluation plan

Start with a non-production workspace. Import a small set of notes, create a whiteboard and table, test desktop sync, upload attachments, and invite one test user. Then back up the database and storage, restore them to a clean environment, and verify that documents and attachments still open. Only after that should you plan a migration for a real team.

I did not find a current exact-project X post or a recent official YouTube walkthrough suitable for embedding. The official self-host guide, configuration guide, backup guide, and repository visuals are more useful for the specific deployment decisions in this article.

Sources and further reading

Question: would you run your team's knowledge base on infrastructure you control, or is the operational cost of self-hosting larger than the privacy and portability benefit?


Prepared with AI assistance and checked against the linked primary sources.

β€” Shaswat Raj Β· GitHub Β· LinkedIn Β· YouTube

Top comments (0)