[claude] Deploy reverse proxy with TLS for Gitea (#989) #998

Closed
Rockachopa wants to merge 1 commits from claude/issue-989 into main
Owner

Fixes #989

Summary

Stages all configuration and a deploy script for securing the Gitea instance behind Nginx with Let's Encrypt TLS.

Files added:

  • deploy/nginx-gitea.conf — Production Nginx config with HTTPS redirect, HSTS, TLS 1.2/1.3, WebSocket proxy, large push support
  • deploy/setup-gitea-tls.sh — One-command deploy script that:
    1. Installs Nginx + Certbot
    2. Deploys proxy config
    3. Obtains Let's Encrypt cert
    4. Patches Gitea app.ini (DOMAIN, ROOT_URL, HTTP_ADDR, COOKIE_SECURE)
    5. Blocks direct port 3000 access via ufw
    6. Restarts services and verifies
  • deploy/gitea-app-ini.patch — Full hardening reference from audit (#971)

Prerequisites (manual)

  1. DNS: Point git.alexanderwhitestone.com A record to 143.198.27.163
  2. Run on server: sudo bash deploy/setup-gitea-tls.sh git.alexanderwhitestone.com

Acceptance criteria addressed

  • HTTPS with valid TLS via Let's Encrypt
  • HTTP → HTTPS redirect (301)
  • Direct IP:3000 blocked (ufw deny)
  • HSTS header in response

No source code changes — deploy configs only.

Fixes #989 ## Summary Stages all configuration and a deploy script for securing the Gitea instance behind Nginx with Let's Encrypt TLS. ### Files added: - **`deploy/nginx-gitea.conf`** — Production Nginx config with HTTPS redirect, HSTS, TLS 1.2/1.3, WebSocket proxy, large push support - **`deploy/setup-gitea-tls.sh`** — One-command deploy script that: 1. Installs Nginx + Certbot 2. Deploys proxy config 3. Obtains Let's Encrypt cert 4. Patches Gitea `app.ini` (DOMAIN, ROOT_URL, HTTP_ADDR, COOKIE_SECURE) 5. Blocks direct port 3000 access via ufw 6. Restarts services and verifies - **`deploy/gitea-app-ini.patch`** — Full hardening reference from audit (#971) ## Prerequisites (manual) 1. **DNS**: Point `git.alexanderwhitestone.com` A record to `143.198.27.163` 2. **Run on server**: `sudo bash deploy/setup-gitea-tls.sh git.alexanderwhitestone.com` ## Acceptance criteria addressed - [x] HTTPS with valid TLS via Let's Encrypt - [x] HTTP → HTTPS redirect (301) - [x] Direct IP:3000 blocked (ufw deny) - [x] HSTS header in response No source code changes — deploy configs only.
Rockachopa added 1 commit 2026-03-22 22:39:32 +00:00
feat: add Nginx + Let's Encrypt deploy config for Gitea TLS
Some checks failed
Tests / lint (pull_request) Failing after 3s
Tests / test (pull_request) Has been skipped
e831176dec
Stage reverse proxy configuration and automated deploy script
for securing the Gitea instance with TLS. Includes:

- Nginx config with HTTPS redirect, HSTS, WebSocket support
- One-command deploy script (setup-gitea-tls.sh) that installs
  Nginx + Certbot, obtains cert, patches app.ini, blocks port 3000
- app.ini hardening reference from security audit (#971)

Requires DNS A record for git.alexanderwhitestone.com -> 143.198.27.163
before running the deploy script on the server.

Fixes #989

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Timmy closed this pull request 2026-03-23 15:11:37 +00:00
Owner

[loop-cycle-5] Closing — large feature PR from a previous agent session. Lines of code are a liability. Features need smaller, tested increments. Reopen linked issue if still wanted.

[loop-cycle-5] Closing — large feature PR from a previous agent session. Lines of code are a liability. Features need smaller, tested increments. Reopen linked issue if still wanted.
Some checks failed
Tests / lint (pull_request) Failing after 3s
Tests / test (pull_request) Has been skipped

Pull request closed

Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#998