Skip to Content
HostWall

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?

InstallHostWall's own log
systemd (install script)sudo journalctl -u hostwall -f
Dockerdocker logs -f hostwall
hostwall run in a terminalThe 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 --debug

Then 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 use

Another 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 denied

On 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/hostwall

    The 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 host as 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 certificate

Work through these:

  1. DNS points at this server. dig +short example.com (and dig +short AAAA example.com) must return this server's public IP. A wrong or stale AAAA record is a common cause: Let's Encrypt prefers IPv6 when it exists. Remove the AAAA record if your server has no IPv6.

  2. 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/test

    You should get an answer from HostWall (a 404 is fine), not a timeout. Check ufw/firewalld and your cloud provider's firewall. Some home ISPs block port 80.

  3. The site is eligible. The site's tls is auto, server.https isn't "off", and the hostname is a public name (not an IP, not .local, .lan, .internal, .test and so on). See tls.

  4. Behind Cloudflare? Use DNS only until the certificate is issued, or see Running behind Cloudflare.

  5. Rate limits. Let's Encrypt limits failed validations and duplicate certificates (for example, 5 failed validations per hostname per hour). If the log mentions rateLimited or too many, stop retrying and wait. While testing a new setup, use the staging server:

    tls:
      staging: true

    Staging certificates aren't trusted by browsers, but the limits are much higher. Once it works, remove staging. tls settings 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:3000 on the HostWall server.
  • Is the address right? The upstream is from HostWall's point of view. In Docker, localhost is the HostWall container; use the app's service name or host.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; use http:// on localhost or a private network.
  • Does the app redirect or reject based on Host? HostWall forwards the visitor's original Host header. 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's aliases.
  • Behind another proxy, make sure it passes the original Host header.
  • Wildcards such as *.example.com don'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 site in 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, private or 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": false in /etc/docker/daemon.json), or run HostWall without Docker. Don't add the Docker gateway to trusted_proxies unless something in front of it sets X-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's tls: "off");
  • pass the original Host header and X-Forwarded-For;
  • add the proxy's address to trusted_proxies (private covers 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 reset

It 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:9443 by 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-server and open https://localhost:19443.
  • The browser warning about the certificate is expected (it's self-signed). Accept it to continue.
  • If you set server.dashboard to 0.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 configuration in the log. The reason follows it. Fix the file; sudo hostwall validate shows the same error.
  • Changes to server.http, server.https, server.dashboard, server.dashboard_tls, server.metrics, server.data_dir and everything under tls need a restart: sudo systemctl restart hostwall.
  • Under systemd, the service passes --data /var/lib/hostwall, so server.data_dir in 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 the hostwall user, and without sudo the 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.

Edit this page on GitHub

On this page