Change running port

How can I change running port from to ?

1 Like
   bench set-nginx-port site1.local 9001
      #bench set-nginx-port <SiteName> <Port>
      #nginx.conf already exists and this will overwrite it. Do you want to continue? [y/N]: y
   bench setup nginx
   sudo systemctl reload nginx

should work. Just one thing though…normally, if you need to use port 8001 instead of port 8000, there might already be an instance running on port 8000 - maybe check that too

I tried that already but when I run bench start it still runs in port 8001

Ah - OK - this setting only applies to production mode - if you’re running bench start it implies that you are running in development mode? to switch, run this…

sudo bench setup production frappe
#make sure that the username (frappe in the case above) matches the user you are using for your instance

this will change to production? Can I switch back to development after changing the port success?

Change relevant ports in common_site_config.json

And execute

bench setup procfile

Then bench start

about Procfile: