Social

How much RAM does Mastodon need?

Self-hosted federated social network server with a web app, a streaming API and background job processing. Official requirements, sourced, plus our own measurements.

Last updated: 2026-11-21
Pinned version: Mastodon v4.7.6 (ghcr.io/mastodon/mastodon:v4.7.6@sha256:8d46d6d8ac86 + mastodon-streaming:v4.7.6@sha256:5b95d22c22f1) + PostgreSQL 14.25 (postgres:14-alpine@sha256:e7d9e6aac7fe) + Redis 7.4.12 (redis:7-alpine@sha256:7f7d30b7fdd0)

Official min RAM
not stated
Official rec. RAM
not stated
Min CPU
not stated
Rec. CPU
not stated
Measured idle RAM
868 MB
Measured disk
1458 MB
Containers
5
Measured peak RAM (sample load)
1352 MB

Our measurement

868 MB idle RAM · 1458 MB disk (images 1390 + data 68) · web 403 MB + Sidekiq 317 MB + PostgreSQL 78 MB + streaming 66 MB + Redis 4 MB

Official docker-compose.yml from the Mastodon repository (web, streaming, Sidekiq, PostgreSQL 14 and Redis 7, Elasticsearch left disabled as shipped), with every image pinned to an exact version and digest. Served on localhost with locally generated test secrets, the database schema loaded and one test account created and approved before the idle wait. Data disk (about 68 MB) was measured after the sample load.

Method: Official compose file from the repository with image tags replaced by exact version+digest (never latest). Idle RAM measured about 11 minutes after the test account was created, as docker stats MEM USAGE summed across all five containers, 3 samples 20 s apart (median). Disk = pulled image sizes + data folders after the sample load.
Host: 8 vCPU Intel Xeon VM, 16 GB RAM, Debian 13 (kernel 6.12), Docker 26.1.5 + Compose 2.26.1
Version: Mastodon v4.7.6 (ghcr.io/mastodon/mastodon:v4.7.6@sha256:8d46d6d8ac86 + mastodon-streaming:v4.7.6@sha256:5b95d22c22f1) + PostgreSQL 14.25 (postgres:14-alpine@sha256:e7d9e6aac7fe) + Redis 7.4.12 (redis:7-alpine@sha256:7f7d30b7fdd0) · Compose: source · Date: 2026-11-21

With sample data

868 MB idle RAM · 1458 MB disk · web 783 MB + Sidekiq 364 MB + PostgreSQL 134 MB + streaming 66 MB + Redis 5 MB at peak; 1,337 MB settled, about 2 minutes after the load
Peak RAM during processing: 1352 MB

Sample: 200 public posts created through the Mastodon API, mixed with 1,000 API reads (home and public timelines, account check, instance info and search), 10 requests at a time, by one local test account.

All 200 posts returned HTTP 200 and the Sidekiq queues were empty at the end. Of the 1,000 reads in the final run, 680 returned HTTP 200; the rest did not (most likely the API's default rate limit, not confirmed because rate-limit replies are not logged). An earlier run with the test account still pending approval served 449 reads and no posts, so the web process had already grown before the final run; RAM did not shrink afterwards and stayed at 1,337 MB. Disk was about 1,458 MB (images 1,390 + data 68).

Method: Same setup and host as the idle measurement. Peak RAM sampled about every 2 s with docker stats (all five containers summed) from just before the first post until the queues were empty plus 10 s. Settled RAM = 3 samples 20 s apart, about 2 minutes after the load.
Version: Mastodon v4.7.6 · Date: 2026-11-21

What the official docs say

Fits a 4GB server?

yesThe docs state no RAM requirement. We measured 868 MB idle RAM for the whole stack (web, streaming, Sidekiq, PostgreSQL and Redis) on a fresh install, and 1,352 MB peak while creating 200 posts and serving reads. Plus 512 MB for the OS and 30% headroom that is about 2.4 GB at peak, so it fits 4 GB for a small, single-user instance. This test had one account and no federation, so a busy public server will need more.

Sources