nextcloud: expose port 8084 for testing without NPM

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
code
2026-10-01 18:23:20 +00:00
co-authored by Claude Opus 5.5
parent 66fd5c3cac
commit cad7beb975
3 changed files with 7 additions and 0 deletions
+4
View File
@@ -18,6 +18,8 @@ Self-hosted file sync, sharing, and collaboration platform. This stack runs Next
3. In NPM, add a proxy host for `NEXTCLOUD_DOMAIN` → `http://nextcloud:80` with SSL enabled 3. In NPM, add a proxy host for `NEXTCLOUD_DOMAIN` → `http://nextcloud:80` with SSL enabled
4. Open https://NEXTCLOUD_DOMAIN and create the admin account (the database fields are pre-filled from the environment) 4. Open https://NEXTCLOUD_DOMAIN and create the admin account (the database fields are pre-filled from the environment)
To test without NPM, open http://HOST_IP:8084. Set `NEXTCLOUD_DOMAIN=HOST_IP` and `NEXTCLOUD_OVERWRITEPROTOCOL=http` first. Otherwise Nextcloud rejects the untrusted domain and redirects you to https links that don't work.
## Environment Variable Notes ## Environment Variable Notes
NEXTCLOUD_IMAGE – default: nextcloud:35 (pin the major version, see Gotchas) NEXTCLOUD_IMAGE – default: nextcloud:35 (pin the major version, see Gotchas)
@@ -31,6 +33,7 @@ Self-hosted file sync, sharing, and collaboration platform. This stack runs Next
NEXTCLOUD_REDIS_HOST – default: nextcloud-redis NEXTCLOUD_REDIS_HOST – default: nextcloud-redis
NEXTCLOUD_DOMAIN – public hostname without a scheme; sets trusted_domains (first install only) and overwrite.cli.url NEXTCLOUD_DOMAIN – public hostname without a scheme; sets trusted_domains (first install only) and overwrite.cli.url
NEXTCLOUD_TRUSTED_PROXIES – default: 172.16.0.0/12 (Docker bridge range, covers NPM) NEXTCLOUD_TRUSTED_PROXIES – default: 172.16.0.0/12 (Docker bridge range, covers NPM)
NEXTCLOUD_PORT – default: 8084; host port for testing without NPM (NPM connects to nextcloud:80)
NEXTCLOUD_OVERWRITEPROTOCOL – default: https; generates https links behind NPM's TLS termination NEXTCLOUD_OVERWRITEPROTOCOL – default: https; generates https links behind NPM's TLS termination
VOL_CACHE – default: /var/cache; base path for regenerable data (exclude from backups) VOL_CACHE – default: /var/cache; base path for regenerable data (exclude from backups)
NEXTCLOUD_PREVIEW_DIR – default: /mnt/nextcloud-preview (unused placeholder); after install, set to /var/www/html/data/appdata_<instanceid>/preview NEXTCLOUD_PREVIEW_DIR – default: /mnt/nextcloud-preview (unused placeholder); after install, set to /var/www/html/data/appdata_<instanceid>/preview
@@ -74,6 +77,7 @@ Nextcloud needs the database container to run, so use compose. The app container
docker run -d \ docker run -d \
--name nextcloud \ --name nextcloud \
--network proxy \ --network proxy \
-p 8084:80 \
-e MYSQL_HOST=nextcloud-db \ -e MYSQL_HOST=nextcloud-db \
-e MYSQL_DATABASE=nextcloud \ -e MYSQL_DATABASE=nextcloud \
-e MYSQL_USER=nextcloud \ -e MYSQL_USER=nextcloud \
+2
View File
@@ -38,6 +38,8 @@ services:
- TRUSTED_PROXIES=${NEXTCLOUD_TRUSTED_PROXIES:-172.16.0.0/12} - TRUSTED_PROXIES=${NEXTCLOUD_TRUSTED_PROXIES:-172.16.0.0/12}
- OVERWRITEPROTOCOL=${NEXTCLOUD_OVERWRITEPROTOCOL:-https} - OVERWRITEPROTOCOL=${NEXTCLOUD_OVERWRITEPROTOCOL:-https}
- OVERWRITECLIURL=https://${NEXTCLOUD_DOMAIN:-cloud.example.com} - OVERWRITECLIURL=https://${NEXTCLOUD_DOMAIN:-cloud.example.com}
ports: # Can remove this for proxy
- "${NEXTCLOUD_PORT:-8084}:80"
networks: networks:
- proxy - proxy
- internal - internal
+1
View File
@@ -4,6 +4,7 @@ VOL_PATH=/data
VOL_CACHE=/var/cache VOL_CACHE=/var/cache
NEXTCLOUD_IMAGE=nextcloud:35 NEXTCLOUD_IMAGE=nextcloud:35
NEXTCLOUD_RESTART=unless-stopped NEXTCLOUD_RESTART=unless-stopped
NEXTCLOUD_PORT=8084
MARIADB_IMAGE=mariadb:11.8 MARIADB_IMAGE=mariadb:11.8
MARIADB_RESTART=unless-stopped MARIADB_RESTART=unless-stopped
REDIS_IMAGE=redis:alpine REDIS_IMAGE=redis:alpine