Skip to main content

Sites in Frappe Framework v15

What Is a Site in Frappe Framework?

A Site in Frappe Framework v15 is an isolated tenant that contains its own database, files, users, and configuration. Every ERPNext instance runs inside a site. Multiple sites can coexist on a single bench while remaining fully independent.
In simple terms, one site equals one ERPNext system.

Why Are Sites Important in ERPNext?

Sites are the foundation of Frappe’s multi-tenant architecture, enabling secure separation of data and configurations.

Key Benefits

  • Complete data isolation
  • Independent users and permissions
  • Separate databases per site
  • Easy hosting of multiple ERP systems

This design makes Frappe ideal for SaaS and enterprise deployments.

Who Works with Frappe Sites?

Target Audience

  • System Administrators
  • DevOps Engineers
  • ERPNext Hosting Providers
  • ERP Implementation Teams

Technical Prerequisites

  • Frappe Framework v15
  • Bench-managed environment
  • Basic Linux and database knowledge

How Does a Frappe Site Work?

Each site in Frappe Framework v15 includes:

  • A dedicated database (MariaDB/PostgreSQL)
  • A site configuration file (site_config.json)
  • Private and public file storage
  • Installed apps list
  • Independent users and permissions

Requests are routed to the correct site based on domain or hostname.

What Is a Bench and How Does It Relate to Sites?

A Bench is the parent environment that manages apps and multiple sites.

Relationship

  • One bench → multiple sites
  • Each site → multiple apps
  • Apps are shared, data is not

This allows efficient resource usage while maintaining strict tenant isolation.

How Are Sites Organized on Disk?

Each site resides inside the sites directory of a bench.

Typical Structure

  • sites/site1.local
  • sites/site2.local
  • sites/common_site_config.json

Each folder represents a fully independent ERPNext instance.

How Are Apps Installed on a Site?

Apps are installed per site, not per bench.

Key Concept

  • A site can choose which apps to install
  • Another site on the same bench may use a different app set
  • This flexibility enables custom solutions for different clients.

Real-World ERPNext Use Cases for Sites

Industry Relevance

  • SaaS ERP providers hosting multiple clients
  • Enterprises running staging and production systems
  • Consultants managing multiple customer ERPNext instances
  • Developers maintaining test and demo environments

Sites enable scalable ERPNext hosting.

Best Practices for Managing Frappe Sites

  • Use separate sites for production, staging, and testing
  • Enable backup encryption for production sites
  • Apply updates carefully per site
  • Maintain strict access controls
  • Monitor site-specific logs and backups

Common Misconceptions About Sites

“One Bench Means One ERPNext”
Incorrect. A single bench can host multiple independent ERPNext sites.

“Sites Share Data”
No. Sites share code (apps), not data.

Advanced Site Concepts

Single-Tenant vs Multi-Tenant

Model Description
Single-Tenant One site per customer
Multi-Tenant Multiple sites on one bench

Frappe supports both models natively.

Integration Patterns

Sites integrate with:

  • Backup & restore system
  • Domain and DNS mapping
  • SSL and reverse proxy (NGINX)
  • Cloud storage and monitoring tools

This makes Frappe suitable for enterprise-grade deployments.

Troubleshooting Common Site Issues

Site Not Loading

  • Verify database connectivity
  • Check site configuration files
  • Ensure correct domain routing

Permission or Login Issues

  • Confirm user roles
  • Verify site-specific users
  • Clear cache if needed

Official References (Verified)

Sites Basics (v15):

https://docs.frappe.io/framework/user/en/guides/basics/sites

Frappe GitHub (v15):

https://github.com/frappe/frappe/tree/version-15

Rating: 5 / 5 (2 votes)