folder_openProject schedule3 min read update3 Nov 2026

This docs site is Hugo with the Lotus Docs theme, built inside Docker and served as static files by nginx.

Traffic path

Browser → host nginx (ports 80/443, TLS) → Docker container (hermes-docs, host port 8085) → nginx inside the container serving the built site.

Project folder

/mnt/Hermes-Brain-Doc on the server.

Docker commands

TaskCommand (in /mnt/Hermes-Brain-Doc)
Statusdocker compose ps
Logsdocker compose logs -f docs
Stopdocker compose down
Start without rebuilddocker compose up -d
Rebuild after changesdocker compose up -d --build

The container has restart: unless-stopped, so it comes back after a server reboot.

Rebuild and redeploy

  cd /mnt/Hermes-Brain-Doc
docker compose up -d --build
  

This runs the Hugo build inside Docker and replaces the container. Downtime is only a few seconds. Hard-refresh your browser to see the change.

Preview locally

  cd /mnt/Hermes-Brain-Doc
hugo server
  

Serves at http://localhost:1313. Requires Hugo Extended and Go on your machine.

Files that matter

  • Dockerfile — multi-stage build. Hugo builds the site with baseURL https://hermes-second-brain.mistrysiddh.in/, then nginx serves the output.
  • nginx.conf — config inside the container.
  • docker-compose.yml — defines the single docs service. Port 8085 is bound to 127.0.0.1 only (not public).
  • hugo.toml — site-wide settings (title, menus, theme options).
  • go.mod / go.sum — pin the Lotus Docs theme (v0.3.0), downloaded from GitHub.

Updating the theme

  hugo mod get -u
  

Then rebuild with docker compose up -d --build.

Domain, DNS and host nginx

  • DNS: an A record for hermes-second-brain points to the server IP, 200.97.175.246. Update this if the server moves.
  • Host nginx config: /etc/nginx/conf.d/hermes-second-brain.mistrysiddh.in.conf
    • Port 80 redirects to HTTPS and allows the certbot challenge.
    • Port 443 terminates TLS and proxies to http://127.0.0.1:8085.
    • After any edit: nginx -t && systemctl reload nginx.
  • TLS certificate: Let’s Encrypt, in /etc/letsencrypt/live/hermes-second-brain.mistrysiddh.in/, valid until 1 Feb 2027. Renew with certbot renew. Test with certbot renew --dry-run.

Changing the domain

Update four places:

  1. The DNS A record
  2. server_name and certificate paths in the host nginx config
  3. --baseURL in the Dockerfile
  4. baseURL in hugo.toml

Then get a new certificate with certbot certonly and rebuild.

Version control

The project folder is a git repository. Commit content changes:

  cd /mnt/Hermes-Brain-Doc
git add -A
git commit -m "Update docs"
  

public/, resources/, and node_modules/ are git-ignored.

Troubleshooting

IssueFix
Page not updatingCheck the rebuild ran, then hard-refresh the browser
502 Bad GatewayContainer is down. Run docker compose ps and docker compose up -d
Certificate warningCertificate expired or renewal failed. Run certbot renew
Build failsRun docker compose build and read the Hugo error — usually a front-matter or shortcode typo in a content file