Nextcloud, http, https, redirects, Client TLS, my nightmares

Hey! Boringproxy is great. Got all my apps working except nextcloud. I’ve searched the GitHub issues and this forum, tried everything I found, and no luck.

It seems basically to be having the same “http request sent to https” as everyone else. I’ve tried enabling http, I’ve set the termination to client raw tls, I’ve overridden nextcloud’s host and and protocol (and trusted domains) with env vars…

Help me Obi-Wan!

Hey @cloopadoop. Can you provide more details about how you’re running Nexcloud? Are you using the official docker image? Can you share the command you’re using to run it? (with any sensitive data redacted).

@anders Yup, using the official one! I’ve tried a few config options, including the ones here: GitHub - nextcloud/all-in-one: Nextcloud AIO stands for Nextcloud All-in-One and provides easy deployment and maintenance with most features included in this one Nextcloud instance.

And also using this compose file: all-in-one/docker-compose.yml at main · nextcloud/all-in-one · GitHub. Only thing I change is port mapping, since I’m running multiple services from the same host, and then adding a few ENV VARS.

Here’s the last docker run command that Docker Desktop derived from my Portainer config:

docker run --hostname=ef0ba97e7777 --user=root --env=PHP_INI_DIR=/usr/local/etc/php --env=NEXTCLOUD_TRUSTED_DOMAINS=[redacted] --env=OVERWRITEHOST=[redacted] --env=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin --env=PHPIZE_DEPS=autoconf dpkg-dev dpkg file g++ gcc libc-dev make pkgconf re2c --env=PHP_CFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 --env=PHP_CPPFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 --env=PHP_LDFLAGS=-Wl,-O1 -pie --env=GPG_KEYS=[redacted] --env=PHP_VERSION=8.1.18 --env=PHP_URL=https://www.php.net/distributions/php-8.1.18.tar.xz --env=PHP_ASC_URL=https://www.php.net/distributions/php-8.1.18.tar.xz.asc --env=PHP_SHA256=f3553370f8ba42729a9ce75eed17a2111d32433a43b615694f6a571b8bad0e39 --volume=nextcloud_aio_mastercontainer:/mnt/docker-aio-config --volume=/run/desktop/mnt/host/wsl/docker-desktop-bind-mounts/Ubuntu/71329c4cc6e32171553fa81d044eb31d1a3aac52ba9376c4a99f4505c494cf5b:/var/run/docker.sock:ro --workdir=/var/www/docker-aio -p 32680:80 -p 32681:8080 -p 32682:8443 --restart=unless-stopped --label=''desktop.docker.io/wsl-distro=Ubuntu'' --runtime=runc -d nextcloud/all-in-one:latest

Hey @cloopadoop, just wanted to let you know that I plan on trying to get nextcloud working behind a reverse proxy in the near future. I’ll see if I can get it to work with boringproxy as well. Not sure when but hopefully in the next week.

That is extremely exciting, thank you Anders!

I am new here, but i wanted to chime in on this topic as it was my nemesis for a few days. I finally got everything up and running how i need it and Nextcloud wasn’t co-operating.

the http sent to https port was constantly coming up. When creating the tunnel i choose TLS termination as Passthough and it works fine now. (i am using unraid and linuxserver.io docker on the client side) I do get a certificate error but i think its due to that particular setup and doesn’t bother me much as I’m the only user

I just wanted to add this here for anyone in the future that’s having issues to perhaps try the PASSTHROUGH and see if it helps

1 Like