When OpenEMR multisite setup fits several clinics
Multisite is the right choice when one organization runs several clinics or legal entities and wants them served from a single OpenEMR codebase. The setup is short: set $allow_multisite_setup to true in setup.php, open admin.php, and choose Add New Site. Each site gets its own configuration, and the wizard can clone the configuration of a source site and, optionally, its database. That means a new clinic can start with the same forms, settings and workflows as an existing one, while keeping its own patient data in its own database. Before you commit, confirm with the project's multiple sites module documentation which settings are shared across sites and which are per site, because that determines how much each clinic can differ.
A separate install is often the simpler choice when the entities have different owners, different compliance boundaries, different upgrade calendars or different hosting requirements. Multisite shares one code tree, so every site moves to the same OpenEMR release at the same time. If one entity needs to stay on an older version, or must be isolated for contractual or regulatory reasons, separate deployments are easier to defend. Ask each entity's compliance lead whether a shared codebase and shared administrators are acceptable before you choose.
Two warnings in the wiki should shape the plan. First, admin.php and setup.php are security-sensitive, so the wiki recommends reverting the setup.php change or deleting the file once sites are added. Treat that as a required step with an owner and a date, not an optional cleanup. Second, the wiki notes there is no way to back up multiple sites at once, so each site's database and document storage need their own backup job and restore test. Plan that work before go-live, and confirm the backup approach for your version with the vendor or a support partner.
Multisite options compared: shared codebase, separate installs and clone choices
This table compares running several clinics from one OpenEMR codebase with separate installs, and within multisite, cloning configuration alone versus configuration plus database. Read each column as a layout you could choose, then check the upgrade, backup and risk rows against your own governance requirements before deciding. The main takeaway is that multisite shares the code and upgrade cycle, so every site moves together and every site must be covered by the same security controls.
| Factor | One codebase, multiple sites | Separate installs per entity | Clone configuration only, or with database |
|---|---|---|---|
| Best fit | Related clinics under one governance model that accept a shared upgrade schedule | Entities with different owners, data rules, or upgrade timing, or that may be sold or separated later | Cloning configuration suits new sites with the same forms and settings; cloning the database suits sites that need the same starting records |
| What is shared | The OpenEMR code, the PHP runtime, the web server and the admin.php and setup.php scripts | Nothing by default beyond your own hosting team and naming conventions | The source site's configuration is copied; with the database option, its data is copied too |
| What is isolated | Each site's own database and sites directory, per the multisite design (confirm the exact layout in your version) | Code, database, documents, users and certificates for each entity | Clone target is a separate site, but it inherits settings and, if chosen, patient data from the source |
| Upgrade effort | One upgrade of the codebase covers all sites, so test once but plan a single change window for every clinic | Each install is upgraded separately, which multiplies testing and scheduling work | Same as the chosen layout; a cloned site must still be checked after any codebase upgrade |
| Backup effort | Confirm backups per site database and the sites directory; the wiki notes there is no way to back up multiple sites at once | Each install needs its own backup job and restore test | Cloned databases create extra copies of data that must be backed up and retained separately |
| Main risk | A fault in the shared code or a misconfigured setup.php affects every site at once | Configuration drift and inconsistent security settings across installs | Cloning the database can copy patient data into a site that should not hold it; confirm access rules before cloning |
| Security scripts | setup.php and admin.php must be reverted or removed after use, and the wiki calls both security-sensitive | Each install still needs its setup scripts removed after installation | Keep cloning access restricted and remove the multisite enablement once the work is finished |
| Questions to confirm | Which admin roles can add or clone sites, and how per-site data separation is tested | Who owns each install's hosting, backups and patching | Whether the cloned database includes documents and audit history, and whether your policy allows that copy |
How the sites share one codebase and keep separate data
The admin path starts when setup.php is switched on to allow multisite setup, then moves to admin.php, where an administrator adds a new site or clones an existing one. Each site gets its own folder under the sites directory and, depending on how it was created, either its own database or a shared one. Both setup scripts sit inside a trust boundary: once sites are configured, revert the flag or delete the file. Confirm that your web server blocks direct access to the documents folders under each site, since those files should never be served straight from the web root.
Generic layout of the admin path, shared codebase, per-site folders and data stores.
How to enable multisite and add the first clinic site
This sequence turns a working OpenEMR base installation into a multisite setup and adds the first additional clinic site as a separate, verified instance. Each step ends with a check so the next clinic is added only after the first one is confirmed to stand on its own.
Confirm the base installation and its requirements
Before touching any configuration, confirm that the existing OpenEMR installation runs and log in to the default site as an administrator. Check the release notes for the version you are running, and confirm it meets the PHP version and the MySQL- or MariaDB-compatible database requirements stated for that release. Record the current version, PHP version, database engine and the location of the sites directory, because you will compare against these values after each change. The step is complete when the base site loads, you can log in, and the versions match what your target release requires.
Back up the base site before changing it
Take a full copy of the application files, the sites directory and the database before editing setup.php or adding a site. The OpenEMR multisite documentation notes there is no way to back up multiple sites at once, so each site's database and documents need their own backup. Store the copies outside the web root and confirm you can restore one of them to a test host. The step is complete when a restore has been tested on a separate environment and the backup is recorded in your change log.
Enable the multisite flag in setup.php
Open setup.php in the OpenEMR root directory and set
$allow_multisite_setupto true. This flag is the only change needed to unlock the multisite administration function, so keep the edit minimal and do not change other settings in the same pass. Save the file and reload the base site to confirm it still loads without errors. The step is complete when the base site works normally and the flag is set in the file you saved.Open admin.php and choose add new site
Sign in as an administrator and open admin.php, the multisite administration page. Choose Add New Site and enter the identifier and name for the first clinic. Keep the site identifier simple and consistent with your naming standard, because it becomes part of the site's configuration and file path. The step is complete when the new site appears in the site list in admin.php and the form saved without errors.
Select the source site and database option
Choose the source site whose configuration will be cloned for the new clinic, and decide whether to clone its database. Cloning the configuration gives the new clinic the same settings, and cloning the database copies existing clinical and administrative data into the new site, which may include data that belongs to another entity. For a clinic that must start empty, copy the configuration without the data. Confirm the choice with your privacy or compliance lead before saving, because the decision determines whether patient data is duplicated. The step is complete when the clone settings match the decision recorded for this clinic.
Verify the new site loads on its own
Open the new site's own address and sign in with an administrator account for that site. Confirm the site name, the clinic-specific settings and the user list match what you intended, and that changes made in the new site do not appear in the base site. Check that patient records, appointments and documents visible in one site are absent from the other, and that the new site's documents are stored in its own folder under the sites directory. The step is complete when you have signed in to both sites, shown data separation with a test record, and recorded the results before adding another clinic.
Revert or delete the setup.php change
Once every required clinic is added, set
$allow_multisite_setupback to its original value or delete setup.php, as the Multiple Sites Module guidance recommends, because admin.php and setup.php are security-sensitive. Also review the other administrative scripts that the Securing OpenEMR guidance says to remove after installation. Keep a copy of the original file in your backup set so the change can be reversed through your change process. The step is complete when a request to the multisite setup pages is blocked, every site still loads, and the change is documented.
Locking down setup.php and admin.php after clinics are added
Once the sites for each clinic exist, the scripts that created them become the most powerful entry points in the installation. The cards below cover the controls from the Securing OpenEMR guidance that keep one clinic's data and administration away from the others on a shared multisite install.
Remove or revert setup.php
The Multiple Sites Module asks you to set $allow_multisite_setup to true in setup.php to add sites. On a shared deployment, that flag left on means anyone who can reach the script can attempt to create or alter sites. Once the last clinic is added, revert the flag or delete the file. Check that the file is gone from the web root on every node, not just the one you edited.
Restrict access to admin.php
admin.php holds the controls for adding, cloning and managing sites, so it is the script an attacker most wants. Limit it to a named administrator network path, such as a VPN or an allowlist at the load balancer or web server, and keep it off the public internet. Confirm that the restriction holds for every clinic's hostname, since a site reachable under one name may bypass a rule written for another.
Serve only HTTPS
Clinics on one install share the same web tier, so a plain HTTP listener exposes every clinic's logins and patient pages on the same path. The Securing OpenEMR guide says to allow only HTTPS and to consider opening only port 443. Test that port 80 redirects or closes, that certificates cover each clinic hostname, and that the database and internal links are not reachable without TLS.
Securing OpenEMR guideBlock direct access to sites documents
Each site stores uploaded documents under sites/*/documents. With several clinics, one misconfigured path can expose files from every site at once. Configure the web server to deny direct requests to that tree so documents are only served through the application's access checks. Test by requesting a known document URL without a session and confirming it is refused.
Enforce MFA and strong passwords
Shared multisite logins mean a single stolen password can reach more than one clinic's records. The Securing OpenEMR guide recommends multi-factor authentication and strong password policies. OpenEMR 6.0.0 added length limits, a rule requiring all 4 character types, reuse prevention and expiration settings. Set these in the global settings for each site, and confirm that administrator accounts meet the same standard.
- Prior passwords blocked
- 5
Limit who can create or clone sites
Adding or cloning a site copies configuration and can copy a database, so the ability to do it is effectively the ability to create a new tenant holding patient data. Name the small set of people allowed to use admin.php, record each site creation in a change log, and review that list when staff leave. Ask your vendor or your own tests to confirm which OpenEMR roles can reach site management pages.
Backing up several OpenEMR sites when none of them can be backed up together
Each clinic site needs its own backup job, restore test and retention rule. The OpenEMR Multiple Sites Module wiki notes that there is no way to back up multiple sites at once, so a single scheduled job covering the whole installation does not exist out of the box. For every site, the backup must capture the site's files under the sites directory, the site's database, and the configuration that ties the two together. Those three items belong to one site, so a backup that holds the database for one clinic but the documents folder for another is not a usable backup. Before go-live, list each site with its database name, its folder under sites, and any site-specific settings, then confirm that each entry appears in exactly one backup job.
A restore to one clinic should not touch the others, but only if the boundaries are set up that way. Because each site has its own database and its own sites folder, restoring one clinic means replacing that site's database and files and nothing else. The operator should confirm that the restore procedure names the site explicitly, that other sites keep running during the restore, and that the restored site's configuration still points at the correct database. Rehearse this on a copy of a non-production site at least once, and record how long the rehearsal took, because that figure is the one to give clinic managers. Ask the team that owns your backup tooling whether it can restore a single site's database and folder without restoring the whole host.
The backup tooling and schedule are decisions for your own environment, and they need written confirmation. Confirm with your hosting or backup owner how often each site is captured, where copies are stored and whether they are encrypted, how long each retention tier is kept, who may start a restore, and who approves restoring patient data into a live site. Confirm that backups of the sites folder are protected by the same access controls as the live documents, since the Securing OpenEMR guide asks operators to block direct web access to sites/*/documents. Finally, check that the schedule is reviewed whenever a site is added or cloned, because a new clinic that is not in the job list is unprotected from its first day of use.
Choosing a site layout by organization type
A single owner running affiliated clinics that share staff, policies and a common set of workflows usually benefits from cloning one well-configured source site. The source site's configuration can be copied to new sites through the Add New Site flow in admin.php, and the database can optionally be cloned as well. This keeps forms, fee schedules and scheduling settings consistent across locations, which is the main reason to choose this layout.
- Clone the reference site: Build and test the source site's globals, forms and templates once, then clone it so each clinic starts from the same baseline.
- Decide on database cloning: Cloning the database copies existing patient and clinical data, so only clone it when the new clinic should start with that content. Otherwise start from a clean database.
- Keep shared admin accounts small: Limit the owner-level administrator group to a few named people, and use role-based access inside each site for front-desk, clinician and billing staff.
- Keep per-site data separate: Each site has its own database in this model, so review what each clinic's staff can see and confirm that cloning did not carry over site-specific identifiers or contacts.
- Plan the shared policy record: Document which settings must stay identical and which may differ by location, such as hours, locations and local billing details.
Before you rely on this layout, confirm with compliance and legal counsel whether the affiliated entities are a single covered entity or separate ones for HIPAA purposes, and whether data sharing between clinics is permitted under your notice of privacy practices and any affiliation agreements.
A group of unrelated practices that share a hosting arrangement but need their own administrators is a different case. Here the value of multisite is mainly shared infrastructure and a single codebase to upgrade, while day-to-day administration stays with each practice. Cloning a source site is less useful because each practice usually has its own templates, fee schedules and providers, so a clean site is often the better starting point.
- Start from a clean site: Add each practice as a new site without cloning the database, so no other practice's patients, providers or billing history appear in its records.
- Assign local administrators: Each practice needs its own admin accounts for user management and configuration, and those accounts should not have rights to other sites' data.
- Separate backups per site: The documentation notes there is no way to back up multiple sites at once, so plan a backup routine that covers each site's database and documents directory.
- Agree on upgrade windows: Because all sites run one codebase, a shared upgrade affects every practice at the same time, so coordinate the schedule with each administrator.
- Document the host owner's role: Record who operates the server, who can reach
admin.phpand who answers for each practice's data.
Before committing, ask compliance and legal counsel whether the host operator is a business associate of each practice, and what contract terms must be in place for that relationship.
Entities that must keep data and access strictly apart, such as a hospital group with a separately licensed behavioral health unit, a clinic inside a larger organization, or entities with different regulatory obligations, need the most conservative design. Multisite keeps sites in one codebase, but the separation you need is a matter of databases, accounts, hosts and documents, and you should decide whether a single installation can meet that requirement at all. The documentation's own guidance on the admin and setup scripts becomes a hard requirement here.
- Test whether one installation is enough: If the entities cannot share a server, database host or administrator pool, use separate installations instead of multiple sites.
- Lock down admin and setup scripts: Revert the
$allow_multisite_setupchange or deletesetup.phpafter the work is done, and restrictadmin.phpto named administrators. - Isolate document storage: Confirm that each site's
sites/*/documentspath is blocked from direct web access, as the security guidance recommends. - Review access per site: Test that a user in one site cannot reach another site's records through the interface, and log the test results.
- Record the separation model: Keep a written map of which database, host, account group and backup set belongs to which entity.
The open questions for compliance and legal counsel are whether each entity is a separate covered entity or business associate, whether a shared host creates a business associate relationship, and whether any cross-entity access must be documented or restricted by contract.
Limits to confirm in your environment before you commit to multisite
OpenEMR multisite is a configuration feature of one codebase, not a separate product per clinic, so several operational questions apply to every site at once. The cards below list the limits to confirm with the project, the community, or your implementation partner before you choose this layout for several clinics or entities.
Exact version and runtime requirements
Confirm which OpenEMR release you will run and the PHP and database versions it needs. Recent releases require PHP 8.3 or later and a MySQL- or MariaDB-compatible database, but your hosting image, database engine and extensions must match the specific release you pin. Ask the community or your partner to confirm the requirements for that release before you provision servers for multiple sites.
Release notesData separation in cloned databases
When you clone a source site, its configuration and optionally its database can be copied. Confirm whether the cloned data contains patient records, scheduling, billing or user accounts that must not cross entity boundaries, and decide whether to clone configuration only. Ask your compliance lead to review what the clone carries before any clinic data is loaded.
Upgrades and patches across all sites
Confirm how a codebase upgrade or security patch reaches every site in the installation, and whether one site can be held back for testing. Because all sites share the same code, a failed upgrade affects every clinic that depends on it. Ask your partner for a written rollback and testing plan that covers each site's database.
No built-in multi-site backup
The Multiple Sites Module documentation notes there is no way to back up multiple sites at once. Confirm your backup approach per site database, including file storage under each site's documents directory and restore testing for each clinic. Budget for this as an ongoing operations task, and confirm the method and retention you need with your partner before go-live.
Multisite module docsHow admin.php and setup.php behave
The guidance says admin.php and setup.php are security-sensitive and recommends reverting the setup.php change or deleting the file afterwards. Confirm in a staging copy how admin.php is accessed, who can reach it, and what remains exposed once setup.php is removed. Ask your security team to test this path, and confirm the exact lockdown steps with the project or your partner.
Securing OpenEMR guideShared codebase support model
Confirm who supports a shared installation: your internal team, a professional support vendor from the project's list, or an implementation partner. OpenEMR is community-supported with no paid edition, so support terms come from the vendor you contract, not from the software. Ask each candidate how they handle incidents that affect several clinics at once, and what they will not cover.
OpenEMR home pageHow HIPAA obligations apply to each clinic on a shared codebase
The HIPAA Security Rule (45 CFR Part 164 Subpart C) applies to covered entities and their business associates for all electronic protected health information (ePHI) they create, receive, maintain or transmit. Sharing one OpenEMR codebase does not merge those obligations. Each clinic or entity that is a covered entity or business associate carries its own duties, so each needs its own risk analysis, its own access decisions and its own documentation of how its ePHI is protected. Confirm with your counsel which entities in your group are covered entities, which are business associates of another entity, and which hold ePHI at all. Those answers decide which records you must keep for each site, and a multisite layout can make it easy to assume one site's answers apply to the rest.
When a hosting provider, integrator or support partner handles ePHI on your behalf, 45 CFR 164.314(a)(2)(i) requires a business associate contract. The contract must require the business associate to comply with the Security Rule, flow the same terms down to any subcontractor that handles ePHI, and report security incidents, including breaches of unsecured PHI, to the covered entity. For a multisite install, check whether the contract names each clinic's database and sites directory, and whether the incident reporting path works across every site. Ask any partner to show how it separates one clinic's records from another's.
There is no HIPAA certification. HHS states that no Security Rule standard requires an entity to certify compliance and that private certifications do not prevent HHS from later finding a violation (HHS FAQ 2003). Evidence for each clinic therefore has to come from its own records, such as dated risk analyses, access reviews, the setup.php change record and the decisions on admin accounts, combined with any independent assessment you commission. Keep these per site, and confirm with your assessor how they will sample across a shared codebase.
What multisite setup costs and what it needs from your team
What drives the cost of an OpenEMR multisite setup?
The cost follows the number of sites, how each one is cloned, how strictly data must be separated and how much security review the setup needs. Each additional clinic adds configuration, testing and verification work, even when it starts from a cloned source site. Cloning the configuration is faster than cloning the configuration and database, but the database choice decides what each clinic inherits, so that decision should be made early. Backup design also adds work because the multisite module wiki notes there is no way to back up multiple sites at once, so each site needs its own backup routine. Ask any provider to price these items separately in a written quote.
Can a small internal IT team set up OpenEMR multisite alone?
A small team with Linux, PHP and database experience can often complete the setup, but the work touches security-sensitive scripts and patient data, so the skills matter more than the headcount. The team needs to enable multisite in setup.php, add sites through admin.php, manage a separate database and document directory per site, and then lock down or remove the setup scripts. Someone also needs to own the upgrade path, because each site must follow the same release line. Confirm that at least one person can run restores and review access logs before deciding to do it in-house.
How long does a multisite setup take?
The duration depends on the number of clinics, whether each one starts from a clone or a fresh configuration, how much data needs to be separated or migrated, and how much testing the clinics require before go-live. Sources for OpenEMR do not publish a standard timeline for multisite work, so treat any figure you receive as provisional until the written scope lists each site and each verification step. Ask the provider for a schedule that separates environment preparation, the first site, the remaining sites and security hardening.
What does the work need from our team before it starts?
The work needs access to the target environment, a complete list of clinics or legal entities, and named administrators who can approve changes for each one. You also need to decide how patient data is separated between sites, which settings each clinic may vary and which must match across all sites. Provide test accounts for each clinic, the database and storage layout you already run, and a window for changes that touch shared infrastructure. Without these decisions, the first site often has to be rebuilt once the second site exposes a conflict.
How do we ask for a fixed-scope quote for multisite work?
Ask for a written scope that lists each clinic, the source site to clone, whether the database is cloned or created new, the backup method for each site and the security checks to complete before handover. DeployOpen plans most engagements as fixed-scope, with scope, deliverables and timelines agreed in writing before work starts, and a quote follows from that scope. Ask any provider to state what is one-time, such as setup and hardening, and what recurs, such as upgrades, backups and support. Also ask what is excluded, for example data migration from legacy systems or changes to clinic workflows.
What happens when a new clinic joins after the setup is complete?
A new clinic is usually added by repeating the site creation steps in admin.php, so the work is smaller than the first setup but still needs planning. Each new site needs its own database, document storage, backup routine and access review, and the team should confirm that the setup scripts are still locked down after the change. If setup.php was reverted or deleted at handover, it must be re-enabled temporarily and then removed again. Ask your provider whether new-clinic additions are included in a retainer or quoted separately, and what the change process looks like.
What risks should we check before paying for multisite help?
The main risks are weak separation between clinics, setup scripts left available after installation and backups that do not cover every site. The OpenEMR Securing guide says to remove setup.php and other admin scripts after installation and to block direct web access to sites/*/documents, so ask whether those steps are included in the scope. Also confirm who approves access changes and how an incident at one clinic would be reported to the others. Request a written list of security checks as part of the quote.
How DeployOpen scopes and delivers a multisite OpenEMR setup
DeployOpen plans, implements, hardens, documents and supports self-hosted open-source platforms inside the client's own infrastructure. For a multisite OpenEMR setup, we agree a written scope covering each clinic or entity, its database approach, access model and the lockdown steps that follow setup.
How we scope
- Inventory each clinic or entity, its users, its patient data boundaries and the sites it must never see.
- Decide per site whether it is cloned from a source configuration or built fresh, and whether its database is cloned or separate.
- Agree in writing the deliverables, timeline and handover items before any change is made to your environment.
How we build
- Enable multisite in a non-production copy first, then add and clone sites through the admin interface under change control.
- Verify each site's database, document storage, login behavior and access rules separately before any clinic uses it.
- Confirm backups are configured per site, since the multisite module notes there is no way to back up multiple sites at once.
How we hand over
- Remove or revert the multisite enablement in setup.php and confirm admin and setup scripts are no longer web-accessible.
- Deliver a site register listing each site, its database, its administrators and the settings it inherits from its source.
- Walk your team through the runbook for adding a future clinic, including the steps that reopen and then re-lock setup scripts.
How we support
- Offer ongoing support, upgrades and continuous testing as a retainer, covering each site on the same release cadence.
- Plan OpenEMR version upgrades and patching across all sites, including reviewing security releases as they are published.
- Confirm with us before the engagement starts which upgrade and backup responsibilities sit in the retainer and which stay with your team.

