Restarting proxy with self-signed certificate causes proxy container to crash-loop

I mount my SS-cert in docker compose with:
- ../OR-certs/certs/edge.pem:/etc/haproxy/certs/00-custom

If the docker project happens to self-restart (as it should). The proxy seems to delete the given certificate and crash loop (similar issue). This is fixed by running docker compose up; docker compose up -d

As I am quite unexperienced with SSL and shell-scripting etc. i asked claude if i was doing something incorrectly - but it came back saying that there might be some relic code / logic that overrides the self-signed certificate:

“”" This is from claude so take it with a grain of salt

The actual failure is a different, dangling file: /etc/haproxy/certs/00-cert. Looking at the entrypoint logic, this file is a symlink created by the add() function whenever a real domain gets a Let’s Encrypt cert — it points to a first domain’s cert file inside CERT_DIR to take precedence over the self-signed cert. But critically:

add() explicitly skips IP addresses (there’s an IP_REGEX check that bails out early for anything that looks like an IP or a bare hostname).

Your DOMAINNAME/DOMAINNAMES is 192.168.1.xx — an IP — so under the current script logic, that symlink should never get (re)created.

That strongly suggests this symlink is a leftover artifact — likely from an earlier point where OR_HOSTNAME was a real domain (or from before an image update), a real cert got issued and symlinked, and at some point the target file in CERT_DIR was cleaned up by the “remove obsolete certs” logic in cert_init()

“”"

I tried creating an issue on the openremote/proxy github page, but the issue page will not load for some reason (:heart: microsoft :slight_smile:).