HTTPS termination on Traefik

Hi, i’m using Traefik as a Load Balancer/Reverse Proxy and i’m trying to terminate SSL for Graylog on Traefik but couldn’t get it done. Graylog gives “Server currently unavailable” error. It works well without HTTPS.

My server config:

rest_listen_uri = http://X.X.X.X9000/api/
web_listen_uri = http://X.X.X.X:9000/
web_endpoint_uri =

Traefik Servers Config:

    backend = "graylog"
    entrypoints = ["https"]
    rule = ""
    X-Graylog-Server-URL = ";"
    url = "http://X.X.X.X:9000"

Thanks in advance

What’s the exact and complete error message?
What URI do you try to open and which URI does Graylog try to access?

The trailing semicolon looks wrong.

Semicolon didn’t change anything.

Here is the full error on Web Interface :

We are experiencing problems connecting to the Graylog server running on Please verify that the server is healthy and working correctly.
You will be automatically redirected to the previous page once we can connect to the server.

Do you need a hand? We can help you.
More details

If you’re accessing the Graylog web interface via HTTPS, you also have to access the Graylog REST API via HTTPS due to the mixed content policy of modern browsers.

Make sure to read the documentation:

Still the same error :

Error - the server returned: 404 - cannot POST (404)

So here is what i’ve tried so far:

Split the api and web interface to two different ports 8000/9000 and gave uri’s as IP’s

rest_listen_uri = http://server_ip:8000/api
web_listen_uri = http://server_ip:9000/
web_endpoint_uri = http://server_ip:8000/api
rest_transport_uri = https://server_ip:8000/api/

gave uri’s as domains:

rest_listen_uri = http://X.X.X.X:8000/api
rest_transport_uri =
web_listen_uri = http://X.X.X.X:9000
web_endpoint_uri =

If i give everything as domain server crashes at startup so that’s definitely wrong.

2 server configurations for both api and web interface on Traefik that i’m extremely sure correct.

I can access the API from both public/private networks on web browsers.

I’m using private IP on configs and Traefik is routing traffic to them and i’m accessing both API and the interface through HTTPS.

Thanks in advance

If you only provide configuration snippets, we cannot help you.

Please provide the complete configuration of Graylog and Træfik, the URL you’re trying to access in your browser, and the complete error message for each combination you’ve tried.

Okay, i thought only those would be relevant. Full configs:

Traefik server conf :

  backend = "graylog"
  entrypoints = ["https"]
    rule = ""
    #X-Graylog-Server-URL = ""
  backend = "graylogapi"
  entrypoints = ["https"]
    rule = ";Path:/api"
    url = ""
    url = ""  

And here is full graylog-server conf:

Hello I just achieved what you want to do on my own test setup and here is what I did.

  1. Graylog configuration
    I only defined the following parameters in server.conf
rest_listen_uri = http://<localipaddress>:<graylog port>/api
web_listen_uri = http://<localipaddress>:<graylog port>

I left the API on the same port as you can notice

  1. Traefik configuration
    I defined a redirect of all http trafic to https
        address = ":80"
          entryPoint = "https"
        address = ":443"

Then in the frontends I defined my Graylog rule

      backend = "graylog"
      passHostHeader = true
        X-Graylog-Server-URL = "https://<your public hostname>/api/"
        rule = "Host: <your public hostname>"

I use a rule based on the requested hostname

Then in backend configuration

        url = "http://<localipaddress>:<graylog port>"

It looks like it is working correctly (just configured it a few minutes away) and I can access all menus / functions of my graylog setup.
Hope it helps …

I’ll try this and get back asap thanks a lot!

Edit: It’s working now, i’m very grateful thank you so much!

@sebpon It would be great if you could contribute the configuration to the Graylog documentation:

Hello @jochen,
no problem I’ll have a look at how I can contribute and will do it when I get some spare time.
Happy I could help.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.