site
hostwall site: list, add, remove and change the mode of protected sites from the command line.
Manage sites stored in the database (dashboard sites). Sites in the config file are listed, and site mode can change their mode; everything else about them is changed in the file.
hostwall site list
hostwall site add <domain> --upstream <address> [--alias a.com,b.com] [--mode monitor|block|off] [--paranoia 1-4] [--tls auto|off]
hostwall site mode <domain> monitor|block|off
hostwall site remove <domain>Changes are applied to a running HostWall within about 2 seconds. Flags may come before or after the domain.
site list
sudo hostwall site listSITE ALIASES UPSTREAM MODE PARANOIA TLS SOURCE
example.com www.example.com http://localhost:3000 block 1 auto fileA config-file site with settings changed in the dashboard or with site mode shows file (changed: mode,...).
site add
| Flag | Default | Meaning |
|---|---|---|
--upstream | required | Your app's address. Comma-separate several for round-robin. |
--alias | none | Extra hostnames, comma-separated |
--mode | defaults.mode (monitor) | monitor, block or off |
--paranoia | defaults.paranoia (1) | 1 to 4 |
--tls | auto | auto or off |
fail and headers come from defaults; change them in the dashboard.
sudo hostwall site add example.com --upstream localhost:3000 --alias www.example.com✔ Added example.com → localhost:3000site mode
sudo hostwall site mode example.com block✔ example.com is now in block modeFor a site in the config file, the mode is stored as an override on top of the file (the file isn't rewritten):
✔ example.com is now in monitor mode (overrides /etc/hostwall/hostwall.yaml; reset it in the dashboard)The override stays until you reset the site in the dashboard, or set the mode back to the file's value. See File sites and dashboard sites.
site remove
sudo hostwall site remove example.com✔ Removed example.com