What is the purpose of the "bench setup production" command?

Okay, I have been reading the revised automated install instructions to gain some clarity on exactly how to run the install.py script. The instructions say to:
1.) Download the install script
(I used the download command for linux on a fresh Debian 8 server using the frappe user account)

2.) Run the install script
( I used “sudo python install.py --production” from the frappe user account per the instructions)

Then the instruction set goes into the last 2 topics:
What will the script do?
Here it briefly explains the 4 steps the script fulfills.

How do I start ERPNext?
This is the step where I am posing my question. Since I used a production install, am I now also supposed to follow the link to “Setup Production”
And run the command listed there: sudo bench setup production

This is where I get confused. So right after the install, am I supposed to follow the link and run the command to setup the production server, or am I supposed to just log into the ERPNext system as Administrator and begin my configuring of the system users, accounts, etc?

If I am not supposed to run the bench setup command, then why is it part of the instructions section?

If I am supposed to run it, then what happens if I had already logged in as Administrator to the ERPNext system before doing this step?

Or, is this command used to change the server type from a developer server to a production server, and if so, then why is it part of the easy install instructions and not listed elsewhere under a different topic?

Some guidance here please.


If you are running the install script with the --production flag as you mention in step 2 above, there is no need to run bench setup production as that is done automatically during installation.

The command installs nginx and supervisor, and configures them, as well as configures redis and socketio. This command has nothing to do with having a server in “developer” or “production” mode (which can be confusing considering terminology is the same).

If you’re following the steps 1 and 2 you mentioned above, you should be good to go.

Here is reading on the topic: https://frappe.github.io/frappe/user/en/bench/guides/setup-production.html
Setup Production

Thank you. I had so mich trouble with my first attempt to get a server running, I thougjt I would ask to be sure.