Part 5 — The Day nginx Refused to Move

There is a special kind of confusion that only reverse proxies can produce.

The symptoms were deceptively simple:

  • DNS resolved correctly

  • the public IP worked

  • HTTPS partially worked

  • but Caddy stubbornly refused to start properly.

Eventually the culprit revealed itself:

nginx was already occupying ports 80 and 443.

Which sounds obvious in hindsight.

But after several hours of debugging Docker networking, container exposure rules, and reverse proxy configuration, it took embarrassingly long to remember one important principle:

Only one process can own a port.

nginx had quietly been serving earlier Nextcloud experiments.
Caddy wanted to become the new single point of entry.

The infrastructure had effectively reached a fork in the road:

  • continue building around nginx
    or

  • fully embrace Caddy

Caddy won.

Not because nginx is bad.
But because Caddy’s automatic HTTPS and clean configuration style fit the project philosophy beautifully.

The migration itself was oddly dramatic for such a small architectural change.

The moment nginx was finally stopped and disabled:

Caddy immediately obtained valid TLS certificates.

And suddenly:

music.davidrelich.cz loaded securely.

No warnings.
No invalid certificates.
No VPN.
No Cloudflare tunnel.

Just:

  • DNS

  • router forwarding

  • Caddy

  • and a Raspberry Pi quietly serving a music platform to the public internet.

That moment felt absurdly satisfying.

It was also the exact point where the homeserver stopped feeling like:

“a box under the television.”

And started feeling like:

“a small independent internet service node.”

Which is a deeply dangerous realization for any technically curious person.

Because once HTTPS certificates start appearing automatically, infrastructure suddenly feels less like black magic and more like a creative medium.

That is how people accidentally end up operating increasingly elaborate systems.

Fortunately, there was still one final challenge waiting:

Nextcloud.

And Nextcloud, as always, had opinions.