# Nextcloud AIO + Caddy (Local Domain) This stack deploys Nextcloud AIO with a local Caddy reverse proxy for `https://nextcloud.test`. ## 1) Prerequisites - Docker Engine + Docker Compose plugin installed - Host paths created: - `/srv/nextcloud` - `/srv/nextcloud/data` ## 2) Configure ```bash cp .env.example .env ``` Edit `.env` and set at minimum: - `AIO_APACHE_PORT` - `AIO_INTERFACE_BIND` - `AIO_DOCKER_API_PROXY_PORT` - `AIO_NC_APACHE_PORT` - `AIO_NC_APACHE_BINDING` - `NEXTCLOUD_DATADIR` / `NEXTCLOUD_MOUNT` - `NEXTCLOUD_DOMAIN` - `CADDY_TLS` Add local DNS mapping: ```text 127.0.0.1 nextcloud.test ``` ## 3) Deploy ```bash docker compose --env-file .env up -d ``` ## 4) First-run AIO setup Open: - `https://127.0.0.1:8080/setup` for initial AIO setup - `https://nextcloud.test` for Nextcloud via Caddy AIO will bootstrap and manage the internal Nextcloud containers after setup. When setup asks for domain, enter: - `nextcloud.test` ## 5) Operations ```bash # Validate compose docker compose --env-file .env config # Pull updates docker compose --env-file .env pull # Recreate updated services docker compose --env-file .env up -d # Logs docker compose --env-file .env logs -f nextcloud-aio-mastercontainer # Re-trust Caddy local CA inside Collabora (run after Collabora container recreate) ./scripts/retrust-collabora-caddy-ca.sh # Install macOS launchd automation (runs at login and every 5 minutes) ./scripts/install-launchd-retrust.sh # Uninstall macOS launchd automation ./scripts/uninstall-launchd-retrust.sh ``` ## Notes - `AIO_DOCKER_API_PROXY_PORT` is bound to loopback by default for safer local-only management access. - `CADDY_TLS=internal` issues a local CA certificate; trust prompt may appear in browser/OS on first use. - AIO internal HTTPS endpoint on `8443` can still be used for troubleshooting. - To get initial passphrase: - `docker exec nextcloud-aio-mastercontainer sh -lc "grep -R --line-number -i 'passphrase\|password\|AIO' /mnt/docker-aio-config/data 2>/dev/null | head -n 80"`