Installing Frappe in an Existing Production Environment (Apache + MariaDB) Without Overriding

Hello everyone :waving_hand:,

I’m planning to install Frappe / ERPNext in an already production-ready environment and I’d appreciate guidance from the community.

Current Environment

  • Apache (already configured and in use)

  • MariaDB (already installed, tuned, and used by other services)

  • Production server — so avoiding any unintended changes is critical

My Concern

I want to ensure that the Frappe/Bench installer does NOT:

  • Reinstall MariaDB

  • Override or modify the existing MariaDB configuration (my.cnf)

  • Change existing database users, ports, or tuning

  • Affect other applications currently using MariaDB

From the documentation, the standard workflow uses commands like:

bench --site example.com install-app erpnext yourapp

However, it’s not fully clear to me whether:

  • Bench assumes control over MariaDB

  • Or whether it can be instructed to strictly use existing DB credentials and configuration only

What I’m Looking For

  • Is there a production-safe installation method for Frappe that works with:

    • An existing Apache setup

    • An existing MariaDB installation

    • and skip redis or replace it with an alternative if needed

  • Is there a custom installer flag, command, or script that allows:

    • Providing existing MariaDB credentials

    • Preventing any DB reinstallation or config changes

  • Any recommended best practices for installing Frappe in shared or pre-built infrastructure

If this is already supported but undocumented, or if there’s a recommended workaround (manual DB creation, flags, environment variables, etc.), I’d really appreciate clarification.

Thanks in advance for your help :folded_hands:
Looking forward to your guidance and best practices.

Following tasks need db root creds

  • new site
  • drop site
  • restore backup

install app uses db credentials and not db root credentials.

Thank you revant_one for your assistance :folded_hands:
I’m happy to share that I’ve finally built it natively on our system using Bench, without affecting any of the currently installed apps or tools on the system.

I’d appreciate some clarification from the community on the following points:

Difference between development and production mode

  • What are the key technical and operational differences between dev mode and production mode in Bench/Frappe?

  • What should not be used in production that is acceptable in dev?

Running in production

  • What is the recommended command or approach to run the setup properly in production?

  • Is bench start ever acceptable, or should we strictly rely on supervisor/systemd with bench setup production?

Cron jobs & background tasks

  • What cron jobs are mandatory or recommended to ensure apps run smoothly?

  • Which background tasks should be explicitly monitored to ensure queues, schedulers, and workers are operating as expected?

Thanks in advance to everyone for the guidance and shared experience.