Gitea on GCP (git.daw.club)
Self-hosted Gitea instance for daw.club project management, running on a GCE e2-small VM behind a global HTTPS load balancer.Architecture
GCP Resources
| Resource | Name | Details |
|---|---|---|
| Project | gen-lang-client-0380481603 | |
| VM | gitea-server | e2-small, us-central1-a, Debian 12 |
| Static IP | gitea-lb-ip | 34.117.234.171 (global) |
| Instance Group | gitea-ig | Unmanaged, us-central1-a |
| Health Check | gitea-health-check | HTTP :3000/, 30s interval |
| Backend Service | gitea-gce-backend | Global, EXTERNAL_MANAGED |
| URL Map | gitea-url-map | Default → gitea-gce-backend |
| URL Map (redirect) | gitea-http-redirect | HTTP 301 → HTTPS |
| SSL Cert | gitea-cert | Managed, git.daw.club |
| HTTPS Proxy | gitea-https-proxy | → gitea-url-map |
| HTTP Proxy | gitea-http-proxy | → gitea-http-redirect |
| Forwarding Rule | gitea-https-rule | :443 → gitea-https-proxy |
| Forwarding Rule | gitea-http-rule | :80 → gitea-http-proxy |
| Firewall | allow-health-check | tcp:3000 from GCP health check ranges |
| Service Account | gitea-cloudrun@... | storage.objectAdmin on GCS buckets |
| GCS Buckets | songbird-gitea-data, songbird-gitea-lfs | songbird-gitea-lfs mounted via gcsfuse for LFS object storage |
VM Details
- OS: Debian 12
- Gitea: v1.22.6 (binary install at
/usr/local/bin/gitea) - Config:
/etc/gitea/app.ini - Data:
/var/lib/gitea/data/(SQLite DB, repos) - LFS storage: GCS bucket
songbird-gitea-lfs(via gcsfuse mount at/mnt/gcslfs) - Service:
systemdunitgitea.service - User:
git(system user)
Common Operations
Cost
- GCE e2-small: ~$15/month (0.5 vCPU, 2GB RAM)
- 30GB pd-ssd: ~$5/month
- Static IP: Free (while attached to a running VM)
- Load balancer: ~$18/month (forwarding rules + backend)
- SSL cert: Free (Google-managed)
- GCS LFS storage: ~$0.02/GB/month (Standard class)
- Total: ~$38/month (VM + disk + LB + GCS)
DNS
Managed via Cloudflare:git.daw.club→ A record →34.117.234.171(GCP LB static IP)- Cloudflare proxy disabled (DNS only) — GCP LB handles SSL
LFS on GCS
Git LFS objects are stored in thesongbird-gitea-lfs GCS bucket via gcsfuse, which mounts the bucket as a local filesystem at /mnt/gcslfs. Gitea uses its standard PATH-based LFS storage pointing to the mount, so no HMAC keys or S3 credentials are needed — the VM’s attached service account (gitea-cloudrun@...) provides authentication automatically.
The mount is managed by a systemd mount unit (mnt-gcslfs.mount) that starts before Gitea.
Future: Cloud Run for Headless DAW
The GCS bucketsongbird-gitea-data and Artifact Registry (us-central1/songbird) are already provisioned for future Cloud Run deployments of the headless DAW instances. The load balancer can be extended with additional URL map rules to route DAW traffic.