Requirements

Hardware and software requirements for Self-hosted AFFiNE instances

Hardware

Storage

The necessary storage space largely depends on the size of your workspaces and collaborators, blobs you may upload, and number of total docs.

Basically, The server itself requires nearly 1.5 GB spare space for installation. The performance of your host's fs significantly affect performance of AFFiNE.

Based on the space usage we monitored at affine.pro

  • 100 MB Postgres space growth as per 1k docs, average 1k words per doc

  • 10 GB Blob storage growth as per 1k blobs

CPU

We recommend the CPU of host to have at least 4 cores, for leverage long CPU holding jobs. AFFiNE's response speed depends on the specification of your CPU.

Memory (RAM)

Memory are mostly consumed by Sync system and Doc merging. The larger the largest doc is, the more Memory will be taken to merge it.

Memory specifications are various depends on the size of your docs and modification times of each docs. Based on the Memory consumption we monitored at affine.pro

  • merging a doc with 10k modifications leads to peaking 1 GB memory usage

So we recommend the host to:

  • have 2 GB RAM for basic usage

  • have 4 GB RAM, if there will be docs with more than 10k words

Optional Components

The following components are either integrated internally in some installation methods or optional for more professional users.

PostgreSQL

Postgres is the very basic component where AFFiNE's data stored in, and it's the only database AFFiNE supports. More details here.

AFFiNE VersionTested Postgres version
0.21.xpostgres:16
0.21.x with AIpgvector/pgvector:pg16
INFO

You need to install pgvector extension manually if an self maintained Postgres used, to enable full capabilities of AI.

Redis

Redis is used as Cache facility, center of background tasks, core of sync system.

AFFiNE can't run without a Redis server provided. More details here.

Redis 6.x or 7.x is required and fully tested.

Prometheus

By default, Prometheus and its related exporters are enabled to monitor AFFiNE instances. These processes consume approximately 200 MB of memory.

For more information, see monitoring GitLab with Prometheus.