Octopi change webinterface port

How can i change the webinterface port to something other like 1000?

Im allready hosting a webserver on port 80 wich means that i cant use port 80 for the octopi interface

Greets

normally octoprint runs on port 5000

1 Like

My interface runs on the default webport 80

Quote:

You'll need to edit /etc/haproxy/haproxy.cfg for that. There are lines that look like this:

frontend public
       bind *:80
       bind 0.0.0.0:443 ssl crt /etc/ssl/snakeoil.pem

You'll need to change the 80 in bind *:80 if you want to change the http port, and the 443 in bind 0.0.0.0:443 ssl crt /etc/ssl/snakeoil.pem if you want to change the https port.

(don't forget to restart service after. I rebooted my Pi.)

As mentioned by @foosel in this post from 2017.

In my case, I removed the bind *:80 to allow a webserver to run, and now I access my OctoPi with https://ip_address instead.

1 Like

The current config looks like this:

frontend public
        bind :::80 v4v6
        bind :::443 v4v6 ssl crt /etc/ssl/snakeoil.pem
        option forwardfor except 127.0.0.1
        use_backend webcam if { path_beg /webcam/ }
        default_backend octoprint

and if i change it to this:

frontend public
        bind :::6000 v4v6
        bind :::6001 v4v6 ssl crt /etc/ssl/snakeoil.pem
        option forwardfor except 127.0.0.1
        use_backend webcam if { path_beg /webcam/ }
        default_backend octoprint

it dosnt work anymore

What does "doesn't work" mean?

i cant acess the interface anymore and it dosnt mater what port i use

Attention with the choosen port!
Some browsers (e.g. Firefox) are blocking ports that are "normaly not used for internet activity"
Auswahl_239

2 Likes

Yea, that's the same behavior: "ERR_UNSAFE_PORT"
Try it with a port in the 5xxx (5001 works fine for me).

1 Like

Now i have set it to 5000 for http and 5001 for https and it says
" 400 Bad request
Your browser sent an invalid request."

5000 cannot work because this port is bind to the backend at localhost (127.0.0.1),
as I said 5001 should work fine for the public frontend

3 Likes

it works now thanks :slight_smile: