The folders, files, services and scheduled jobs HF Panel uses on the server, and how the panel does work that needs root.
This page lists where HF Panel keeps its programs, settings, data and logs on the server, which services it runs, and
how its parts fit together.
How it fits together
text
visitor ──► Nginx (80, 443, 8443, 2087) ──► websites: Apache (127.0.0.1:8080) or Nginx only ──► PHP-FPM per account
│
└──► hf-api (unix socket) ──► panels, HF Mail, HF Files, HF Studio, the API
│
└──► sudo hf-agent ──► root work: users, web server, DNS, mail, certificates
Nginx answers every web request. It serves static files itself and passes the rest to Apache (so .htaccess
works) or, for websites set to Nginx only, straight to PHP.
Each hosting account has its own PHP-FPM pool, running as the account's own user.
hf-api is the whole panel: Server Admin, Reseller Panel, Control Panel, HF Mail, HF Files, HF Studio and the API.
It runs as the unprivileged user hostfog.
Everything that needs root goes through one helper, hf-agent, which checks every argument it is given. The
hostfog user may run only that program as root.
Folders and files
Programs
Path
What it holds
/usr/local/hostfog/
HF Panel's programs
/usr/local/hostfog/bin/hf-api
the panel program (also used by the commands below)
/usr/local/hostfog/bin/hf-agent, bin/lib/
the root helper and its commands
/usr/local/hostfog/bin/hf-panel
the administrator's command; linked from /usr/local/sbin/hf-panel (old name: hf-admin)
each website's settings (folder, PHP version, SSL …); the web server files are written from these
/etc/hostfog/php/<user>.ver, <user>.ini
each account's PHP version and PHP settings
/etc/hostfog/ssl/
the panel's certificate and uploaded website certificates
/etc/hostfog/secrets.key
the server's key that seals saved passwords and tokens (backup destinations and others)
/etc/hostfog/licence.pub
the licence server's public key
/etc/hostfog/dns-setup.zone
the server domain's DNS records, ready to import at a DNS provider
/etc/cron.d/hostfog
HF Panel's scheduled jobs
/etc/nginx/sites-available/hostfog-*.conf
the panel's web server sites (the panel port, the separate panels, the service names)
/etc/nginx/hostfog/
shared web server snippets, including security.txt
Warning:/etc/hostfog/config.json and /etc/hostfog/secrets.key hold secrets. Keep them readable only by
root and the hostfog group, as the installer sets them.