One of the most common questions new self-hosters ask is: “How much RAM do I actually need?” The answer depends on what you’re running, but this guide will help you figure out exactly what you need—without overspending or underprovisioning.

The Quick Answer

Use CaseMinimum RAMRecommended
Pi-hole only1GB2GB
Light Docker (3-5 containers)4GB8GB
Medium Docker (10-15 containers)8GB16GB
Heavy Docker + databases16GB32GB
Virtualization (Proxmox)16GB32-64GB
Everything + room to grow32GB64GB

Now let’s dive into the details.

Understanding RAM Usage in Home Servers

How Linux Uses RAM

Before we discuss requirements, understand that Linux handles RAM differently than Windows. Linux aggressively caches files in unused RAM, which means:

  • “Used” RAM isn’t always truly used
  • High RAM usage isn’t necessarily bad
  • The free command can be misleading

The key metric is available RAM, not free RAM. Use free -h and look at the “available” column:

$ free -h
              total        used        free      shared  buff/cache   available
Mem:           31Gi        12Gi       1.2Gi       892Mi        18Gi        17Gi

In this example, only 1.2GB is “free,” but 17GB is actually available for applications.

What Consumes RAM?

On a typical home server:

  1. Operating System: 500MB - 2GB base
  2. Docker daemon: ~100MB overhead
  3. Each container: Varies wildly (50MB to several GB)
  4. Databases: Often the biggest consumers
  5. File caching: Uses “spare” RAM (good thing)
  6. Virtual machines: Reserved RAM per VM

RAM Requirements by Service

Let’s look at real-world RAM usage for popular self-hosted services.

Lightweight Services (50-200MB each)

These services sip RAM and run well on minimal hardware:

ServiceTypical RAMNotes
Pi-hole50-100MBDNS queries are tiny
AdGuard Home100-150MBSlightly more than Pi-hole
WireGuard20-50MBMinimal overhead
Nginx/Caddy50-100MBReverse proxy
Traefik100-150MBMore features = more RAM
Uptime Kuma100-150MBMonitoring dashboard
Homepage50-100MBDashboard
Vaultwarden50-100MBPassword manager

Medium Services (200MB-1GB each)

These need more resources but are still reasonable:

ServiceTypical RAMNotes
Home Assistant300-800MBDepends on integrations
Nextcloud300-500MBWithout caching
Jellyfin (idle)200-400MBMore during transcoding
Plex (idle)200-400MBMore during transcoding
Gitea200-400MBLightweight Git server
Paperless-ngx400-800MBDocument management
Immich500MB-1GBPhoto management

Heavy Services (1GB+ each)

These are the RAM hogs—plan accordingly:

ServiceTypical RAMNotes
PostgreSQL500MB-4GBDepends on configuration
MariaDB/MySQL500MB-2GBDepends on databases
Elasticsearch2-8GBMinimum 2GB heap
Plex (transcoding)1-4GBPer stream
Jellyfin (transcoding)1-3GBPer stream
GitLab4-8GBVery heavy
Discourse2-3GBForum software
Mastodon2-4GBSocial media server

Real-World Server Configurations

Let’s look at practical examples with actual RAM usage.

Example 1: Basic Home Server (8GB)

A minimal but useful setup:

S-------TASeovtrPNVUHPOtaavigapooSaiti-iutmrlluchnliet+:aseoxtmab:slweAiD~l:ePasno2eCrrKsec.o(oduirk1fm1xemseGof0ynat(rBro0a1rMM((n5actBa81t0vcaa)n02MetcbaM0(BrihlgBM5)hviee)B0eenr)0agwMd:i(Bt1)(~h5160GGrMBBoB)o)mtospare

Verdict: 8GB is perfect for this setup.

Example 2: Media Server (16GB)

A home media setup:

S------TTASeoovtrJ*qPNHOttaaveaBogeSaaitilrisiillluclrttnm+aseytgxdidb:sfsoraDdul:itrePlolreSnarSrlceimceQok:nfo(knLxdegoo4tyar~rt0((s3th0S(5Mh.rc,Mo20abv2aaBn00noeGncha0MaarBshairMBgrhcindrB)edeondl,)radgle(di:e,R(1nsa10(g12d501:12Ga0MG--BrMBB~13rB))53t,)GGsrBBiaP+mnrusolcwtoladanirenrog,u)sBasztarrera)m:s800MB

Verdict: 16GB is ideal; 8GB would work but feel tight.

Example 3: Power User (32GB)

Running everything:

S----------TASeovtrNJH*VIPGV2OtaaveeoaamaiaSaitixlmrumptrLlluctlerlieeiX+:asecytcraoCb:slfAswhluD~l:oistae(sco1ePunsar+s3oc2ldicds0snkGfe+skeM-0mteBon+tnLnMaarrtta(gBliayRrn8((x)lncceat082evtaodn00G(sreicfis(MMB6esrvhsc6BB)0rheiho0))0v(ene+d0Mi2agaiMBcGd/dMnB)eBgrag)s)(ror1ooi((.wma255tDG0GhBB0B:)M)(B~1)2.05GGBB)

Verdict: 32GB provides comfortable margins for growth.

