Troubleshooting
Fix common HostWall problems: ports in use, certificates not issued, 502 errors, client IPs, dashboard lockouts and logs.
Start with these two commands. Most problems show up in one of them.
sudo hostwall status
sudo journalctl -u hostwall -n 100 --no-pager- Where are the logs?
- Port already in use
- Permission denied on port 80 or 443
- Certificate not issued
- 502 "Website unavailable"
- 404 "Site not found"
- All requests come from the same IP
- Running behind another proxy
- Locked out of the dashboard
- Can't reach the dashboard
- Config change not applied
- CLI says "no HostWall database"
Where are the logs?
| Install | HostWall's own log |
|---|---|
| systemd (install script) | sudo journalctl -u hostwall -f |
| Docker | docker logs -f hostwall |
hostwall run in a terminal | The terminal |
The log covers startup, listeners, reloads, certificates, upstream errors and failed dashboard sign-ins. Security events (blocked and monitored requests) are in the database instead: see the Attacks page or sudo hostwall logs.
For more detail, run with --debug. Under systemd, add a drop-in:
sudo systemctl edit hostwall[Service]
ExecStart=
ExecStart=/usr/local/bin/hostwall run --config /etc/hostwall/hostwall.yaml --data /var/lib/hostwall --debugThen sudo systemctl restart hostwall. Remove the drop-in when you're done.
Port already in use
hostwall run: http listener on :80: listen tcp :80: bind: address already in useAnother program uses port 80 or 443 (the same goes for 9443 and the dashboard). Find it:
sudo ss -ltnp '( sport = :80 or sport = :443 or sport = :9443 )'Usually it's nginx, Apache or Caddy. Either:
- stop and disable it (
sudo systemctl disable --now nginx) and point HostWall at your app directly; or - move it to another port (for example
127.0.0.1:8081) and use that as HostWall's upstream; or - keep it in front and run HostWall behind it on another port. See Running behind another proxy.
Then sudo systemctl restart hostwall.
Permission denied on port 80 or 443
hostwall run: http listener on :80: listen tcp :80: bind: permission deniedOn Linux, only root (or a program with the CAP_NET_BIND_SERVICE capability) can use ports below 1024.
-
With the systemd service this is handled for you (
AmbientCapabilities=CAP_NET_BIND_SERVICE). If you see this error there, check that you haven't overridden the unit. -
Running by hand: use
sudo hostwall run, or give the binary the capability:sudo setcap cap_net_bind_service=+ep /usr/local/bin/hostwallThe capability is lost when the binary is replaced (for example by an upgrade).
-
For local testing: use high ports in the config, as in examples/local/hostwall.yaml.
-
Docker with
--network hostas non-root can't bind low ports. Use normal port publishing (-p 80:80 -p 443:443).
Certificate not issued
Check the certificate status on the Sites page (or the health message on Overview), and look for certificate failed in the log:
sudo journalctl -u hostwall | grep -i certificateWork through these:
-
DNS points at this server.
dig +short example.com(anddig +short AAAA example.com) must return this server's public IP. A wrong or staleAAAArecord is a common cause: Let's Encrypt prefers IPv6 when it exists. Remove the AAAA record if your server has no IPv6. -
Port 80 is reachable from the internet. Let's Encrypt connects to
http://example.com/.well-known/acme-challenge/.... From another machine:curl -I http://example.com/.well-known/acme-challenge/testYou should get an answer from HostWall (a
404is fine), not a timeout. Checkufw/firewalldand your cloud provider's firewall. Some home ISPs block port 80. -
The site is eligible. The site's
tlsisauto,server.httpsisn't"off", and the hostname is a public name (not an IP, not.local,.lan,.internal,.testand so on). See tls. -
Behind Cloudflare? Use DNS only until the certificate is issued, or see Running behind Cloudflare.
-
Rate limits. Let's Encrypt limits failed validations and duplicate certificates (for example, 5 failed validations per hostname per hour). If the log mentions
rateLimitedortoo many, stop retrying and wait. While testing a new setup, use the staging server:tls: staging: trueStaging certificates aren't trusted by browsers, but the limits are much higher. Once it works, remove
staging.tlssettings are read at startup, so restart after each change:sudo systemctl restart hostwall.
HostWall retries failed certificates automatically. Once DNS and port 80 are fixed, give it a few minutes, or restart to retry straight away.
502 "Website unavailable"
Visitors see "Website unavailable", and the log says:
upstream error site=example.com request_id=... err="dial tcp 127.0.0.1:3000: connect: connection refused"HostWall can't reach your app. Check:
- Is the app running?
curl -i http://localhost:3000on the HostWall server. - Is the address right? The upstream is from HostWall's point of view. In Docker,
localhostis the HostWall container; use the app's service name orhost.docker.internal. See Install: Docker. - HTTPS upstream? An
https://upstream must have a valid certificate for its hostname. Self-signed upstream certificates aren't supported yet; usehttp://on localhost or a private network. - Does the app redirect or reject based on
Host? HostWall forwards the visitor's originalHostheader. Make sure your app accepts your public domain.
The site form in the dashboard has an upstream check that shows what HostWall gets when it connects.
404 "Site not found"
"No website is configured for this address" means no site has this hostname as its domain or in aliases.
- Requests to the server's bare IP address always get this page. That's expected.
- Add the hostname (for example
www.example.com) to the site'saliases. - Behind another proxy, make sure it passes the original
Hostheader. - Wildcards such as
*.example.comdon't match yet. List each hostname. - If you defined the site in the dashboard and the file with the same hostname, the file wins; look for
skipping dashboard sitein the log.
All requests come from the same IP
If every event shows the same client IP, HostWall is seeing a proxy's address instead of your visitors'.
- Behind Cloudflare, a CDN or a load balancer: add it to
server.trusted_proxies(cloudflare,privateor CIDRs). See Running behind Cloudflare and other proxies. - Docker: if the IP is a Docker gateway (such as
172.17.0.1), Docker's userland proxy is in the way. This happens with IPv6 published ports and some rootless setups. Options: publish IPv4 only, disable the userland proxy ("userland-proxy": falsein/etc/docker/daemon.json), or run HostWall without Docker. Don't add the Docker gateway totrusted_proxiesunless something in front of it setsX-Forwarded-For; trusting it doesn't bring back the real IP.
Running behind another proxy
If nginx, Caddy, Traefik or a load balancer must stay in front of HostWall:
- make HostWall listen on another port, and turn HTTPS off for those sites (
server.https: "off"or the site'stls: "off"); - pass the original
Hostheader andX-Forwarded-For; - add the proxy's address to
trusted_proxies(privatecovers localhost and private networks).
Full example: HostWall behind your own reverse proxy.
If the site keeps redirecting to https:// in a loop, the site still has tls: auto behind a proxy that talks to it over HTTP. Set tls: "off" for that site.
Locked out of the dashboard
"Too many failed sign-ins; wait 15 minutes." After 5 failed sign-ins within 15 minutes, sign-in from that IP address is blocked (an account is also blocked after 100 failures in 15 minutes from any addresses). The counter is kept in memory: wait 15 minutes, or restart HostWall to clear it (sudo systemctl restart hostwall). Through an SSH tunnel, every attempt comes from 127.0.0.1, so everyone using a tunnel shares the same counter.
"Wrong username, password or code." The username is admin. Until you have chosen your own password, use the initial password from sudo cat /var/lib/hostwall/initial-admin.txt. If 2FA is on, check that your phone's clock is correct: codes depend on the time. Try the next code when it appears.
Forgot your password or lost your 2FA device? Reset the admin account on the server:
sudo hostwall admin resetIt prints a new random password for admin, turns two-factor sign-in off and signs everyone out. Sign in, choose a new password, and turn 2FA back on in Settings. Sites, exceptions and events are kept.
"Your session has ended." Sessions last 7 days. Changing your password signs out your other sessions.
Can't reach the dashboard
- The dashboard listens on
127.0.0.1:9443by default. From your computer, use a tunnel:ssh -L 9443:127.0.0.1:9443 you@your-server, then open https://localhost:9443. - If port 9443 is busy on your own computer, use another local port:
ssh -L 19443:127.0.0.1:9443 you@your-serverand open https://localhost:19443. - The browser warning about the certificate is expected (it's self-signed). Accept it to continue.
- If you set
server.dashboardto0.0.0.0:9443, restart HostWall and open port 9443 in your firewalls (preferably only for your own IP). - Check that the dashboard is enabled and listening: the log has a
listening name=dashboard ...line at startup.
Config change not applied
- Look for
reload failed; keeping the previous configurationin the log. The reason follows it. Fix the file;sudo hostwall validateshows the same error. - Changes to
server.http,server.https,server.dashboard,server.dashboard_tls,server.metrics,server.data_dirand everything undertlsneed a restart:sudo systemctl restart hostwall. - Under systemd, the service passes
--data /var/lib/hostwall, soserver.data_dirin the file has no effect. - In Docker with a single-file bind mount, an editor that replaces the file breaks the mount. Mount the directory, or restart the container.
- File sites can't be changed in the dashboard or with
hostwall site. Edit the file.
CLI says "no HostWall database"
hostwall status: no hostwall database in /var/lib/hostwall (has hostwall run there yet? use --data to point elsewhere)- Use
sudo. The data directory is only readable by thehostwalluser, and withoutsudothe CLI can't see the database. - If HostWall runs with a different data directory, pass it:
sudo hostwall status --data /path/to/data. - If HostWall has never started, start it first.
Still stuck?
Ask in Discussions → Q&A, or open a bug report. Include hostwall version, how you installed it, the relevant log lines and your config with secrets and private domains removed.