dev tools

Docker for Solopreneurs: Lightweight Self-Hosted Services to Run on a $5 VPS

Docker for Solopreneurs: Lightweight Self-Hosted Services to Run on a $5 VPS

Running a modern digital business often requires a suite of software services: web analytics, database storage, email marketing tools, and a customer relations manager (CRM). If you subscribe to cloud SaaS providers for each of these, your monthly operational costs (burn rate) can easily exceed $100–$200.

For a bootstrap solopreneur, keeping expenses low is critical. By using Docker Compose on a single $5/month Virtual Private Server (VPS) from providers like Hetzner, DigitalOcean, or Linode, you can self-host lightweight, production-ready alternatives and retain full ownership of your data.


The $5 VPS Software Stack

Modern open-source tools are incredibly resource-efficient. You can comfortably host the following services on a single server with 1 CPU Core and 1GB to 2GB of RAM:

  1. Umami Analytics: A lightweight, privacy-focused alternative to Google Analytics.
  2. Baserow / NocoDB: Open-source Airtable alternatives built on PostgreSQL.
  3. Activepieces / Windmill: Open-source automation tools.
  4. Caddy Server: A simple web server with automatic SSL certificate generation.

Docker Compose Template for Solopreneurs

Below is a complete docker-compose.yml configuration to launch a privacy-first web analytics service (Umami) and a database on your cheap VPS.

Create the configuration file:

version: '3.8'

services:
  db:
    image: postgres:15-alpine
    container_name: umami-db
    environment:
      POSTGRES_DB: umami
      POSTGRES_USER: solopreneur
      POSTGRES_PASSWORD: supersecretpassword
    volumes:
      - pgdata:/var/lib/postgresql/data
    restart: always

  umami:
    image: ghcr.io/umami-software/umami:postgresql-latest
    container_name: umami-app
    ports:
      - "3000:3000"
    environment:
      - DATABASE_URL=postgresql://solopreneur:supersecretpassword@db:5412/umami
      - APP_SECRET=yourrandom32charappsecretstring
    depends_on:
      - db
    restart: always

volumes:
  pgdata:

Steps to Deploy on Your VPS:

  1. SSH into your server:
    ssh root@your_vps_ip
    
  2. Install Docker and Docker Compose:
    curl -fsSL https://get.docker.com | sh
    
  3. Copy the docker-compose.yml file to the VPS, and start the services:
    docker compose up -d
    
  4. Navigate to http://your_vps_ip:3000. Log in using the default credentials (admin / umami) and immediately change the password.

Securing Your Services via Caddy Web Server

Exposing port 3000 over standard HTTP is insecure. We can use Caddy to handle subdomain routing and automatically fetch Let's Encrypt SSL certificates (enforcing HTTPS).

Create a file named Caddyfile on your server:

analytics.yourdomain.com {
    reverse_proxy localhost:3000
}

Start Caddy, and it will configure secure HTTPS routing to your dashboard instantly.


Resource Utilization Comparison

Service Stack SaaS Price Self-Hosted Cost RAM Idle Usage
Analytics (Google/Fathom) $15/mo Free ~120 MB
Airtable Alternative (Baserow) $20/mo Free ~380 MB
Hosting Infrastructure - $5/mo -
Total Costs $35+/mo $5/mo ~500 MB / 1GB

[!TIP] Always configure a Swap File (1GB to 2GB) on low-memory servers. While SSD swap space is slower than actual physical RAM, it acts as a safety valve that prevents the server from crashing or terminating database processes (OOM crashes) during peak traffic or build updates.


Frequently Asked Questions

How do I back up my database?
You can automate backups using a simple cron job that runs `pg_dump` on the PostgreSQL container and uploads the resulting compressed file to an offsite S3-compatible object storage (like Backblaze B2, which offers 10GB of storage for free).
Can I run multiple Docker stacks on one VPS?
Yes. As long as your VPS has enough RAM, you can add more services (like WordPress, N8N, or Ghost) inside their own docker compose networks. Make sure to use a reverse proxy like Caddy or Nginx Proxy Manager to distribute incoming traffic.
M

Written by Mehmet Demir

Mehmet is a Systems Architect specializing in local LLM deployments and workplace automations.

Sponsored Content
AdSlot: 728x90 In-Article Banner
Development Placeholder (AdSense Inactive)