Self-hosting on a VPS

A VPS with 4 vCPU, 8 GB RAM, 80 GB NVMe runs a full personal cloud, files, passwords, git, chat and photos, for $6.35 a month in Europe. You own the server, the data and the accounts, and you decide what runs, who can log in and where backups go.

Recommended start: S8, $6.35/mo

What can you self-host on one server?

Most of the online services a person or a small team uses every day have mature open-source versions that run happily on a single VPS:

  • Files and calendars: Nextcloud (sync clients for every desktop and phone, CalDAV and CardDAV built in) or Seafile for fast file sync. We ship a ready Nextcloud image.
  • Passwords: Vaultwarden, a light server compatible with the Bitwarden apps and browser extensions.
  • Git: Forgejo or Gitea for repositories, issues and pull requests, or GitLab CE if you want the larger suite and have the memory for it.
  • Chat: Matrix Synapse with Element, or a small Mattermost instance; Jitsi Meet for video calls.
  • Media: Jellyfin for films and music, Navidrome for a music library, Audiobookshelf for audiobooks and podcasts.
  • Photos: Immich or PhotoPrism, with automatic phone upload and face search.
  • Small helpers: Uptime Kuma, a read-it-later service, an RSS reader, a URL shortener.

Step-by-step guides for several of these live in the docs: Seafile, Forgejo, Matrix Synapse, Jitsi Meet and PhotoPrism.

How much server do you need for self-hosting?

Memory decides, not CPU. Each service with its database typically needs this much RAM when idle or lightly used:

ServiceTypical RAM
Vaultwarden30~60 MB
Forgejo with SQLite150~250 MB
Nextcloud with MariaDB and Redis600 MB~1 GB
Matrix Synapse with PostgreSQL500 MB~1.5 GB
Jellyfin (no transcoding)250~500 MB
Immich with machine learning2~4 GB
Reverse proxy, Docker, OSabout 400 MB

A handful of light services fit on S4. Add Nextcloud and Matrix and S8 (4 vCPU, 8 GB RAM, 80 GB NVMe) is comfortable. Photo libraries with face recognition and video transcoding push you towards S16 or a Dedicated CPU plan. Disk space is often the real limit for photos and media; compare libraries in adding storage with rclone or SSHFS.

Plans that fit

Sizes picked for this project, smallest first. Prices are per month; the order total is the shortest term that reaches $40.

PlanWhySizePer monthOrder from
S8Nextcloud, Vaultwarden, Forgejo and a few helpers side by side, the recommended start4 vCPU, 8 GB RAM, 80 GB NVMe$6.35$76.20 for 12 months
S4Passwords, git and a light file sync for one person2 vCPU, 4 GB RAM, 40 GB NVMe$4.25$51.00 for 12 months
S16Photo libraries with face search, Matrix and media streaming for a family8 vCPU, 16 GB RAM, 160 GB NVMe$11.45$68.70 for 6 months
P4A personal cloud outside Europe, sold in all 15 cities2 vCPU, 4 GB RAM, 80 GB NVMe$12.05$72.30 for 6 months
D8Immich and Jellyfin transcoding that keep the CPU busy2 vCPU, 8 GB RAM, 80 GB NVMe$25.85$77.55 for 3 months

Why use a VPS rather than a box at home?

A home server is a great hobby, but it brings chores that a VPS removes:

  • Reachability: many home connections sit behind carrier-grade NAT or change their IPv4 address. A VPS has a fixed dedicated IPv4 and an IPv6 /64, so DNS records just work.
  • Upload speed: home lines often upload far slower than they download, which makes sharing files and streaming media from home sluggish. A data centre connection is symmetrical in practice.
  • Power and hardware: no fan noise, no electricity bill, no dead disk to replace. Hosts and NVMe drives in the data centre are our job.
  • Separation: a public-facing server outside your home network keeps the attack surface away from your laptops, cameras and smart devices.

The two approaches also combine well: keep a large media library at home and use the VPS as a public entry point that forwards to it over WireGuard, so nothing at home is exposed directly.

What does a sensible self-hosting stack look like?

Four layers keep a personal server tidy and easy to rebuild:

  1. Containers. Run each service in Docker with Docker Compose, one folder per service under /srv. Start from our Docker CE image, or use the Coolify image if you prefer deploying from a web panel.
  2. Reverse proxy. One proxy owns ports 80 and 443, fetches Let's Encrypt certificates and routes each subdomain to its container. Caddy needs two lines per service; Traefik and Nginx Proxy Manager are popular too.
  3. Backups. Nightly copies of /srv and database dumps to a second location.
  4. Updates. Automatic OS security updates, and a routine for pulling new container images.

