Self-Hosting Infrastructure
Running my own Gitea instance, nginx reverse proxy, and subdomain routing on a Linux VPS.
Technologies Used
Motivation
I wanted a place to host my own Git repositories without depending on a third-party platform. Setting up Gitea on a VPS turned into a practical crash course in Linux server administration, reverse proxy configuration, and DNS management.
Architecture
The setup runs on a Linux VPS with nginx as a reverse proxy sitting in front of Gitea. Requests to git.pjanik.ca are proxied to the Gitea instance running on a local port. TLS is handled by Let's Encrypt via Certbot, so everything is served over HTTPS.
client → git.pjanik.ca
|
DNS A record → VPS IP
|
nginx (443) → reverse proxy
|
Gitea (localhost:3000)What I Learned
Nginx reverse proxy - Configuring server blocks, proxy_pass directives, header forwarding, and WebSocket upgrades for Gitea's real-time features.
Subdomain routing - Setting up DNS A records for subdomains and configuring nginx to route each subdomain to a different service on the same machine.
Linux VPS fundamentals - SSH hardening, firewall rules, systemd service management, and keeping a server running reliably.
TLS certificates - Automating certificate issuance and renewal with Certbot and Let's Encrypt. No excuses for serving anything over plain HTTP.
What's Next
This project is still in active development. More updates to come.
Live
The Gitea instance is running at:
git.pjanik.ca