Manual Install ERPnext in ubuntu 22.04 with portainer change upstream server port other than 8000

I need help to change to change upstream server port 8000 for Manual install of ERPNEXT production setup (webserver port), As i need to setup protainer container which also uses port 8000

i already tried the following

bech set-nginx-port
change webserver port in common site config and run bench run procfile
bench --site site_name set --port port_number

non worked
version details below
bench 5.16.2
| erpnext | 14.20.3 | version-14
| frappe | 14.31.0 | version-14


If you are setting up ERPNext production, it will use port 80.


yes for nginx it uses port 80 for external access but the webbserver of erpnext is in port 8000 which is upstream server. i cannot change it that’s the problem

specify another port for portainer with --tunnel-port CLI configuration options - Portainer Documentation

for bench, set webserver_port in common site config and execute bench setup supervisor to re configure supervisor. Restart supervisor.

yes this worked thanks

I’m using the erp production, but unable to access from other lan, can you please share the steps,
here are my details- eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet netmask broadcast
inet6 fe80::215:5dff:fe00:f3e5 prefixlen 64 scopeid 0x20
ether 00:15:5d:00:f3:e5 txqueuelen 1000 (Ethernet)
RX packets 937744 bytes 1387327033 (1.3 GB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 369760 bytes 41417828 (41.4 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0