Skip to content

feat: Added nginx reverse proxy cookbook - #1501

Open
ronakmaheshwari wants to merge 1 commit into
felddy:developfrom
ronakmaheshwari:develop
Open

feat: Added nginx reverse proxy cookbook#1501
ronakmaheshwari wants to merge 1 commit into
felddy:developfrom
ronakmaheshwari:develop

Conversation

@ronakmaheshwari

Copy link
Copy Markdown

Adds: Nginx reverse proxy cookbook (#1178)

Adds a cookbook under docs/cookbooks/nginx-reverse-proxy/ demonstrating
how to run Foundry behind an nginx reverse proxy with automatic
Let's Encrypt certificates via certbot, per the request in #1178.

This does not modify the base compose.yml — it's an opt-in cookbook,
per discussion in the issue (not everyone wants nginx / already runs
Traefik or Caddy).

What's included

  • compose.yml — foundry + nginx + certbot services
  • Bootstrap and final nginx configs (two-step cert acquisition flow)
  • README walking through setup end-to-end

Tested

  • Verified full flow: bootstrap HTTP config → cert issuance →
    swap to HTTPS config → renewal service running.

Copilot AI lite review requested due to automatic review settings August 16, 2026 18:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new documentation “cookbook” under docs/cookbooks/nginx-reverse-proxy/ to demonstrate running Foundry VTT behind an nginx reverse proxy with Let’s Encrypt certificates managed by certbot, as an opt-in alternative to modifying the project’s main compose.yml.

Changes:

  • Introduces a dedicated docker-compose stack for foundry + nginx + certbot.
  • Adds nginx configuration intended to support ACME HTTP-01 challenges and reverse-proxying to Foundry.
  • Adds a step-by-step README for bootstrapping certificates and enabling HTTPS.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 9 comments.

File Description
docs/cookbooks/nginx-reverse-proxy/README.md Cookbook walkthrough and operational notes for nginx + certbot setup
docs/cookbooks/nginx-reverse-proxy/nginx/conf.d/foundry.conf.bootstrap Bootstrap nginx config for initial ACME challenge + proxying
docs/cookbooks/nginx-reverse-proxy/nginx/conf.d/foundry.conf Additional nginx config template content (currently overlaps with bootstrap flow)
docs/cookbooks/nginx-reverse-proxy/compose.yml Example compose stack adding nginx + certbot alongside Foundry

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@@ -0,0 +1,19 @@
server {
listen 80;
server_name <foundry.example.com>;
Comment on lines +9 to +13
- `compose.yml` — full stack: `foundry`, `nginx`, `certbot`
- `nginx/conf.d/foundry.conf.bootstrap` — HTTP-only config used to
obtain the first certificate
- `nginx/conf.d/foundry.conf.example` — final HTTPS config, used
after the certificate exists
mkdir -p nginx/conf.d nginx/certs nginx/www data
```

3. Copy the bootstrap config and edit `server_name` which is named as foundry.example.com:
Comment on lines +30 to +32
4. Edit `compose.yml`: set `FOUNDRY_USERNAME`, `FOUNDRY_PASSWORD`,
`FOUNDRY_HOSTNAME`, and `server_name` to your domain.

Comment on lines +40 to +42
docker compose run --rm certbot certonly --webroot \
-w /var/www/certbot -d <your>.domain.com \
--email <you>@example.com --agree-tos --no-eff-email
environment:
- FOUNDRY_PASSWORD=<your_password>
- FOUNDRY_USERNAME=<your_username>
- FOUNDRY_ADMIN_KEY=atropos
Comment on lines +82 to +90
certbot:
image: certbot/certbot
volumes:
- ./nginx/certs:/etc/letsencrypt
- ./nginx/www:/var/www/certbot
entrypoint: >
sh -c "trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;"
networks:
- internal
Comment on lines +65 to +66
- Certificates renew automatically every 12 hours via the `certbot`
service loop. No newline at end of file
Comment on lines +40 to +42
server {
listen 80;
server_name foundry.example.com;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants