Tag: gitea vps setup

  • How to Self-Host Your Design Stack on a UK VPS: Penpot, Gitea, and Plausible Without the SaaS Bill

    How to Self-Host Your Design Stack on a UK VPS: Penpot, Gitea, and Plausible Without the SaaS Bill

    Figma’s pricing has crept up year on year. GitHub’s free tier comes with caveats. Google Analytics 4 remains a GDPR headache that most UK studios are quietly sweating over. If you’ve been running a small design or development practice and watching your SaaS subscriptions quietly devour your margin, there’s a genuinely viable escape hatch: self-hosting your core stack on a UK-based virtual private server. This guide walks through how to self host design tools on a UK VPS, specifically Penpot (your Figma replacement), Gitea (your GitHub replacement), and Plausible (your GA4 replacement), with enough technical detail to actually get you moving.

    The total monthly outlay for a mid-spec VPS from a UK provider like Mythic Beasts, Memset, or Hetzner’s UK edge nodes typically runs between £8 and £25 depending on RAM. Compare that to Figma’s Organisation tier at roughly £40 per editor per month, GitHub Team at around £3.50 per user, and GA4’s 360 tier when you outgrow the free limits. The maths tilts hard in favour of self-hosting once you have more than two or three people on a team.

    Developer setting up self host design tools on UK VPS with Penpot in a London office

    Choosing Your UK VPS Provider

    Where your server physically lives matters for two reasons: latency for your UK team, and data residency under UK GDPR. The ICO’s guidance is clear that personal data should remain in jurisdictions with adequate protections, and keeping it on UK soil is the simplest way to stay compliant without writing a lengthy transfer impact assessment.

    For this walkthrough, assume a VPS with 4GB RAM, 2 vCPUs, and 80GB SSD storage. That comfortably runs all three services simultaneously. You’ll want Ubuntu 24.04 LTS as your base OS, Docker and Docker Compose installed, and a domain with DNS pointing at your server’s IP. Nginx will act as a reverse proxy in front of everything, with Let’s Encrypt handling SSL via Certbot.

    Once your VPS is provisioned, update the system and install Docker:

    sudo apt update && sudo apt upgrade -y
    sudo apt install -y docker.io docker-compose-v2 nginx certbot python3-certbot-nginx
    sudo systemctl enable docker
    sudo usermod -aG docker $USER

    Setting Up Penpot on Your VPS

    Penpot is the open-source design and prototyping tool from the Spanish studio Kaleidos. It’s browser-based, handles vector work and component libraries, and supports real-time collaboration. It won’t do everything Figma does, but for most UI design workflows it’s genuinely solid. The ICO would be pleased: no data leaving your server.

    Penpot ships an official Docker Compose configuration. Grab it:

    mkdir ~/penpot && cd ~/penpot
    wget https://raw.githubusercontent.com/penpot/penpot/main/docker/images/docker-compose.yaml
    wget https://raw.githubusercontent.com/penpot/penpot/main/docker/images/config.env

    Open config.env and set the PENPOT_PUBLIC_URI to your subdomain, something like https://design.yourdomain.co.uk. Also set PENPOT_FLAGS to include enable-registration initially so you can create your admin account, then flip it to disable-registration afterwards. Run it:

    docker compose -f docker-compose.yaml up -d

    Penpot binds to port 3449 by default. Your Nginx config for this subdomain should proxy to that port, with SSL terminated at the Nginx layer. Once Certbot has issued your certificate and you’ve reloaded Nginx, your design.yourdomain.co.uk should show the Penpot login screen. Create your admin account, invite your team, and you’re running a fully functional self host design tools UK VPS setup in under an hour.

    Deploying Gitea as Your Private Git Host

    Gitea is a lightweight, self-hosted Git service written in Go. It’s fast, it uses minimal resources, and it has a web interface that feels close enough to GitHub that your team won’t mutiny. It handles repositories, issues, pull requests, webhooks, and CI integration with Gitea Actions.

    Create a compose file at ~/gitea/docker-compose.yml:

    version: "3"
    services:
      gitea:
        image: gitea/gitea:latest
        environment:
          - USER_UID=1000
          - USER_GID=1000
          - GITEA__database__DB_TYPE=sqlite3
        volumes:
          - ./data:/data
        ports:
          - "3000:3000"
          - "222:22"
        restart: always

    SQLite works fine for teams under about 20 users. If you’re running something bigger, swap to PostgreSQL. The SSH port mapping (222:22) means your team will push with git remote add origin ssh://[email protected]:222/yourorg/repo.git. Nginx proxies HTTP traffic on port 3000 under its own subdomain. Run docker compose up -d, navigate to the web installer at your subdomain, and configure your instance. Disable public registration immediately.

    Installing Plausible Analytics

    Plausible is the privacy-first, GDPR-compliant analytics tool that’s been winning converts from Google Analytics for a few years now. The self-hosted version is functionally identical to the cloud product. For UK studios with clients asking about cookie banners and data processing agreements, hosting Plausible on your own UK VPS means the conversation becomes dramatically simpler: the analytics data never leaves your infrastructure.

    According to the ICO’s UK GDPR guidance, analytics tools that collect personal data without consent require explicit opt-in. Plausible’s cookieless approach sidesteps most of this entirely, but self-hosting adds another layer of confidence for clients.

    Clone the Plausible hosting repo:

    git clone https://github.com/plausible/community-edition ~/plausible
    cd ~/plausible
    cp plausible-conf.env.example plausible-conf.env

    Edit plausible-conf.env. Set BASE_URL to your analytics subdomain, generate a SECRET_KEY_BASE using openssl rand -base64 48, and configure your SMTP details for email verification. Then:

    docker compose up -d

    Plausible runs on port 8000. Nginx proxy config follows the same pattern as the others. Once it’s live, embed the lightweight tracking script (<script defer data-domain="yourclient.co.uk" src="https://analytics.yourdomain.co.uk/js/script.js"></script>) in your clients’ sites and you’re collecting privacy-respecting, UK-hosted analytics.

    Nginx Reverse Proxy Config Pattern

    Each service follows the same Nginx block structure. Here’s the template:

    server {
        listen 443 ssl;
        server_name service.yourdomain.co.uk;
    
        ssl_certificate /etc/letsencrypt/live/service.yourdomain.co.uk/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/service.yourdomain.co.uk/privkey.pem;
    
        location / {
            proxy_pass http://localhost:PORT;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
        }
    }
    
    server {
        listen 80;
        server_name service.yourdomain.co.uk;
        return 301 https://$host$request_uri;
    }

    Replace PORT with 3449 for Penpot, 3000 for Gitea, and 8000 for Plausible. Run sudo certbot --nginx -d service.yourdomain.co.uk for each subdomain. Certbot will modify the block automatically to include the certificate paths. Reload Nginx after each one.

    Backups and Maintenance

    Self-hosting means you own the failure. Set up a daily cron job to dump Docker volumes to a compressed archive and rsync it off-server to a separate UK storage bucket or a second VPS. Mythic Beasts and Bytemark (now part of IONOS UK) both offer object storage with UK data residency. A backup that lives on the same physical host as your data is not a backup.

    Docker image updates are the other recurring task. A monthly docker compose pull && docker compose up -d across all three services keeps you on current releases without much fuss. Subscribe to the Penpot, Gitea, and Plausible release channels on their respective Git hosts so you catch security patches promptly.

    The total monthly compute bill for this three-service stack on a decent UK VPS sits somewhere around £12 to £20. For a small studio of four or five people, you’re almost certainly saving north of £100 per month compared to the equivalent SaaS tiers, and you’ve got full data sovereignty to boot. The setup overhead is a few hours, and the maintenance overhead is genuinely low once it’s running.