
I’ve been moving over from Notion to AFFiNE and the docker container kept crashing.
TLDR: if you’re not using the AI features, turn off the copilot process in AFFiNE.
Specifically it ran out of memory through a JS heap error. The culprit was the copilot function, which was embedding all of my notes so an AI tool could use it.
Since I have no intention of using any AI services with AFFiNE, I turned this off.
This took the ram consumption down from 4GB (!!) to around 450MB.

I initially tried to solve this by giving AFFiNE more memory but it just kept chewing through whatever I allocated - all the way up to 6GB.
Making the Copilot change required 1 addition to the config.js file
"copilot": {
"enabled": false
}What does Copilot do in AFFiNE?
Copilot is not the normal editor or sync system. It provides AFFiNE’s ai abilities for stuff like chat, document embeddings, reranking, image generation, audio transcription, coding and text-generation task - none of which interest me.
In practical terms, turning it off means:
- Normal AFFiNE stays: pages, workspaces, editing, syncing, authentication and storage should continue to work independently of Copilot.
- AI features go away: things like AI chat, AI-generated/summarised text and other Copilot functions will no longer work.
- Document embedding stops: AFFiNE should stop generating AI vector embeddings of your documents in the background. Those embeddings are used to give AI features searchable/contextual knowledge of your workspace. AFFiNE has an active embedding pipeline specifically tied to Copilot.
Disabling copilot removes the spikes in memory consumption which was causing AFFiNE to crash, but it also lowers the baseline memory usage in general.

You’re welcome, random stranger who might find this when they’re fighting with AFFiNE.
Latest
More from the site
Lester
Overhead is everything
Any new thing that enters your life comes with some form of overhead. Buying a new thing, trying out a new system, making a new acquaintance - it all comes with admin. Almost nothing simply enters yo
Read post
Lester
Ai in the wild
While out shopping with my daughter I noticed that one of the stores was using Ai generate product photos. This seems like an obvious use of the technology, but it was till fascinating for me to actua
Read post
Lester
Fixing self hosted Affine instances that won’t load workspaces.
I recently set up a self-hosted AFFiNE server behind a Cloudflare Tunnel. I’m getting sick of paying for Notion and the AI bloat is making the product very annoying to use. In my mind it was a Simple
Read post
