Here’s the shape, if it saves you the fiddling. Put it in the compose file rather than a cron:
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://localhost:3000/api/v1/trending >/dev/null || exit 1"]
interval: 5m
timeout: 10s
retries: 3
restart: unless-stopped
Port and path to match your setup, and use wget rather than curl unless you know the image ships curl, since a healthcheck that fails because the binary is missing looks exactly like a service that is down.
One catch: Docker marks a container unhealthy but won’t restart it for you. Either pair it with something like autoheal, which watches for that state, or keep your cron and have it check first and restart only on failure.
Either way you get the thing the blind hourly restart can’t give you: a log of how often it actually fired. Never, and you didn’t need the restarts. Constantly, and there’s a real bug worth chasing rather than a schedule papering over it.


The catch with putting NextDNS’s IPv4 addresses into Proton’s custom DNS is identification. Plain DNS to NextDNS only reaches your configuration through the linked IP, and behind the VPN that is Proton’s exit IP, which is shared and changes with every server. So the filtering and logs won’t reliably be yours. Custom DNS in Proton also only works with NetShield turned off.
What works better on Windows is encrypted DNS that carries your config ID itself: the NextDNS app, or the DoH address from your NextDNS setup page (it ends in your config ID) entered in the browser. That traffic just goes through the tunnel like any other HTTPS, so the VPN and NextDNS don’t fight over it. Worth checking with a leak test afterwards that queries actually show up in your NextDNS log.