From 1fc3f4bcf110037b490422b6d2a8572ed3f99b7b Mon Sep 17 00:00:00 2001 From: Diaco Soltanpour Date: Wed, 25 Feb 2026 00:47:31 +0330 Subject: [PATCH] first commit --- README.md | 82 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..1b2f858 --- /dev/null +++ b/README.md @@ -0,0 +1,82 @@ +# 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"`