−25%

on annual Windows plans, until 31 Oct. See plans

EQVPS
Get started

Self-host Gitea on a VPS: your own private Git server

Sep 3, 2026 · 2 min read · EQVPS Team

Hosting your code on someone else's platform means their rules, their outages, their AI training on your repositories, and their decision if an account gets flagged. Gitea is a lightweight, self-hosted Git forge — repos, issues, pull requests, wiki, webhooks — that runs on a server you control. It's small enough to run anywhere, quick to set up with Docker, and you can pay for the server in crypto without KYC.

What Gitea needs

  • A dedicated IPv4, a domain and HTTPS. You clone over https://git.yourdomain.com or git SSH, so you need a domain, valid TLS and inbound ports — a dedicated-IP plan. NAT plans don't take inbound. Nano-IP or Small-IP is plenty.
  • Modest disk sized to your repos. Gitea itself is tiny; the disk holds your Git history and artifacts.
  • Very light RAM/CPU. Gitea is written in Go and runs comfortably on a small instance.

Set it up (Ubuntu 24.04, Docker)

# docker-compose.yml — Gitea + PostgreSQL (SSH git on host 2222, web behind TLS proxy)
services:
  server:
    image: gitea/gitea:latest
    restart: always
    environment:
      GITEA__database__DB_TYPE: postgres
      GITEA__database__HOST: db:5432
      GITEA__database__NAME: gitea
      GITEA__database__USER: gitea
      GITEA__database__PASSWD: change-me-strong
    volumes: ["/srv/gitea:/data"]
    ports:
      - "127.0.0.1:3000:3000"   # web (proxied by Caddy)
      - "2222:22"               # git over SSH
    depends_on: [db]
  db:
    image: postgres:16-alpine
    restart: always
    environment:
      POSTGRES_USER: gitea
      POSTGRES_PASSWORD: change-me-strong
      POSTGRES_DB: gitea
    volumes: ["/srv/gitea-db:/var/lib/postgresql/data"]

Put a TLS reverse proxy in front of the web UI:

# TLS + reverse proxy (dedicated IPv4 + domain + inbound 443); git SSH stays on 2222
apt install -y caddy
echo 'git.yourdomain.com { reverse_proxy 127.0.0.1:3000 }' > /etc/caddy/Caddyfile
systemctl restart caddy && ufw allow 80,443,2222/tcp

Open https://git.yourdomain.com, finish the first-run setup, add your SSH key, and push your first repo — hosting you own.

Make it yours

  • Issues, pull requests, wiki, releases — the workflow you expect, self-hosted.
  • Webhooks + Actions: fire a self-hosted CI runner on push (see the runner guide below).
  • Organizations and fine-grained access — no seat fees, unlimited private repos.
  • Keep Postgres on localhost; expose only 443 (web) and your git-SSH port.

Why EQVPS for Gitea

  • Dedicated IPv4 from $8/mo, domain + HTTPS friendly, all ports, self-service rDNS.
  • EU locations (Germany, Finland) — clean routes, real data-protection law.
  • No KYC, crypto payment. Email to register, USDC/USDT to pay — fitting for code that stays yours.
  • Root in ~60 seconds, NVMe. Bring up the stack, add Caddy, and your private Git server is live.

Add a self-hosted CI runner → · Anonymous VPS hosting explained →

VPS for BookStack: a self-hosted team wiki →

FAQ

Why self-host Gitea instead of GitHub?

Gitea is a lightweight Git forge — repositories, issues, pull requests, wiki and webhooks — that runs entirely on a server you control. Your code isn't mined to train models, the repo can't be taken down by a third party, and there are no seat limits or private-repo caps. You can pay for the server in crypto without ID.

How is this different from a self-hosted CI runner?

Gitea hosts the repositories themselves (the forge); a CI runner just executes build jobs. They pair well: Gitea fires a webhook and your runner builds. If you specifically want CI, see the runner guide linked below — this article is about hosting the Git repos.

What plan and resources does Gitea need?

Gitea is famously light — it runs happily on a small box. A Nano-IP or Small-IP (dedicated IPv4) is plenty for a personal or small-team forge; scale disk to your repository size. You need a dedicated IP so the web UI and git-over-SSH are reachable inbound.

Do I need a dedicated IP and a domain?

Yes. You'll clone over https://git.yourdomain.com or git SSH, which needs a domain, valid TLS and inbound ports — so a dedicated-IPv4 plan. Our NAT plans don't accept inbound. A reverse proxy (Caddy) gives you automatic HTTPS; git SSH runs on a separate port.

Do you ask for ID or a card?

No. Register with an email, pay in USDC or USDT. No documents, no card, no KYC.

Comments

No comments yet. Be the first.

Leave a comment

Comments are moderated before they appear.