Skip to content
This repository has been archived by the owner on Apr 20, 2022. It is now read-only.

Octoprint not accessible with local network IP #15

Open
nikil511 opened this issue Sep 30, 2020 · 1 comment
Open

Octoprint not accessible with local network IP #15

nikil511 opened this issue Sep 30, 2020 · 1 comment

Comments

@nikil511
Copy link

works with balena public IP but not with local one.
I guess it has to do with traefik settings

@MatthewCroughan
Copy link
Owner

Yes, this is how it is currently configured. It only allows traffic in if the host: header is *.balena-devices.com OR *.local OR *.localdomain OR *.lan.

As can be seen in the traefik.http.routers.<entrypoint/frontend>.rule definitions

traefik.http.routers.octoprint-balena.rule: 'HostRegexp(`{subdomain:[a-zA-Z0-9\-]+}.balena-devices.com`)'

traefik.http.routers.octoprint.rule: 'HostRegexp(`{subdomain:[a-zA-Z0-9\-]+}.local`) || HostRegexp(`{subdomain:[a-zA-Z0-9\-]+}.localdomain`) || HostRegexp(`{subdomain:[a-zA-Z0-9\-]+}.lan`)'

traefik.http.routers.octoprint-insecure.rule: 'HostRegexp(`{subdomain:[a-zA-Z0-9\-]+}.local`) || HostRegexp(`{subdomain:[a-zA-Z0-9\-]+}.localdomain`) || HostRegexp(`{subdomain:[a-zA-Z0-9\-]+}.lan`)'

So, port 80/443 is owned by traefik. Traefik says you only get forwarded/proxied into the octoprint container on port 5000 IF those names match, if not then 404.

TL;DR

If you go to the IP address on port 5000 you will bypass Traefik and get directly through to Octoprint.

ports:
- '5000:5000'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants