Development to production issues

After installing erpnext it work fine on development but when i switch to production i can no longer erpnext. the website is not showing properly.

hello and welcome to the community

is there any error printed in the terminal or web browser console, those can help us understand the problem also which command did you use to switch to production?

Here’s the screen after installing under development.

i use the command sudo bench setup production erpuser and got no error.
here’s the webpage on production.

if i click the login nothing happens.
Please Help.

This is likely a permissions issue, where nginx can’t access files for serving. Check your nginx logs.

Just run the following command from your bench folder:

bench build

Kind regards,

sorry just new in linux. don’t know what to look for.
this is the latest error log.

and the access log

try it. it still the same
this is the result of bench build

The error log explains what you’re seeing. The files listed there, such as /home/erpuser/frappe-bench-sites/assets/css/login.css are inaccessible to your nginx user (which is probably www-data). If you run the command:

ls -al /home/erpuser/frappe-bench-sites/assets/css/login.css

You’ll be able to see what your server’s current permission set for that file is.

I run the command and here’s the result

it show that it has access to the files right?

You probably need to set the execute bit on parent folders. Generally speaking, files can be 644 but directories need to be 755, I believe. You might have to step through each directory and run a chmod 755 command on each of the directories individually.

did what you recommended but nothing change. still getting the same site and error in log. can i use development for my business? will there be an issue? Thanks for your help.

Did you run bench setup requirements as suggested in your screenshot? If not, try running

bench setup requirements

After that,

bench build


Are you still getting the same error in your nginx logs?

Production is definitely recommended for live sites, but if you can manage development there’s no reason it won’t work.

Hosting your own manually installed instance using going to be messy if you’re not comfortable with system administration. If you haven’t looked at it yet, I’d suggest at least considering the docket deployment.

Yes, I did. still no change.

Hi peterg

Thanks. will try docket. I plan to use it as onsite and access thru LAN.