Staging / Test environment?

Hi, does anyone have any advice on how best to set up a Staging environment?

I would like to provide a test version of ERPNext to allow end users to become familiar with the system, ideally we’d like it to be a copy of the production environment in terms of data and system configuration. Note: we are using Frappe cloud.

To set up a Staging environment in Frappe/ERPNext:

  1. Create a new site on your server or another server.
  2. Backup your production site using bench backup and restore it to the staging site using bench restore.
  3. Copy site config and common_site_config.json if needed.
  4. Set a different DB and Redis port if hosting on same server.
  5. Disable email or set dummy SMTP to prevent accidental emails.
  6. Update site name and branding if required.
  7. Use bench start or set up as production with bench setup production.

Now you have a near-identical test system.

2 Likes

You can also remove the “encryption_key” value in site_config.json to be even more safe, this will make all “Password” fields invalid. Note that some settings may store passwords in plain text such as SMS Settings iirc. Also check your “Notification” and Slack webhooks / Frappe Webhooks.

2 Likes