Settings
The panel's settings file /etc/hostfog/config.json, how to read and change it, and which keys administrators may change.
Most of HF Panel's settings live in the panel and are changed on its screens. A small set of server-level settings
lives in a file, /etc/hostfog/config.json. This page explains that file and which of its keys you may change.
Change settings in the panel first
Almost everything is a screen in Server Admin. Use these before you edit any file:
| What | Where |
|---|---|
| Brand name and colour, panel language, support email, sender name and address, role address forwarding, welcome emails, two-factor login for staff | Server Admin › System › Settings |
| Nameservers and the server IP used for new DNS records and SPF | Server Admin › System › Settings › DNS & network |
| Logo, colours and company name everywhere | Server Admin › System › White label |
| Backups and backup storage | Server Admin › System › Backups and Backup storage |
| Web server tuning | Server Admin › System › Web server profiles |
| Service config files (Nginx, Apache, PHP, MariaDB, Postfix, Dovecot, BIND …) | Server Admin › System › Config files (each save is tested, and rolled back if the test fails) |
| Automatic updates | Server Admin › Server › HF Panel updates |
Server-level changes that have a command should be made with it: see Server commands.
The settings file
| File | /etc/hostfog/config.json |
| Owner and mode | root:hostfog, 0640 — readable by the panel, writable by root only |
| Format | JSON |
| HF Mail's settings | /etc/hostfog/webmail.json, same format |
hf-api reads the file again by itself when it changes. You don't need to restart anything after a change.
Read and change it
Use the hf-api config command as root. It never writes broken JSON, which a hand edit can:
H=/usr/local/hostfog/bin/hf-api
$H config show # the whole file
$H config get panel_port # one value (true/false print as 1/0, lists space-separated)
$H config set studio_import_mb 256 # a JSON value: a number, true/false, ["a","b"] or "text"
$H config set-text public_site https://www.yourdomain.com # always stored as text
$H config unset public_site # remove a key
$H config --webmail get smtp_host # the same for HF Mail's settings
Warning: if you edit the file by hand and break the JSON (a missing comma or quote), the panel stops answering.
python3 -m json.tool /etc/hostfog/config.jsonnames the line with the mistake.
Tip: before you change anything, copy the file:
cp /etc/hostfog/config.json /root/config.json.bak.
Keys you may change
| Key | What it does | Default |
|---|---|---|
admin_email |
the administrator's email address: SSL notices, alerts and system emails | asked at installation |
public_site |
where server., panel. and reseller.yourdomain.com send visitors who open them without the port |
https://yourdomain.com/ |
studio_import_mb |
the largest .sql file HF Studio imports, in MB |
128 |
check_resolver |
the public DNS server used for live DNS checks (DNS setup, Deliverability, Mail health) | 1.1.1.1 |
dnsbl_resolver |
a DNS server used for spam blocklist checks of the server's IP | the system's |
brand, brand_color |
the brand name and colour — prefer White label or Settings | HF Panel, #d87858 |
company_name |
the server's company name in footers and email sender names — prefer White label | asked at installation |
After changing public_site, run /usr/local/hostfog/bin/hf-agent portals-web so the web server uses the new
address. After changing studio_import_mb, run the same command so db.yourdomain.com accepts the larger uploads.
Keys you change with a command
These keys are set by the installer and by hf-panel. Change them with the command, which also updates the web
server, certificates and DNS. Setting them by hand changes only the file.
| Key | What it holds | Change it with |
|---|---|---|
portal_admin, portal_client, portal_reseller |
the names of Server Admin, Control Panel and Reseller Panel | hf-panel portals on --admin … --customer … --reseller … / hf-panel portals off |
portal_files |
HF Files' own address | hf-panel files-portal on [NAME] / off |
portal_studio |
HF Studio's own address | hf-panel db-portal on [NAME] / off |
portal_api |
the API's own address | hf-panel api-portal on [NAME] / off |
portal_status |
the status page's own address | hf-panel status-page on [NAME] / off |
mail_name |
the mail server's name (MX, greeting, reverse DNS) | hf-panel mail-name NAME |
mail_host, smtp_host, imap_host |
the mail names in use now; they follow mail_name once DNS points at the server |
set by the panel |
tunnel_domain |
the domain HF Tunnel links live under | Server Admin › Hosting › Tunnels |
Keys you should not change
These are set at installation and other parts of the server depend on them. Changing them by hand can break the panel.
| Key | What it holds |
|---|---|
panel_host |
the server's own host name, for example panel.yourdomain.com |
panel_port |
the panel port (default 8443) |
api_port |
the API's port (default 2087) |
server_ip |
the server's public IPv4 address at installation (change the one used for DNS under Settings › DNS & network instead) |
nameservers |
the nameservers at installation (change them under Settings › DNS & network) |
mail_enabled, dns_enabled |
whether email and the DNS server were installed |
app_key |
the server's secret key: sessions, sealed data and sign-in links depend on it |
db_path |
the panel database, /var/lib/hostfog/hostfog.sqlite |
agent, agent_dry_run |
the root helper and its test mode. agent_dry_run must stay false on a live server |
shared_dir, webmail_url |
paths the panel and HF Mail share |
edition, licence_server |
the edition and the licence server. The licence key itself is changed on the Licence screen |
Warning: never change
app_key. Everyone is signed out, and saved passwords and keys sealed with it stop working.