Skip to main content
Version: 4.1

Troubleshooting Caddy Webserver

On the host-services stack every site is served through the front end (hitechcloud-frontend, nginx on ports 80 and 443), which hands each domain to the web server its owner chose. Caddy is one of those web servers: the hitechcloud-caddy service, listening on 127.0.0.1. If Caddy is down, only the sites set to run on Caddy are down.

1. Check that Caddy is running​

systemctl status hitechcloud-caddy

active (running) means Caddy is up. If one website does not answer while Caddy runs, troubleshoot that domain on its own (its vhost, its PHP version, its certificate).

2. Validate the configuration​

A syntax error in the main configuration or in one domain's file stops Caddy from starting; the service checks the configuration before it starts.

caddy validate --config /etc/hitechcloud/native/caddy/Caddyfile --adapter caddyfile
  • warn or info messages are fine.
  • Any error must be resolved before Caddy will start.

The panel writes the configuration from its templates. To have it written again for every site:

hitechcloudcli vhost rebuild all

3. Restart it​

systemctl restart hitechcloud-caddy

4. Resource limits​

Caddy runs as a systemd service. To give it a CPU or memory ceiling, or a higher one, use a drop-in:

systemctl edit hitechcloud-caddy
[Service]
CPUQuota=200%
MemoryMax=2G

Then systemctl restart hitechcloud-caddy.

5. View logs​

journalctl -u hitechcloud-caddy -f

Per-domain logs are under /var/log/hitechcloud/native/domains/.

Copy any errors and search online or post them on our Discord channel or HiTechCloud forums for help.