The main documentation repository for the 🍭☁️
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long. 5.4KB


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 instead of /var for the volumes setup in the below Docker command(s) to help reduce writes to the micro sd card

Inspiration / Sources

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.

mkdir -p /var/nextcloud/data /var/nextcloud/config
chown -R www-data: /var/nextcloud

wget -O
chmod a+x /scratch/docker/

Run NextCloud

Simply execute /scratch/docker/ to update/run NextCloud.

Update Unbound

cat > /etc/unbound/local_zone/nextcloud.conf <<EOF
local-data: "nextcloud-insecure A"
local-data-ptr: " nextcloud-insecure"
local-data: "nextcloud-insecure.domain.tld A"
local-data-ptr: " nextcloud-insecure.domain.tld"

local-data: "nextcloud A"
local-data: "nextcloud.domain.tld A"
local-data-ptr: " nextcloud"
local-data-ptr: " nextcloud.domain.tld"

Serving Via Caddy

cat > /etc/caddy/services/nextcloud.conf <<EOF
# Nextcloud proxy
nextcloud.domain.tld {
    tls user@domain.domain.tld
    redir 301 {
        if {scheme} is http
        /  https://nextcloud.domain.tld{uri}

    log /var/log/caddy/nextcloud.log
    proxy / {

First Run / Finalize Setup

  • Navigate to http://nextcloud-insecure.domain.tld
  • Follow on-screen prompts for finalizing the NextCloud setup
    • Use as postgres IP if using postgres
    • If the gateway times out watch htop for postgres setup to finish then reload the page.
  • Login as Admin

Post Install

Update/Install/Enable Apps

Enabled Apps

  • Update any apps that are showing as out of date

Disabled apps

  • Enable Auditing / Logging app
  • Enable Default encryption module
  • Enable external storage support
  • Enable PDF Viewer


  • Install External sites app


  • Install Group folders app

Office & Text

  • Enable Calendar app
  • Enable Contacts app
  • Enable Notes app
  • Enable Tasks app


  • Install Annoucement center app
  • Enable bookmarks app


  • Enable brute force settings app
  • Enable restrict login to IP addresses app
  • Enable Two Factor TOTP Provider app
  • Enable Two Factor U2F app
  • Enable Two Factory Yubikey

Social & communication

  • Enable circles app


  • Enable Impersonate app

Basic Setup

Adjust default view

If you’d like to see the activities view as your default view in NextCloud, edit /var/nextcloud/config/config.php and add 'defaultapp' => '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.

cat > /etc/systemd/system/nextcloudcron.service <<EOF
Description=Nextcloud cron.php job

ExecStart=/usr/bin/docker exec --user www-data nextcloud php /var/www/html/cron.php


cat > /etc/systemd/system/nextcloudcron.timer <<EOF
Description=Run Nextcloud cron.php every 90 minutes



systemctl daemon-reload
systemctl start nextcloudcron.timer
systemctl enable nextcloudcron.timer

Adjust Sharing settings

  • Disable Allow public uploads
  • Disable Allow users on this server to send shares to other servers
  • Disable Send password by mail

Adjust Security settings

Recommended Settings (Up to you)

  • Minimal Length : 12
  • Forbid common passwords
  • Enforce upper and lower case characters
  • Enforce numeric characters

Setup Apps

Configure groups (as appropriate)

  • Create group for standard users
  • Create group folder for the new group (non-syncthing dumping ground for sync)
  • Setup shared contacts list for new group
  • Setup shared calendar for new group