Self-Hosted Knowledge Base — Open Source & Free | AFFiNE
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.
Read the self-host guide View on GitHub
- 71,384 GitHub stars
- Your servers, your data
- Free to self-host
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.
Your own cluster
Running Kubernetes or your own orchestration? Build from source or adapt the official images — everything is in the open repository.
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.
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.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.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
| AFFiNE | Outline | BookStack | Docmost | |
|---|---|---|---|---|
| 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 |
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.
Keep exploring
Knowledge base software
Why teams pick AFFiNE as their knowledge base.
AFFiNE MCP Server
Connect Claude, Cursor or any MCP client to your self-hosted knowledge base.
AFFiNE vs Notion
Feature-by-feature comparison with Notion.
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.
Read the self-host guide Get started free
Last updated: July 6, 2026