Octoprint Traefik

What is the problem?

Getting Octoprint to show up on my domain under a subdomain I keep getting a "Bad Gateway" Error.

Any help is greatly appreciated.

What did you already try to solve it?

I have looked at all the information that I can find on how to set up traefik with Octoprint.

Have you tried running in safe mode?

Not Applicable

Did running in safe mode solve the problem?

Not Applicable

Systeminfo Bundle

You can download this in OctoPrint's System Information dialog ... no bundle, no support!)

Bundle attached

Additional information about your setup

OctoPrint version, OctoPi version, printer, firmware, browser, operating system, ... as much data as possible

Manjaro Linux

Here is my traefik file for Octoprint

http:
  routers:
    octoe3p1-rpi-rtr:
      rule: "Host(`octoe3p1.{{env "DOMAINNAME_CLOUD_SERVER"}}`)"
      entryPoints:
        - https
      middlewares:
        - chain-oauth
        - octoe3p1-rpi-add-admin
      service: 
        - octoe3p1-rpi-svc
      tls:
        certResolver: dns-cloudflare
  middlewares:
    octoe3p1-rpi-add-admin:
      addPrefix:
        prefix: "/"
  services:
    octoe3p1-rpi-svc:
      loadBalancer:
        servers:
          - url: "https://localhost:5000"  # or whatever your external host's IP:port is 

I have 13 docker containers working properly with domain name. This is the only non-docker instance that I currently have.

octoprint-systeminfo-20231010140428.zip (5.3 KB)

When you are accessing the reverse proxy test page, what is the URL in your browser? This is designed to be used going through the proxy, not when you access OctoPrint directly.

I cannot even access the reverse proxy test page. below is the traefik access log when I try and access octoprint.

In a discord for support, i was asked the following. Can someone answer?
Specifically, is it bound to 127.0.0.1 only ? Or is it bound to 0.0.0.0 for example.

By "it" you mean OctoPrint? That depends entirely on how its started. By default, it will bind to 0.0.0.0 and also the ipv6 equivalent if support is detected. But that can be overridden with the --host parameter, and on OctoPi at least, OctoPrint ships with --host 127.0.0.1 to restrict listening interfaces to just localhost.

OctoPrint will log on what interfaces it is listening on during server start. Sadly, that bit was no longer part of the log in your systeminfo bundle..

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