Engineering notes

How much RAM does a self-hosting VPS need? Measure it, then size it

RAM requirements for common self-hosted software from each project's own documentation, how to measure real use with /proc/meminfo, free and docker stats, and when swap helps.

By Vozora · Published

Most single-purpose self-hosted services fit comfortably in 1 GB of RAM. A reverse proxy serving a static site, a WireGuard endpoint or a small monitoring tool will leave most of a small server idle. Things that run a database next to a web application, or spawn several worker processes, are where 2 GB and 4 GB start to matter.

That is the short answer. The useful answer is to measure what your stack actually uses, because "how much RAM does X need" depends on your data, your users and how many other things share the box. This post covers how to read memory on Linux properly, what each project's own documentation says, and when swap earns its place.

Start with what the operating system already uses

Before counting applications, know your baseline. This is the output from the 1 GB Vozora Nano in our new VPS checklist, a Debian server in the UK, captured on 21 September 2026. (Vozora's plans have since doubled their memory: a Nano is now 2 GB. The measurement is kept as it was taken.)

$ grep -E "^(MemTotal|MemFree|MemAvailable|Cached):" /proc/meminfo
MemTotal:         991160 kB
MemFree:          401028 kB
MemAvailable:     714348 kB
Cached:           418380 kB

The Linux kernel documentation defines these fields precisely (kernel.org, /proc/meminfo, checked 2026-09-24):

  • MemTotal: "Total usable RAM (i.e. physical RAM minus a few reserved bits and the kernel binary code)". That is why a 1 GB server reports 991160 kB, not 1048576 kB.
  • MemFree: "Total free RAM". Memory doing nothing at all.
  • MemAvailable: "An estimate of how much memory is available for starting new applications, without swapping."
  • Cached: "In-memory cache for files read from the disk (the pagecache) as well as tmpfs & shmem."

The number to plan with is MemAvailable. On this server it was 714348 kB, while MemFree was only 401028 kB. The difference is mostly page cache: file data the kernel keeps in memory because the RAM is otherwise unused, and which it gives back when a program needs it. Low MemFree on a healthy server is normal. Low MemAvailable is the warning.

Subtracting gives the baseline: 991160 kB total minus 714348 kB available is 276812 kB, about 270 MB, not available to new programs on that server at that moment. That figure is one server at one moment, not a rule for every image. Run the same command on yours before installing anything.

Measure a running stack

free shows the same numbers in a table. The available column is MemAvailable:

free -m

For per-process use, sort by resident memory:

ps -eo rss,comm --sort=-rss | head -15

rss is in kilobytes and counts shared libraries once per process that maps them, so adding up the column overstates the total. Use it to find the heavy processes, not to do accounting.

For containers:

docker stats --no-stream

Docker's documentation notes that on Linux "the Docker CLI reports memory usage by subtracting cache usage from the total memory usage" (Docker docs, docker container stats, checked 2026-09-24). The MEM USAGE column is therefore closer to what the container needs than the raw cgroup figure.

Measure under real load, not straight after start-up. A service that uses little memory while idle can use several times as much during a backup, an import, a thumbnail run or a burst of requests. Take readings at the busiest time you can arrange, and keep taking them for a few days.

What the projects themselves say

Here is what each project's own documentation states about memory. Where a project publishes no figure, this says so rather than filling the gap.

SoftwareWhat its documentation saysSource (checked 2026-09-24)
CaddyNo RAM requirement published on the install pagecaddyserver.com/docs/install
Uptime KumaNo minimum RAM published in the READMEgithub.com/louislam/uptime-kuma
PostgreSQLshared_buffers default "is typically 128 megabytes"; work_mem default "is four megabytes"postgresql.org, resource consumption
Nextcloud"a minimum of 128MB RAM per process"; recommends "a minimum of 512MB RAM per process"docs.nextcloud.com, system requirements
Gitea"2 CPU cores and 1GB RAM is typically sufficient for small teams/projects"docs.gitea.com
WireGuardNo figure published; it "lives inside the Linux kernel"wireguard.com

A few notes on reading that table.

PostgreSQL is configured, not fixed. The same documentation says: "If you have a dedicated database server with 1GB or more of RAM, a reasonable starting value for shared_buffers is 25% of the memory in your system." On a shared self-hosting box, the database is not dedicated, so start from the default and raise it only if you have measured headroom. work_mem is allowed per sort or hash operation, so a complex query or several connections can use several multiples of it.

Nextcloud counts memory per PHP process. A web server running several PHP workers multiplies that figure, and Nextcloud also wants a database. Its documentation adds that the built-in updater needs "at least 256MB".

Gitea's figure is for Gitea itself on a server. If Gitea shares the box with a database and a reverse proxy, those come on top.

WireGuard on Linux runs in the kernel, with no application process holding memory for the tunnel, which is why a VPN endpoint is one of the lightest things you can run.

Caddy and Uptime Kuma publish no minimum, so measure them. We ran Uptime Kuma in Docker on the same Nano as the figures above, bound to loopback:

$ sudo docker run -d --restart=always -p 127.0.0.1:3001:3001 -v kuma:/app/data --name kuma louislam/uptime-kuma:1 >/dev/null; sudo docker ps --format '{{.Names}}  {{.Status}}'
(image pull output trimmed)
kuma  Up Less than a second (health: starting)

We did not record its memory in that session, so there is no figure to quote. docker stats --no-stream after it has run your checks for a day will give you one.

When swap helps, and when it does not

The Nano had no swap until we added it:

$ /sbin/swapon --show; echo '(no swap)'
(no swap)

$ sudo fallocate -l 1G /swapfile && sudo chmod 600 /swapfile

$ sudo mkswap /swapfile >/dev/null && sudo swapon /swapfile

$ echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
/swapfile none swap sw 0 0

$ /sbin/swapon --show
NAME      TYPE  SIZE USED PRIO
/swapfile file 1024M   0B   -2

Swap helps with two things. It absorbs short spikes, such as a package upgrade, an image pull or a nightly job, which would otherwise have the kernel's out-of-memory killer end a process. And it gives the kernel somewhere to put memory that programs allocated at start-up and never touch again, which frees real RAM for work and cache.

Swap does not help when the working set is simply bigger than RAM. If memory the server needs every second lives on disk, every access waits for disk, and the server slows to a crawl while still technically running. The sign is USED in swapon --show climbing and staying up, together with steady swap activity in vmstat 1 (the si and so columns). At that point the fix is a bigger server or fewer services, not more swap.

How eagerly the kernel swaps is set by vm.swappiness, which the kernel documentation describes as defining "the rough relative IO cost of swapping and filesystem paging, as a value between 0 and 200", with a default of 60 (kernel.org, vm sysctl, checked 2026-09-24). The default is reasonable for most self-hosting; change it only after you have seen a problem it would solve.

A sizing method that works

  1. Record MemAvailable on the fresh server.
  2. Install one service at a time and record MemAvailable again after it has been doing real work.
  3. Add the drops together, then leave room: page cache makes disk access faster, and spikes need somewhere to go. Planning to use all of MemAvailable in normal operation leaves none for either.
  4. Add swap on small servers as a buffer, and watch whether it stays used.
  5. If one service dominates, give it its own server rather than squeezing everything onto one.

Sizing is the first step. Hardening, Docker, HTTPS, backups and monitoring for the same kind of server are in our self-hosting on a VPS guide.

Where that lands on Vozora sizes

Vozora VPS sizes by RAM: Nano 2 GB, Small 4 GB, Medium 8 GB, Large 16 GB. Reading the documentation above against them:

  • Nano, 2 GB. A static site behind Caddy, a WireGuard endpoint, Uptime Kuma, a bot, or Gitea with room for the operating system and a reverse proxy.
  • Small, 4 GB. A small application with PostgreSQL on its defaults, Nextcloud with its database for a few users, or a handful of containers that each do real work.
  • Medium, 8 GB. Nextcloud with several PHP workers and more users, or a busier set of containers with a database alongside.
  • Large, 16 GB. Many containers, a database given a larger shared_buffers, or room to stop thinking about it.

Size carefully up front: an hourly server can be resized to a larger size while it is stopped, but not down to a smaller one, and monthly-subscription servers cannot be resized yet. Specifications and current rates for each size are on the Vozora pricing page.

© 2026 Vozora. A trading name of Bankside Technology Ltd, registered in England and Wales, company no. 17253446. Registered office: First Floor, Swan Buildings, 20 Swan Street, Manchester, England, M4 5JW.