Configuration files

Where ArcPanel keeps its settings, the data of users and domains, templates, the server configuration it writes, and its logs, and which of them you may edit.

Written for ArcPanel 2.2

ArcPanel keeps its own settings and the data of every account in plain text files, and writes the configuration of NGINX, Apache, PHP-FPM, BIND, Exim and Dovecot from them. This page shows where those files are.

Warning

Change settings with the panel or with the CLI commands, not by editing these files. The commands check the values, update every file that depends on them and restart what needs it. A file edited by hand can be overwritten by the next change, rebuild or update.

The ArcPanel folders

Path Holds
/usr/local/arcpanel The installation; $ARCPANEL in scripts
…/bin The v-* commands
…/func The shell libraries the commands use
…/conf The server's settings (below)
…/data Users, packages, templates, IP addresses, firewall rules, ports and the job queues
…/web-app The panel and REST API v2
…/nginx, …/php The panel's own NGINX and PHP-FPM, which serve port 8083
…/ssl The panel's certificate, certificate.crt and certificate.key
…/log A link to /var/log/arcpanel
/etc/arcpanel arcpanel.conf, which sets $ARCPANEL, and the panel's environment file
/backup Backup archives (the folder is set in the backup settings)

The installer adds /etc/profile.d/arcpanel.sh, which puts /usr/local/arcpanel/bin on the PATH of login shells.

Server settings

/usr/local/arcpanel/conf/arcpanel.conf holds the server's settings as KEY='value' lines: which services are installed (WEB_SYSTEM, PROXY_SYSTEM, MAIL_SYSTEM, DNS_SYSTEM, DB_SYSTEM, FIREWALL_SYSTEM, …), the ports (WEB_PORT, WEBMAIL_PORT, DB_ADMIN_PORT, PORT_RANGE_START, PORT_RANGE_END), the API (API_SYSTEM, API_V1, API_ALLOWED_IP), backups (BACKUP_MODE, BACKUP_INCREMENTAL), the white label (APP_NAME, FROM_NAME, FROM_EMAIL), the POLICY_* switches of the Security tab, and the installed VERSION.

Read a value, or change one the panel has no field for:

v-list-sys-config json
v-change-sys-config-value DNS_CLUSTER_SYSTEM arcpanel-zone

v-repair-sys-config repair adds keys that are missing, with their default values; conf/defaults/arcpanel.conf holds those defaults. The same folder has mysql.conf, the database hosts with their passwords (readable by root only), and, with incremental backups, restic.conf, the repository and how many snapshots to keep. The password of each user's restic repository is in that user's folder, below.

Users and their objects

Each account has a folder /usr/local/arcpanel/data/users/<user>/:

File Holds
user.conf The account: package, limits, usage, contact, role, shell
web.conf Web domains with their aliases, templates, SSL and PHP
dns.conf, dns/<domain>.conf DNS zones and their records
mail.conf, mail/<domain>.conf Mail domains and their mailboxes
db.conf Databases
cron.conf Cron jobs
backup.conf The list of backup archives
nodeapps.conf, dockerapps.conf Node.js apps and Docker apps
restic.conf The password of the user's restic repository
ssl/ The certificates of the web and mail domains
history.log, auth.log What was done with the account, and its logins

List them with the commands instead of reading the files: v-list-user alice json, v-list-web-domains alice json, v-list-dns-records alice example.com json.

Packages are /usr/local/arcpanel/data/packages/<name>.pkg, with the reseller, port, Node.js, Docker and PHP settings of each package in a .tenancy file beside it.

Templates

/usr/local/arcpanel/data/templates/ holds the templates new objects are made from:

Folder Templates
web/nginx/ NGINX templates (.tpl for HTTP, .stpl for HTTPS), used as web or proxy templates
web/apache2/ Apache templates
web/php-fpm/ PHP-FPM pool templates, the backend templates
web/skel/ The files a new web domain starts with
web/suspend/ The page of a suspended domain
dns/ DNS templates: the records of a new zone
mail/ Webmail configuration per mail domain

Add your own template by copying a shipped one to a new name in the same folder: updates replace the shipped files, not yours. Web domains and templates explains the placeholders.

Configuration of each domain

ArcPanel writes the server configuration of each web domain into the owner's home and links it into the services:

Path Holds
/home/<user>/conf/web/<domain>/ The NGINX and Apache configuration of the domain
/etc/nginx/conf.d/domains/, /etc/apache2/conf.d/domains/ Links to those files
/home/<user>/conf/dns/ The zone files that BIND serves
/home/<user>/conf/mail/<domain>/ The Exim and Dovecot settings of a mail domain
/home/<user>/web/<domain>/public_html/ The site's files

These files are written again whenever the domain changes, so do not edit them. For a change that templates cannot make, add a file nginx.conf_<name> (nginx.ssl.conf_<name> for HTTPS, apache2.conf_<name> for Apache) to the domain's folder in conf/web: the domain's configuration includes every such file, and ArcPanel keeps them.

Rebuild the files of an account, for example after you changed a template:

v-rebuild-web-domains alice
v-rebuild-user alice

Logs

Path Holds
/var/log/arcpanel/system.log Commands that succeeded
/var/log/arcpanel/error.log Commands that failed, with their exit code
/var/log/arcpanel/auth.log Panel logins; Fail2Ban reads it
/var/log/arcpanel/backup.log, restore.log Backups and restores
/var/log/arcpanel/LE-<user>-<domain>.log The last Let's Encrypt request of a domain
/var/log/arcpanel/nginx-error.log Errors of the panel's web server
/usr/local/arcpanel/web-app/storage/logs/ Errors of the panel application
/var/log/apache2/domains/<domain>.log, .error.log Access and error logs of a web domain, with Apache
/var/log/nginx/domains/<domain>.log, .error.log The same on servers with NGINX only

Troubleshooting shows which log to read for which problem.

Last updated