A Caddyfile for three services shows how little the proxy needs:

cloud.example.com {
    reverse_proxy nextcloud:80
}
vault.example.com {
    reverse_proxy vaultwarden:80
}
git.example.com {
    reverse_proxy forgejo:3000
}

Put Caddy and the services on one shared Docker network so the names resolve. The general Compose workflow is in Docker Compose setup.

How do you set up the server step by step?

On a fresh Ubuntu 24.04 or the Docker CE image, the first hour usually goes like this:

# 1. updates and basic hardening
apt update && apt -y upgrade
apt -y install unattended-upgrades ufw fail2ban
ufw allow OpenSSH && ufw allow 80,443/tcp && ufw enable

# 2. Docker (skip on the Docker CE image)
curl -fsSL https://get.docker.com | sh

# 3. a shared network and a folder per service
docker network create web
mkdir -p /srv/caddy /srv/vaultwarden /srv/nextcloud

Then add DNS records (A and AAAA) for each subdomain, as described in pointing a domain, and start Caddy first, followed by one service at a time. Check each with docker compose logs -f before you move to the next. Note that Docker publishes container ports past ufw, so publish only the proxy ports and let everything else talk over the internal network.

How do you back up a self-hosted server?

Backups decide whether self-hosting is a pleasure or a risk. Use two layers:

  • The backup add-on keeps 7 daily copies of the whole disk for 20% of the plan price, $1.27 a month on S8. Good for "the server is broken, bring back yesterday". Restores are requested in a ticket.
  • File-level backups you control with restic, sent to another server or to storage at home. Good for "I deleted one folder three weeks ago".
# dump databases first, then back up /srv
docker exec nextcloud-db mariadb-dump --all-databases -uroot -p"$DB_ROOT" > /srv/dumps/nextcloud.sql
restic -r sftp:backup@198.51.100.20:/srv/restic backup /srv
restic -r sftp:backup@198.51.100.20:/srv/restic forget --keep-daily 14 --keep-weekly 8 --keep-monthly 6 --prune

Run it nightly from a systemd timer or cron, and test a restore every few months. More detail in backups and restore.

How do you keep self-hosted apps up to date?

Unpatched web apps are the main risk for a personal server. Let the OS patch itself with unattended-upgrades, and handle containers on a schedule you choose:

cd /srv/nextcloud
docker compose pull
docker compose up -d
docker image prune -f

Pin major versions in your compose.yaml (for example nextcloud:30 rather than latest) so a big upgrade never arrives unannounced, and read the release notes before moving to the next major. Tools such as Watchtower or Diun can tell you when new images exist. For a short overview of logs, disk and memory, see monitoring basics.

What does data control and digital independence mean in practice?

When your files, passwords and messages live on a platform run by someone else, that platform decides the rules: storage limits, price changes, which features exist, whether an account is suspended, and how long data is kept after you leave. Self-hosting moves those decisions to you.

On your own VPS, plainly speaking:

  • the data sits on a disk attached to a server only you have root on;
  • you choose the city, for example one of our European locations, so you know which country holds the data;
  • open formats and open-source software mean you can move everything to another server at any time with rsync;
  • no feature disappears because a vendor changed direction.

In return you carry the duties: updates, backups and security are your tasks. With the stack above, that is an evening to set up and a few minutes a month to maintain.

Which city should a self-hosted server live in?

Choose the city nearest to where you and your family or team spend most of your time, since sync and photo uploads feel faster with low latency. In Europe, the Shared vCPU family gives the most memory per dollar and includes 20 TB of outgoing traffic on S8, more than enough for streaming your media to a few people. Outside Europe, use Performance plans in cities such as Toronto or Sydney.

Self-hosting, answered

Is there a ready image for self-hosting?

Yes. The Nextcloud, Docker CE and Coolify images all start on Ubuntu 24.04 and save the first setup steps.

Can I run a mail server as part of my setup?

Yes, but outgoing port 25 is opened by support on request and reverse DNS is set in a ticket. The mail server guide covers the details.

How much disk do I need for photos?

Roughly the size of your library plus 20% for thumbnails and previews. Large archives can live on external storage mounted with rclone.

Is self-hosting secure?

It can be very secure if you keep SSH key-only, expose only the proxy ports, update regularly and keep backups. See SSH hardening.

Can family members use my server?

Yes. Nextcloud, Vaultwarden, Immich and most other apps support multiple user accounts, each with its own data.

What if I outgrow the plan?

Order a larger plan, copy /srv across with rsync, start the containers and switch DNS. Moving to a bigger plan has the steps.

Build it on CheapVPS

Pick the plan, a city near your users and the image, then pay the order in crypto.