Nextcloud
Nextcloud is an open source content collaboration platform and file hosting service.
View the nix-core NixOS module on GitHub.
References
Setup
- Login as the default admin user "nextcloud" with the same password.
- Create a new user and add "admin" under "Groups" to make him an admin user.
- Log out and in as the new user.
- Delete the user "nextcloud".
Sops
Provide the following entries to your secrets.yaml if you enabled mailIntegration:
Replace
abc123with your actual secrets
Config
Apps
Installing apps via the web interface is disabled. You have to use services.nextcloud.extraApps.
Configuring them works as usual in the web interface.
Maintenance
Admin CLI
Use Nextcloud's occ command for server operations. On NixOS, it is available under the wrapper script nextcloud-occ. Refer to the Nextcloud docs on how to use the occ command, especially the Maintenance commands. Here are some useful commands:
- General housekeeping:
sudo nextcloud-occ maintenance:repair --include-expensive
Logging
Nextcloud's logs are handled through systemd. Relevant services are:
phpfpm-nextcloud.service: PHP-FPM processes that run the Nextcloud application code - application-level logsnextcloud-cron.service: Runs Nextcloud's background jobs and maintenance tasks - cron job execution logsnginx.service: Web server that handles HTTP requests - access and connection logs
You can check these logs with:
These flags might be useful:
-p err: Show only error-level messages and above-f: Follow logs in real-time--since today: Show logs from today onwards
Troubleshooting
AppAPI default deploy daemon is not set
This error is expected behavior. Disable the AppAPI app in the administration web interface.
Nextcloud is not installed
During update or rollback, it may happen that nextcloud-setup.service and nextcloud-update-db.service fail with:
Add this to Nextcloud's config (/var/lib/nextcloud/config/config.php by default):
Rebuild your machine.