[URGENT] Deploy reverse proxy with TLS for Gitea (Nginx + Let's Encrypt) #989

Closed
opened 2026-03-22 19:12:49 +00:00 by perplexity · 2 comments
Collaborator

Parent

  • #971 — Urgent: falsework and security and gitea database robustness

Objective

Stop running Gitea on plain HTTP over a raw IP. Point a domain, wrap in TLS.

Scope

  1. Point a domain (e.g., git.alexanderwhitestone.com) to 143.198.27.163
  2. Install Nginx as reverse proxy
  3. Install certbot + Let's Encrypt for TLS
  4. Configure Nginx per the template in #971 issue body
  5. Update app.ini:
    • DOMAIN = git.alexanderwhitestone.com
    • ROOT_URL = https://git.alexanderwhitestone.com/
    • HTTP_ADDR = 127.0.0.1 (only listen to proxy)
  6. Force HTTPS redirect
  7. Add HSTS header

Acceptance Criteria

  • https://git.alexanderwhitestone.com loads Gitea with valid TLS
  • http:// redirects to https://
  • Direct IP:3000 access is blocked or redirected
  • HSTS header present in response

Note

Requires DNS access. @rockachopa needs to point the domain.

## Parent - #971 — Urgent: falsework and security and gitea database robustness ## Objective Stop running Gitea on plain HTTP over a raw IP. Point a domain, wrap in TLS. ## Scope 1. Point a domain (e.g., `git.alexanderwhitestone.com`) to `143.198.27.163` 2. Install Nginx as reverse proxy 3. Install certbot + Let's Encrypt for TLS 4. Configure Nginx per the template in #971 issue body 5. Update `app.ini`: - `DOMAIN = git.alexanderwhitestone.com` - `ROOT_URL = https://git.alexanderwhitestone.com/` - `HTTP_ADDR = 127.0.0.1` (only listen to proxy) 6. Force HTTPS redirect 7. Add HSTS header ## Acceptance Criteria - [ ] `https://git.alexanderwhitestone.com` loads Gitea with valid TLS - [ ] `http://` redirects to `https://` - [ ] Direct IP:3000 access is blocked or redirected - [ ] HSTS header present in response ## Note Requires DNS access. @rockachopa needs to point the domain.
claude was assigned by Rockachopa 2026-03-22 21:44:38 +00:00
Owner

Can I just have someone do all this in digital ocean for me? Or at the very least stage the changes so I can approve them.

Can I just have someone do all this in digital ocean for me? Or at the very least stage the changes so I can approve them.
Owner

PR #998 created with staged deploy configs for review.

What's in the PR:

  • deploy/nginx-gitea.conf — Nginx reverse proxy config (HTTPS, HSTS, WebSocket, large push support)
  • deploy/setup-gitea-tls.sh — One-command deploy script (installs Nginx + Certbot, gets cert, patches app.ini, blocks port 3000)
  • deploy/gitea-app-ini.patch — Full hardening reference from #971 audit

To deploy after merging:

  1. Point DNS: git.alexanderwhitestone.com A record → 143.198.27.163
  2. SSH into the server and run: sudo bash deploy/setup-gitea-tls.sh git.alexanderwhitestone.com

The script has a --dry-run flag to preview what it will do before making changes.

PR #998 created with staged deploy configs for review. **What's in the PR:** - `deploy/nginx-gitea.conf` — Nginx reverse proxy config (HTTPS, HSTS, WebSocket, large push support) - `deploy/setup-gitea-tls.sh` — One-command deploy script (installs Nginx + Certbot, gets cert, patches app.ini, blocks port 3000) - `deploy/gitea-app-ini.patch` — Full hardening reference from #971 audit **To deploy after merging:** 1. Point DNS: `git.alexanderwhitestone.com` A record → `143.198.27.163` 2. SSH into the server and run: `sudo bash deploy/setup-gitea-tls.sh git.alexanderwhitestone.com` The script has a `--dry-run` flag to preview what it will do before making changes.
Sign in to join this conversation.
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#989