Logs¶
Web logs help you debug issues and see who accessed your site. Caddy access logs
and Apache error logs are disabled by default. Use uberspace web log to enable
them. PHP error logging is configured separately.
Logs are rotated daily and kept for seven days. The ~/logs directory is
excluded from backups.
Full IP addresses in error logs
Caddy access logs mask IP addresses, but error logs can contain full IP addresses. To avoid recording full IP addresses in error logs, keep Apache error logging disabled and disable PHP error logging. If your application writes its own error logs, disable those in its configuration too.
Manage web logs¶
You can enable and disable these logs independently:
| Log | Contents | Directory |
|---|---|---|
caddy-access |
Access logs from Caddy, which routes all incoming web requests | ~/logs/caddy |
apache-error |
Error logs from Apache, the default web backend | ~/logs/apache |
To check which logs are enabled, use uberspace web log list. Example output
with both logs disabled:
[isabell@moondust ~]$ uberspace web log list
Log Path Enabled
────────────────────────────────────────
caddy-access ~/logs/caddy False
apache-error ~/logs/apache False
Enable logs¶
Enable access logging to record incoming requests. Example output:
[isabell@moondust ~]$ uberspace web log enable caddy-access
OK: Enabled log for 'caddy-access' at path '~/logs/caddy'
If your site uses the Apache backend, you can also enable its error log. Example output:
[isabell@moondust ~]$ uberspace web log enable apache-error
OK: Enabled log for 'apache-error' at path '~/logs/apache'
Disable logs¶
To stop logging, disable the logs you no longer need. Example output:
[isabell@moondust ~]$ uberspace web log disable caddy-access
OK: Disabled log for 'caddy-access'
[isabell@moondust ~]$ uberspace web log disable apache-error
OK: Disabled log for 'apache-error'
Access logs¶
Privacy
To protect user privacy, Caddy access logs retain only the first 16 bits of an IPv4 address and the first 32 bits of an IPv6 address, while the rest are set to zero.
Using the IP addresses of uberspace.de as an example, 82.98.87.93 and 2a02:2e0:3fc:52:0:62:5768:38 are converted to 82.98.0.0 and 2a02:2e0::, respectively, in the actual log files.
After enabling caddy-access, you can find your webserver's access log at
~/logs/caddy, which resolves to /var/log/caddy-userlogs/$USER.
[isabell@moondust ~]$ tail --follow=name ~/logs/caddy/access.log
{"level":"info","ts":"2026-07-11T11:02:18.428+0200","logger":"http.log.access.[...]","msg":"handled request","request":{"client_ip":"192.0.0.0","proto":"HTTP/2.0","method":"GET","host":"isabell.uber.space","uri":"/robots.txt","headers":{"User-Agent":["[...]"]}},"bytes_read":0,"user_id":"","duration":0.002604887,"size":512,"status":200}
Each line is a JSON object. The most relevant fields are:
{
"ts": "2026-07-11T11:02:18.428+0200",
"request": {
"client_ip": "192.0.0.0",
"proto": "HTTP/2.0",
"method": "GET",
"host": "isabell.uber.space",
"uri": "/robots.txt"
},
"status": 200,
"size": 512,
"duration": 0.002604887
}
You can use jq to filter and format the log, for example to only show the timestamp, method, path and status code:
[isabell@moondust ~]$ tail --follow=name ~/logs/caddy/access.log | jq --unbuffered --raw-output '[.ts, .request.method, .request.uri, .status] | @tsv'
2026-07-11T11:02:18.428+0200 GET /robots.txt 200
Apache error logs¶
After enabling apache-error, you can find Apache's error log at
~/logs/apache/error_log_apache. Use it to investigate errors when your site
uses the default Apache backend.
PHP error logs¶
PHP error logging is controlled through your PHP-FPM configuration, rather than
uberspace web log. You can enable or disable it in ~/.config/php-fpm.conf.
See PHP error logging for the settings and how to
apply them.