Self-Hosted Knowledge Base — Open Source & Free | AFFiNE
Self-host

Open-source, self-hosted knowledge base

AFFiNE is a knowledge base you can actually own: open source, local-first, and deployable on your own infrastructure with Docker. Docs, whiteboards and AI — no vendor lock-in.

  • 70K+ GitHub stars
  • Your servers, your data
  • Free to self-host
The AFFiNE workspace — docs, whiteboard and databases — running as a self-hosted instance

Why teams self-host their knowledge base

Company knowledge is some of the most sensitive data you have — product plans, internal processes, customer notes. A self-hosted knowledge base keeps that data on infrastructure you control, satisfies data-residency and compliance requirements, and removes the risk that a vendor changes pricing, terms, or shuts down.

Because AFFiNE is open source, self-hosting is not a stripped-down afterthought: you run the same docs-plus-whiteboard workspace as AFFiNE Cloud, deployed from the same public codebase.

Pick your deployment path

Docker Compose

The recommended path. Pull the official image, configure your environment, and run a production instance in minutes.

Follow the Docker guide

Your own cluster

Running Kubernetes or your own orchestration? Build from source or adapt the official images — everything is in the open repository.

Browse the source

Managed hosting partners

Coming soon

One-click managed AFFiNE through hosting partners such as Elestio, so you get a dedicated instance without operating it yourself.

Cloud marketplaces

Coming soon

AWS Marketplace, Azure and Google Cloud listings are on the roadmap — deploy AFFiNE inside your existing cloud account and billing.

How to self-host AFFiNE with Docker

A production AFFiNE instance is three steps away. The full guide — including upgrades, backups and environment options — lives in the documentation.

  1. Install Docker on your server

    Any machine that runs Docker and Docker Compose works — a VPS, a homelab box or an instance at your cloud provider.

  2. Fetch the official deployment config

    Grab the Docker Compose configuration from the official self-host guide and set your environment variables — ports, database credentials and the server URL.

  3. Start the stack and sign in

    Bring the containers up, open the configured address in your browser and create the first account. Your knowledge base is now running on your own infrastructure.

# after configuring the official compose file (see docs)
docker compose up -d
docker compose logs -f affine # watch startup

Full configuration reference: docs.affine.pro → Self-host AFFiNE.

How AFFiNE compares to other self-hosted knowledge bases

How AFFiNE compares to other self-hosted knowledge bases
AFFiNEOutlineBookStackDocmost
Docs + whiteboard in one page
Docs/wiki only
Docs/wiki only
Docs/wiki only
Local-first, works offline
Server-based
Server-based
Server-based
Real-time collaboration
Limited
Built-in AI features
writing, summaries, mind maps
Limited
Docker self-hosting
Also offered as managed cloud
AFFiNE Cloud

Capability snapshot, July 2026 — always verify against each project's current docs.

Frequently asked questions

What is a self-hosted knowledge base?

A self-hosted knowledge base is knowledge management software that runs on your own servers instead of a vendor's cloud. You control the data, the backups, the access policies and the upgrade schedule — which matters for privacy, compliance and long-term cost.

How do I self-host AFFiNE?

The recommended way is Docker Compose: pull the official AFFiNE image, set your environment configuration, and start the stack. The step-by-step guide in our documentation covers installation, upgrades and data backup.

Is self-hosting AFFiNE free?

Yes. AFFiNE is open source and self-hosting has no license fee. You pay only for your own infrastructure. Paid plans exist for AFFiNE Cloud and for teams that want managed features on top.

Is AFFiNE a self-hosted Notion alternative?

For many teams, yes. AFFiNE covers the core Notion workflows — documents, databases and collaboration — adds an infinite whiteboard, and unlike Notion it is open source and can run entirely on your own infrastructure.

Can a self-hosted knowledge base feed LLMs and AI agents?

Yes — and it is one of the strongest reasons to self-host. Keeping your knowledge base on your own infrastructure lets you connect it to AI models and agent workflows on your terms, without shipping company knowledge to a third party first.

Own your knowledge base

Deploy AFFiNE on your own infrastructure today — or start in the cloud and move later. Your data stays portable either way.

Last updated: July 7, 2026