Guide for ERPNext V14 switching from Developer to Production Mode using Docker

Hi everyone. I’m Abu, I’ve recently begun working on a project on ERPNext. From my searches on google and Github I figured there are 2 modes: developer and production mode. I installed the ERPNext Version 14 using VS Code and Docker on my Windows 11. I’ve used the following guide to install the software: ERPNext 14 docker installation guide
Now, I have looked over multiple sites and in this forum as well to help me find a guide to help switch from Developer to Production mode. I think if I am using https://localhost:8000 it is in developer mode and if I am using https://localhost then it is in production mode?
The developer mode works fine, I think since I get a prompt to sign in and then it shows the ERPNext Website. However, the page for the https://localhost does not load at all.

These are some of the steps I followed (I do not recall how I set up the supervisor and nginx):

  1. I stopped the developer mode by clicking Ctrl+C in the terminal in VSCode
  2. Then started supervisor and nginx
  3. Then I tried bench setup production frappe (This gives me the Warning; WARN: superuser privileges required for this command)
    I tried entering https://localhost into my browser, however, it simply says: The site can’t be reached.
    I have attached a screenshot of my terminal

Can I request if I could receive some advice or link to guides that could help me switch from developer to production mode and vice versa?

P.S. I might have butchered some terminologies or ideas, but feel free to question them since I am not a software developer I just recently started learning stuff. Thank you all.

production is different.

you are using development setup. it helps you setup version 13 and 14 benches for custom app development

for production setup check GitHub - frappe/frappe_docker: Docker images for production and development setups of the Frappe framework and ERPNext

also check faq Frequently Asked Questions · frappe/frappe_docker Wiki · GitHub

1 Like

Hi, @revant_one, thank you I’ll check those links out

Hi @revant_one,
I had checked out the setup last week and it would seem that in the sub-heading “Setup Options” there are 2 different ways to set up Frappe and ERPNext - one without proxy and external MariaDB and Redis, while the other being containerized MariaDB and Redis with Letsencrypt certificates.
So, I am trying out the latter option, which requires me to set LETSENCRYPT_EMAIL and SITES environment variables in .env file or certificates won’t work. My understanding after reading the environment variables file is that:

  1. LETSENCRYPT_EMAIL value is any email that I use in case I am required to ensure that the https certificates are being registered.
  2. As for the SITES value, the, doesn’t specify anything. Meanwhile in the .env file there are 2 links right above the SITES variable: Link 1 | Link 2. What do I put in the SITES variable? Could you please guide me, since I did not understand this part?

In case, the SITES variable takes the site name I created in development mode (let’s say e.g., does this mean while I set up production I also need to have the bench running (so that the site is running) in development mode?
Thank you.

  • SITES variable holds site names quoted in back quote ( ) and separated by comma, e.g. ``,` ``
  • DO NOT set development mode in production setup.

Read FAQ for custom apps

Noted. Then is there a requirement to have a website, since we’re asked to fill in the site details? Or is it the name of the site we want to create (that doesn’t exist), like my example

DNS “A Name” for the domain name (site name) should point to static IP of the server/VM then only letsencrypt will work.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.