Skip to content

File locations ​

This page lists the important MoorCP Shared files and directories on the panel server and the hosting servers: configuration, secrets, data, and logs. Use it as a reference when you back up, move, or troubleshoot a server.

WARNING

Files marked secret contain keys or passwords. Do not copy them into tickets, chat, or repositories. Back them up somewhere encrypted.

Panel server ​

Configuration and secrets ​

LocationOwner and modeContents
/etc/moorcp-shared/envroot:moorcp 0640Secret. All panel settings (MOORCP_*): listen addresses, database URL, bootstrap admin API key, signing key. Created by the installer, not overwritten when the installer runs again
/etc/moorcp-shared/pki/root:moorcp 0750Secret. Internal CA for agent mTLS: ca.crt, ca.key, and the control plane client certificate controlplane.crt and controlplane.key. The old versions after pki renew-cp are kept as *.prev
/etc/moorcp-shared/tls/root:moorcp 0750The panel's public TLS certificate: fullchain.pem and privkey.pem (secret, 0640). The panel reloads changed files within a minute, without a restart
/etc/moorcp-shared/certbot-domainrootThe panel hostname, one line. Read by the deploy hook to copy the Let's Encrypt certificate to tls/
/etc/moorcp-shared/releaserootInstalled version, channel (stable or rc), and release mirror. Used by upgrade, the update check, and self-upgrade (the channel and mirror are always read from here, never from the panel's request)
/etc/moorcp-shared/initial-admin-passwordroot 0600Secret. Email and password of the first admin. Delete it after the first login
/etc/moorcp-shared/backup-destinations.jsonoptionalBackup destinations from a configuration file (MOORCP_BACKUP_DESTINATIONS). Destinations created in the GUI are stored in the database

INFO

The BIND copy of every DNS zone is stored in the panel database, not in a file. The copies are refreshed on every DNS sync cycle and are included in the panel backup. A zone that goes missing from the primary node is rebuilt from these copies.

DANGER

Losing /etc/moorcp-shared/env and /etc/moorcp-shared/pki/ means the stored secrets cannot be decrypted and every agent must be registered again. Back up both, or turn on Panel backup, which includes them.

Programs and data ​

LocationContents
/usr/local/bin/moorcp-sharedControl plane binary
/usr/local/bin/moorctlAPI CLI
/usr/share/moorcp-shared/admin/Admin panel and client panel files (MOORCP_ADMIN_UI_DIR)
/usr/share/moorcp-shared/downloads/install-agent.sh and the amd64/arm64 agent binaries with checksums, served at https://<panel>:8443/downloads/ (MOORCP_DOWNLOADS_DIR)
/var/lib/moorcp-shared/Home of the moorcp user, the only directory the service may write to
/var/lib/moorcp-shared/dr/Panel backup working directory (stage and restic cache)
/var/lib/moorcp-shared/upgrade/moorcp:moorcp 0750. Where the panel writes request.json when an admin clicks Upgrade. The file is deleted by self-upgrade
/var/lib/moorcp-shared/upgrade-state/root:root 0755, read-only for the panel. Status of the upgrade from the panel (state.json) and the installer log (upgrade.log)
/var/lib/pgsql/data/Panel PostgreSQL data (database moorcp)
/etc/systemd/system/moorcp-shared.servicePanel systemd unit
/etc/systemd/system/moorcp-shared-upgrade.path, moorcp-shared-upgrade.serviceUnits that run the upgrade from the panel as root
/etc/letsencrypt/renewal-hooks/deploy/moorcp-shared-deploy-hook.shDeploy hook that copies new certificates to /etc/moorcp-shared/tls/. Run by moorcp-shared hostcert (and by certbot on older installs)
/etc/systemd/system/moorcp-hostcert.timer, moorcp-hostcert.serviceRun moorcp-shared hostcert renew twice a day

Logs ​

LocationContents
journal moorcp-sharedControl plane JSON log: journalctl -u moorcp-shared. The last 5,000 entries also show in Logs & Audit in the GUI
/var/log/moorcp-shared/auth.logFailed panel logins, read by CrowdSec to block brute-force attempts

Hosting servers ​

Agent ​

LocationContents
/usr/local/bin/moorcp-agentAgent binary
/etc/moorcp-agent/envAgent settings (MOORCP_AGENT_*), mode 0600. May be empty
/etc/moorcp-agent/db-profile.jsonThe server's database profile (local or external), set from the panel
/var/lib/moorcp-agent/Agent state, mode 0700 (MOORCP_AGENT_STATE_DIR)
/var/lib/moorcp-agent/agent.jsonIdentity from registration: server ID and panel URL
/var/lib/moorcp-agent/agent.key, agent.crt, ca.crtSecret. The agent's mTLS key and certificate, and the panel CA. The old pair after rotation is kept as *.prev
/var/lib/moorcp-agent/panel-ca.crtCA of a self-signed panel certificate (if enroll used --panel-ca)
/var/lib/moorcp-agent/config/<target>/Version history of service configurations applied from the panel (30 versions per target)
/var/lib/moorcp-agent/webstats/State of the visitor statistics collector, which reads the access logs every 5 minutes
/etc/systemd/system/moorcp-agent.serviceAgent systemd unit
/var/lib/moorcp-install-resume/Root 0700. Only while an installation waits for the disk-quota reboot: the installer options (without the token), a copy of the installer, the agent, and the panel CA. Used by moorcp-install-resume.service, which removes itself and its unit file after it has run
/var/lib/moorcp-install-resume.statusResult of the installation that continued after the reboot
/etc/moorcp-shared/releaseVersion, channel, and mirror installed by the installer. agent.upgrade updates VERSION after the agent binary is replaced from the panel
/etc/moorcp/roleServer role. Contains dns on a DNS-only server (dns mode or --role dns). Absent on a regular hosting server

Nameserver node (PowerDNS) ​

These files only exist on servers that are nameserver nodes, whether hosting servers or DNS-only servers.

LocationOwner and modeContents
/etc/pdns/pdns.confroot:pdns 0640Secret (contains the API key). PowerDNS configuration written by MoorCP: sqlite backend, port 53, API on 127.0.0.1:8081. A pdns.conf not written by MoorCP is not overwritten, and node setup is refused
/var/lib/pdns/pdns.sqlite3pdnsThis node's zone database. Every node (primary or replica) stores every record of every zone
/etc/moorcp/dns/pdns-api-keyroot 0600Secret. This node's PowerDNS API key. Never sent to the panel
/etc/moorcp/dns/managedroot 0600Marker for a MoorCP-managed node, containing the nameserver hostname

TIP

Removing a node from the panel stops PowerDNS, but pdns.sqlite3 stays. Setting up the node again on the same server reuses the existing database and API key.

Configuration managed by MoorCP ​

LocationContents
/etc/moorcp/webserver-modeActive web server mode from the last switch
/etc/moorcp/webstate/Per-account state include files for web server vhosts
/etc/nginx/conf.d/moorcp/nginx vhosts (nginx and nginx-proxy modes)
/etc/httpd/conf.d/moorcp/Apache vhosts
/usr/local/lsws/conf/moorcp/sites/OpenLiteSpeed vhosts
/etc/moorcp/ssl/Secret. Website certificates and keys, and the ACME account key
/etc/moorcp/php/PHP-FPM pools per account per version
/run/moorcp-php/Account PHP-FPM sockets
/etc/moorcp/lsphp/Per-account lsphp configuration (OpenLiteSpeed)
/etc/moorcp/mail/Email domains, mailboxes, and aliases. relay_passwd (secret, root 0600) holds the SMTP relay login
/etc/letsencrypt/live/<hostname>/Secret. Let's Encrypt certificate of the server hostname, from moorcp-agent hostcert
/etc/letsencrypt/renewal-hooks/deploy/moorcp-agent-host.shReloads Postfix, Dovecot, and the web server after the hostname certificate is renewed
/etc/moorcp/ftp/FTP accounts
/etc/moorcp/ssh/Account SSH keys. settings.json holds the server's SSH settings from the panel (client port, password login)
/etc/ssh/moorcp-client/Configuration of moorcp-sshd, the separate sshd instance for clients, when a client SFTP/SSH port is set
/etc/ssh/sshd_config.d/05-moorcp-port.confRoot SSH port set from the panel
/etc/ssh/sshd_config.d/55-moorcp-clientport.confKeeps client accounts off the main sshd when they have their own port
/etc/moorcp/cron/Account cron jobs
/etc/moorcp/redis/Per-account Redis configuration
/etc/moorcp/memcached/Per-account Memcached configuration
/etc/moorcp/dbremote/Remote database hosts per account and the firewall rules installed for them
/etc/moorcp/unbound.confLocal DNS resolver for Rspamd (moorcp-unbound.service, 127.0.0.1:10053)
/etc/moorcp/rspamd-controller.pwSecret (root 0600). Rspamd controller password used by the agent for the Rspamd web UI and spam monitoring
/etc/rspamd/override.d/worker-controller.incRspamd controller settings written by MoorCP (root:_rspamd 0640)
/etc/rsyslog.d/30-moorcp-mail.conf, /etc/logrotate.d/moorcp-mailPostfix log for Track delivery and its daily rotation
/etc/clamd.d/scan.confclamd settings, rewritten from the scanner settings in the panel
/etc/moorcp/backup/master.keySecret. This server's backup master key. Every account's restic repository password is derived from it
/etc/moorcp/vendor/Vendor integration data (CloudLinux, Imunify360, cPGuard)
/etc/my.cnf.d/99-moorcp.cnfMariaDB tuning from the panel
/etc/my.cnf.d/moorcp-userstat.cnfKeeps MariaDB per-account statistics on after a restart, for database usage per account
/etc/radicale/configCalendars & Contacts (Radicale) settings: listen 127.0.0.1:5232, Dovecot login, each user only sees their own collections
/etc/dovecot/conf.d/99-moorcp-dav.confDovecot login socket for Radicale
/etc/php.d/99-moorcp.iniSystem PHP INI from the panel
/etc/httpd/modsecurity.d/, /etc/httpd/conf.d/moorcp-waf.confModSecurity WAF and per-website settings
/etc/crowdsec/CrowdSec configuration written by MoorCP

WARNING

The agent rewrites the files above. Manual changes are lost on the next apply. Make changes through the panel.

Programs and runtimes ​

LocationContents
/opt/moorcp/runtimes/App runtimes built by MoorCP: node<N> (Node.js), ruby<XY> (Ruby), and others
/opt/moorcp/php<XY>/PHP 5.6–7.3 built by MoorCP for EL9
/usr/share/moorcp-pma/phpMyAdmin
/usr/share/moorcp-adminneo/AdminNeo (PostgreSQL)
/usr/local/softaculous/Softaculous core (MOORCP_SOFTACULOUS_DIR). When installed from the panel, an existing conf/ is kept
/usr/local/ioncube/ionCube loader for Softaculous, matching the installed PHP version

Data ​

LocationContents
/home/<account>/Account home, mode 0711 after isolation hardening
/home/<account>/public_html/Default docroot of the main domain
/home/<account>/mail/Account mailboxes
/home/<account>/.moorcp-trash/File Manager Trash. Entries older than 7 days are deleted automatically (MOORCP_AGENT_TRASH_DAYS)
/home/<account>/.moorcp-quarantine/Files quarantined by the malware scanner
/var/lib/moorcp/Agent data read by the web server, mode 0755
/var/lib/moorcp/acme/ACME HTTP-01 challenge webroot
/var/lib/moorcp/suspended/Page for suspended accounts
/var/lib/moorcp/autoconfig/Email client autoconfig and autodiscover files
/var/lib/moorcp/import/Where cPanel archives (cpmove-<user>.tar.gz, or full backups backup-<date>_<user>.tar.gz) go for import. Restore from files also finds root-owned archives in /root and /home
/home/.moorcp-import/<job>/Staging area of a restore from a cPanel backup file: the archive is unpacked here once (needs free space at least the size of the archive) and deleted afterwards
/var/lib/moorcp/move/Temporary dumps while an account moves between servers (0700)
/var/lib/moorcp/restore-test/Working area for automatic restore tests
/var/lib/moorcp/runtime-apps/Node.js, Python, and Ruby app data
/var/lib/moorcp/malware/Malware scan status
/var/lib/moorcp/malware/scanner/Scanner settings and custom ClamAV signatures and YARA rules synced from the panel
/var/lib/moorcp/malware/yara/YARA web shell rules, updated daily
/run/memcached/moorcp-<account>/memcached.sockAn account's Memcached socket. ~/.moorcp-memcached/memcached.sock in the account home is a stable link to it
<docroot>/moorcp-stats/s.js and p.gif of the optional visitor statistics beacon, written when the beacon is turned on for a website
<WordPress>/wp-content/mu-plugins/moorcp.phpMust-use plugin for the one-time WordPress login (SSO) from WordPress Manager
/var/lib/moorcp/softaculous/install.jsonStatus of the Softaculous install from the panel (steps, last error)
/var/lib/moorcp/softaculous/php.d/00-ioncube.iniINI that loads ionCube only for Softaculous's PHP, not for account sites
/var/lib/moorcp-webmail/Roundcube data
/var/lib/radicale/collections/Calendars and contacts of every mailbox (owner radicale). Not counted in the account disk quota and not yet included in account backups. Removed for an address when its mailbox is deleted
/run/moorcp-webdisk/<id>/Sockets of the Web Disk workers (0700, owned by the account user)
/var/cache/moorcp-restic/restic cache for backup and verification
/var/lib/mysql/MariaDB data

Account backups ​

The backup location is set by the destination in Backup Center. The layout is the same for every destination:

text
<destination>/
└── srv1.example.com/      server folder (hostname)
    ├── _server.json       server ID, hostname, IP, panel URL (no secrets)
    ├── README.txt         how to check and restore by hand with restic
    ├── jane/              restic repository of account jane
    └── myshop/
Destination typeRepository location
local<path>/<server-folder>/<account>. The path must be absolute and outside /home, e.g. /var/backups/moorcp
sftpsftp:user@host:<path>/<server-folder>/<account>
s3s3:<endpoint>/<bucket>/<prefix>/<server-folder>/<account>
r2s3:https://<accountId>.r2.cloudflarestorage.com/<bucket>/<prefix>/...

_server.json and README.txt are only written for local and sftp destinations. The panel backup is stored at <destination repo>/moorcp-panel/<instance-id>.

A client's external backup storage uses the same layout, <storage>/<server-folder>/<account>, with its own repository password that the client can view.

A backup downloaded from the panel is portable: files/, databases/*.sql.gz, mail/, account.json, and README.txt, so it can be uploaded to another control panel.

WARNING

A local destination stores backups on the same server's disk. If the server fails, the backups are lost with it. The panel shows the backup_onhost_only warning until you use SFTP, S3, or R2.

Logs ​

LocationContents
journal moorcp-agentAgent log: journalctl -u moorcp-agent, also shown in the server details Services tab
/var/log/moorcp/<account>/<domain>-*.logPer-account website access and error logs (the file name depends on the web server mode, e.g. -nginx-access.log, -access.log, -error.log)
/var/log/httpd/error_logApache error log
/var/log/httpd/modsec_audit.logModSecurity audit log
/var/log/moorcp-waf/ols_audit.logWAF audit log in OpenLiteSpeed mode
/var/log/pureftpd.logFTP transfer log
/var/log/maillogPostfix and Dovecot log (system default)
/var/log/moorcp-mail.logPostfix log read by Track delivery, rotated daily, 7 files kept
/var/log/dbgovernor-kill.logQueries killed by MySQL Governor (CloudLinux)
/var/log/moorcp-install-resume.logLog of the installation that continues by itself after the disk-quota reboot

See also ​

MoorCP Shared, a shared hosting panel for server fleets.