Home: Table of Contents | Previous: 2.2 Getting Help | Next: 3.1.3 Wonderful World of git |
3.0 ERPNext Installation, Upgrades and Backups
3.1 Frappe Bench
Frappe bench
is more than a program written in python. It is a workhorse that an administrator uses to manage a large amount of low level tasks for administrating ERPNext. Frappe bench
is the first thing installed besides the base dependencies and is the first tool an administrator will go to when doing work with an ERPNext installation outside of the user interface.
ERPNext should be installed in a user directory on the Linux server and will run as that user. During installation this user should have sudoer
rights, however after installation and in runtime in production environments this user should be unprivileged and should not have sudoer
rights. The user must not be root
either.
Best practice is to logon to the server with a regular user that has sudoer
rights. Don’t logon as root
. Use the sudo
command to do any privileged work on the server. When working with bench
, logon with the regular user and su
to the erpnext
user like this:
sudo su - erpnext
cd [bench name]/
NOTE: Using the dash ` - ` in the command, tells su
that you want a login shell. This simulates the administrator logging into the server as that user and loads a full environment for you.
3.1.1 Frappe Bench Operating Environment
Once you have logged on to the server and become the erpnext
user, you are ready to get to work with bench
. During installation, bench will create the following directory structure:
- apps – The code is downloaded from GitHub to here
- erpnext
- frappe
- [other installed apps]
- archive – Archived backups
- archived_sites – Archived Sites
- config – Various configuration files
- pids – Process ID Files
- env – The
bench
operating environment- bin –
python
executables and scripts - include – Links to python includes
- lib – Python libraries
- local – Python local
- selenium – Web browser automation tool
- share –
man
pages - src – Other utilities like
mysqlclient
andpdfkit
.
- bin –
- logs – Various log files.
- node_modules – ERPNext uses a collection of
NodeJS
modules. The are installed here. - sites – The top level directory for all sites on the installation.
bench
can manage multiple sites in one environment. If you are running in a multi-tenant environment you will see more than one [site name] directory.- [site name] – The name of the site. Usually is the same as the URI for the site.
- error-snapshots
- locks
- private – Private file attachments to various documents inside the user interface are stored on the filesystem here.
- backups – Backups for the site are stored here. See 3.4 Backups
- public – Public file attachments to various documents inside the user interface are stored on the filesystem here.
- task-logs
- [site name] – The name of the site. Usually is the same as the URI for the site.
3.1.2 Frappe Bench Commands
Administrators need to be comfortable with the frappe bench
command structure.
There is a cheat sheet available that is a good start.
Home: Table of Contents | Previous: 2.2 Getting Help | Next: 3.1.3 Wonderful World of git |