Example 4: Virtualization Host (64GB)

Running Proxmox with multiple VMs:

V-----TAMovsTDWTPta:roieraiucnsollekdtxaNeo/mabArwDollSsexlehvo(oVhcf8sMVoaoGtMstrB(te(8(dad1G4:de6BGvddGBe3iiBdr8tcedhGiaddeeBoteidanedcidadiacl)cta(aet2VtdeGMe)dBsd)):)26GB

Verdict: 64GB allows serious virtualization.

Factors That Increase RAM Needs

1. Database Size and Queries

Databases benefit enormously from RAM:

  • Small database (<1GB): Default settings fine
  • Medium database (1-10GB): Allocate 2-4GB to database
  • Large database (10GB+): Consider 8GB+ for database alone

PostgreSQL and MariaDB can be tuned to use more RAM for better performance.

2. Number of Users

More simultaneous users = more RAM:

  • 1-2 users: Baseline requirements
  • 3-5 users: Add 25-50% buffer
  • 5-10 users: Consider doubling estimates
  • 10+ users: Size for concurrent peak usage

3. Transcoding

Media transcoding is RAM-intensive:

  • Direct play: Minimal RAM
  • 1 transcode stream: +1-2GB
  • Multiple transcodes: +1-2GB per stream
  • 4K transcoding: +2-4GB per stream

Use hardware transcoding (Intel Quick Sync) to reduce RAM pressure.

4. Search and Indexing

Full-text search engines need RAM:

  • Basic search: SQLite FTS is lightweight
  • Elasticsearch/Meilisearch: 2-8GB depending on index size
  • Immich ML models: 1-2GB for photo recognition

5. Machine Learning

AI/ML features in self-hosted apps:

  • Immich ML: 1-2GB
  • Frigate object detection: 1-2GB (or use Coral TPU)
  • Local LLMs: 4-16GB+ depending on model
  • Whisper transcription: 1-4GB

How to Monitor RAM Usage

Command Line Tools

Check current usage:

# Overview
free -h

# Per-process usage
ps aux --sort=-%mem | head -20

# Live monitoring
htop

Docker-Specific

# All container stats
docker stats

# Specific container
docker stats container_name

Monitoring Stacks

For ongoing monitoring, deploy:

  • Netdata: Real-time, minimal setup
  • Prometheus + Grafana: Comprehensive but complex
  • Glances: Simple web-based monitoring

Upgrade Strategies

When to Upgrade

Consider adding RAM when:

  • Available RAM frequently drops below 1-2GB
  • You’re hitting swap regularly
  • Services are being OOM-killed
  • Performance degrades under load

Cost-Effective Approaches

  1. Start modest, upgrade later: 8GB → 16GB is cheap
  2. Buy matched pairs: Better performance, easier upgrades
  3. Check compatibility: DDR4 vs DDR5, speeds, slots
  4. Consider used/refurbished: Server RAM is often cheaper used

ECC vs Non-ECC

For home servers:

  • Non-ECC: Fine for most use cases, cheaper
  • ECC: Recommended for ZFS, critical data, 24/7 operation
  • Many mini PCs: Don’t support ECC (check specs)

Swap Space

Should You Use Swap?

Yes, but as a safety net, not primary memory:

  • SSD swap: Acceptable for occasional use
  • HDD swap: Very slow, avoid if possible
  • No swap: Risk of OOM crashes
RAMSwap Size
4GB4GB
8GB4-8GB
16GB4-8GB
32GB+4-8GB

With ample RAM, large swap is unnecessary.

My Recommendations

Budget Build: 8GB

Best for:

  • Learning self-hosting
  • Running 5-10 lightweight containers
  • Single-user setups
  • Pi-hole + basic services

Skip if: You want media transcoding or databases.

Sweet Spot: 16GB

Best for:

  • Most home users
  • Media servers with transcoding
  • 10-20 containers
  • Small databases
  • Room to experiment

This covers 90% of home server use cases.

Future-Proof: 32GB

Best for:

  • Power users
  • Running “everything”
  • Multiple databases
  • Photo management (Immich)
  • Comfortable headroom

You’ll rarely feel constrained.

Virtualization: 64GB

Best for:

  • Running Proxmox/ESXi
  • Multiple VMs
  • Lab environments
  • Running VMs + containers

Allows serious experimentation.

Common Mistakes

1. Over-Provisioning

32GB for Pi-hole is wasteful. Start smaller and upgrade if needed.

2. Under-Provisioning

4GB for Nextcloud + Plex + databases will struggle. Be realistic about needs.

3. Ignoring Swap

No swap means OOM killer will terminate services randomly. Always have some swap.

4. Not Monitoring

You can’t optimize what you don’t measure. Set up basic monitoring early.

Conclusion

For most self-hosters, 16GB is the sweet spot—enough for media servers, databases, and a dozen containers without stress. Start there if you’re unsure.

If you’re just beginning with Pi-hole and a few services, 8GB works fine. If you’re planning heavy virtualization or want to run everything, 32GB gives comfortable headroom.

Remember: RAM is one of the easiest upgrades. Start modest, monitor your usage, and upgrade when—not before—you need it.


Related guides: