FAQ
Startup Issues
Port Already in Use
Error: Address already in use (os error 98)Find the process occupying the port:
bash
ss -tlnp | grep :443
# or
fuser 443/tcpCertificate Not Found
TLS error: no certificate found for example.com- Check if the
rootpath is correct - If using ACME, confirm
acme_emailis set - If using manual certificates, confirm
cert/keypaths exist and are readable - Run
sweety validatefor detailed errors
Permission Denied (Binding 80/443)
bash
# Method 1: setcap (recommended, no root needed at runtime)
sudo setcap 'cap_net_bind_service=+ep' /usr/local/bin/sweety
# Method 2: systemd (recommended), add to [Service]
AmbientCapabilities=CAP_NET_BIND_SERVICEACME / Certificate Issues
Certificate Issuance Failed
- Confirm domain DNS resolves to the server IP
- Confirm port 80 is accessible (required for HTTP-01 validation)
- Let's Encrypt has rate limits (5 per domain per week). Use staging for testing:
toml
[sites.tls]
acme = true
acme_email = "your@email.com"
acme_provider = "https://acme-staging-v02.api.letsencrypt.org/directory""Too Many Redirects" After HTTPS Redirect
Ensure force_https = true is only on the HTTP site config:
toml
[[sites]]
listen = [80]
listen_tls = [443]
force_https = true # Only affects HTTP 80, HTTPS requests won't redirect againFastCGI / PHP Issues
PHP Returns 502
- Check if PHP-FPM is running:
systemctl status php8.2-fpm - Check socket path:
ls -la /run/php/php8.2-fpm.sock - Confirm Sweety's user has permission to access the socket
PHP File Upload Fails
toml
[global]
client_max_body_size = 100 # MB, default 50MBAlso confirm upload_max_filesize and post_max_size in php.ini are large enough.
HTTP/3 Issues
Browser Not Using HTTP/3
- Confirm firewall allows UDP port 443
- Confirm TLS certificate is valid (HTTP/3 does not accept self-signed certificates)
- First visit uses HTTP/2; the browser discovers HTTP/3 via
Alt-Svcheader and upgrades on the next request
Verify HTTP/3 is Working
bash
curl -I --http3 https://your.domain.com
# Response headers should include alt-svc: h3=":443"Hot Reload Issues
sweety reload Fails
Confirm global.admin_listen is configured:
toml
[global]
admin_listen = "127.0.0.1:9099"The reload command sends a signal via the Admin API — it won't work without this setting.
Performance Issues
503 Under High Concurrency
Adjust:
toml
[global]
worker_threads = 0 # 0 = auto-detect CPU cores
worker_connections = 51200
max_connections = 50000System level:
bash
# Increase file descriptor limit
ulimit -n 65535
# Or configure in /etc/security/limits.confStatic File Cache Tuning
For CDN or multi-site deployments, default cache parameters may be insufficient:
toml
[global]
open_file_cache_max = 500000 # Increase entry limit (default 200000)
open_file_cache_total_mb = 1024 # Increase memory limit to 1GB (default 512MB)
open_file_cache_inactive = 120 # Extend inactivity timeout (default 60s)See Global Configuration → Static File Cache for details.