Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

acme/autocert: host not configured in HostWhitelist #558

Open
5 of 10 tasks
Snify89 opened this issue Mar 29, 2023 · 1 comment
Open
5 of 10 tasks

acme/autocert: host not configured in HostWhitelist #558

Snify89 opened this issue Mar 29, 2023 · 1 comment
Labels
a:bug Something isn't working

Comments

@Snify89
Copy link

Snify89 commented Mar 29, 2023

Can the issue be reproduced with the latest available release? (y/n)
y

Which one is the environment gotify server is running in?

  • Docker
  • 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)

  • 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)

  • WebUI
  • 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

@Snify89 Snify89 added the a:bug Something isn't working label Mar 29, 2023
@jmattheis
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:bug Something isn't working
Development

No branches or pull requests

2 participants