# NextCloud NextCloud in a container. A simple PHP-FPM deployment. You'll need the Web Server container setup to get access. This just gives a very basic, non-web-server version of NextCloud. *NOTE: You may want to use a filesystem on a [USB drive](../hardware/usb-flash-drive.md) instead of /var for the volumes setup in the below Docker command(s) to help reduce writes to the micro sd card* ## Inspiration / Sources - [https://github.com/nextcloud/docker](https://github.com/nextcloud/docker) - [https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion](https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion) - [https://hub.docker.com/_/nextcloud/](https://hub.docker.com/_/nextcloud/) - [https://hub.docker.com/r/arm64v8/nextcloud/](https://hub.docker.com/r/arm64v8/nextcloud/) - [https://hub.docker.com/r/arm32v5/nextcloud/](https://hub.docker.com/r/arm32v5/nextcloud/) - [https://hub.docker.com/r/arm32v7/nextcloud/](https://hub.docker.com/r/arm32v7/nextcloud/) ## Install / Update / Run Script Setup a generic script that'll auto update NextCloud, build a container and launch it. You should only run this script at first launch and/or when you're looking for updates. ``` bash mkdir -p /var/nextcloud/data /var/nextcloud/config chown -R www-data: /var/nextcloud wget -O nextcloud.sh https://git.lollipopcloud.solutions/lollipop-docker/misc/raw/branch/master/run_nextcloud.sh chmod a+x /scratch/docker/nextcloud.sh ``` ## Run NextCloud Simply execute ```/scratch/docker/nextcloud.sh``` to update/run NextCloud. ## Update Unbound ``` bash cat > /etc/unbound/local_zone/nextcloud.conf < /etc/caddy/services/nextcloud.conf < 'activity',``` to the file. #### Add Cronjob In the settings change from ```Ajax``` for scheduled jobs to ```Cron``` and run the following commands on your device. This will lessen the page loads and keep the cron job constrained to a reasonable duration. ``` bash cat > /etc/systemd/system/nextcloudcron.service < /etc/systemd/system/nextcloudcron.timer <