Octopi port change-correct procedure

Hi, I need Your help.

I know that octopi listens on port 5000 on localhost.
The problem is that I can't do a port forward 'cause my modem's ports under 15000 are blocked, so I've to change port of octopi.

I've tried to modify etc/haproxy/haproxy.cfg's file with a text editor; all goes right but when i try to save i receive and error and file doesn't change.

It's for sure my fault: which is the corrext procedure to solve the problem?

Octopi's running on a raspberry pi4 8gb.

Tnx!

Fabio

Hello @Fabio999 !

There are better and more secure ways than port forward OctoPi/OctoPrint to have a remote access.

What's the error you get when you try to write the file? Are you writing it as a privileged user (pi)? What are the file permissions set to?