-
-
Notifications
You must be signed in to change notification settings - Fork 238
Managing logs
scubamuc edited this page Aug 6, 2024
·
25 revisions
In the event of an issue the Nextcloud logs could help figure out a probable cause. Most activities and actions in Nextcloud are logged. An automated log rotation mechanism within Nextcloud clears and retains the logs regularly to prevent an overflow.
Tip
Apps for viewing logs:
less is more, from head to tail with cat or bat but lnav is the way to go!
sudo lnav /var/snap/nextcloud/current/logs/nextcloud.log
sudo nextcloud.occ log:watch
sudo truncate -s 0 /var/snap/nextcloud/current/logs/nextcloud.log
- Logs for Nextcloud:
/var/snap/nextcloud/current/logs/nextcloud.log-
Note that this won't be the case if you've configured a custom
datadirectory, for example somewhere in/media. The nextcloud logs will then be stored on that same directory.
-
Note that this won't be the case if you've configured a custom
- Logs for Apache2:
/var/snap/nextcloud/current/logs/apache_access.log - Logs for Redis:
/var/snap/nextcloud/current/logs/redis.log - Logs for PHP-FPM:
/var/snap/nextcloud/current/logs/php-fpm_errors.log - Logs for PHP:
/var/snap/nextcloud/current/logs/php_errors.log - Logs for Certbot:
/var/snap/nextcloud/current/certs/certbot/logs/letsencrypt.log - Logs for MySQL:
/var/snap/nextcloud/current/logs/mysql_errors.log
Nextcloud snap has several services contained within it. There are four that are most important for upgrade purposes:
- MySQL (nextcloud.mysql)
- PHP (nextcloud.php-fpm)
- Apache (nextcloud.apache)
- Nextcloud Fixer (nextcloud.nextcloud-fixer)
sudo snap logs -f nextcloud.mysql
sudo snap logs -f nextcloud.php-fpm
sudo snap logs -f nextcloud.apache
sudo snap logs -f nextcloud.nextcloud-fixer
Nextcloud snap Wiki, use all information and scripts at own risk
- HTTP/HTTPS port configuration
- PHP configuration options
- Hosts & FQDN configuration
- Reverse proxy configuration
- CODE & Nextcloud Office configuration
- HPB client-push configuration
- Managing Nextcloud snap
- Managing automatic updates
- Managing automatic update issues
- Managing external media and storage
- Managing logs
- Managing services
- Managing cron
- Managing HTTP encryption
- OCC management console