server
server copied to clipboard
acme/autocert: host not configured in HostWhitelist
Can the issue be reproduced with the latest available release? (y/n) y
Which one is the environment gotify server is running in?
- [x] Docker
- [x] Linux machine
Docker startup command or config file here (please mask sensitive information)
version: "3"
services:
gotify:
restart: always
image: gotify/server
ports:
- 80:80
- 443:443
environment:
- GOTIFY_DEFAULTUSER_PASS=mypass
- GOTIFY_SERVER_SSL_ENABLED=true
- GOTIFY_SERVER_SSL_LETSENCRYPT_ENABLED=true
- GOTIFY_SERVER_SSL_LETSENCRYPT_ACCEPTTOS=true
- GOTIFY_SERVER_SSL_LETSENCRYPT_HOSTS=- myhost.com\n- www.myhost.com
volumes:
- "./gotify_data:/app/data"
Do you have an reverse proxy installed in front of gotify server? (Please select None if the problem can be reproduced without the presense of a reverse proxy)
- [x] None
- [ ] Nginx
- [ ] Apache
- [ ] Caddy
Reverse proxy configuration (please mask sensitive information)
On which client do you experience problems? (Select as many as you can see)
- [x] WebUI
- [x] gotify-cli
- [ ] Android Client
- [ ] 3rd-party API call (Please include your code)
What did you do? Tried to use the let's encrypt feature
What did you expect to see? Working SSL
What did you see instead? (Include screenshots, android logcat/request dumps if possible) docker logs 2023/03/29 13:18:11 http: TLS handshake error from someip: acme/autocert: host "myhost.com" not configured in HostWhitelist other errors: http: TLS handshake error from someip: acme/autocert: server name component count invalid http: TLS handshake error from someip: acme/autocert: missing server name
Also: no certs folder in /app/data
Yeah, this is a bug. It somehow doesn't work when multiple list elements are defined in the envvar. As a workaround, you can define only one domain as host like this:
version: "3"
services:
gotify:
restart: always
image: gotify/server
ports:
- 80:80
- 443:443
environment:
- GOTIFY_DEFAULTUSER_PASS=mypass
- GOTIFY_SERVER_SSL_ENABLED=true
- GOTIFY_SERVER_SSL_LETSENCRYPT_ENABLED=true
- GOTIFY_SERVER_SSL_LETSENCRYPT_ACCEPTTOS=true
- GOTIFY_SERVER_SSL_LETSENCRYPT_HOSTS=- myhost.com
volumes:
- "./gotify_data:/app/data"
or you can define the config as yaml at /app/config.yml
.