As a beginner in administration, but with an IT background, I would like to create Nextloud access that is also available externally. I wanted to run this in a Docker container on a device.
Unfortunately i ran into the following issue, when trying to connect in my browser (local and public address):
SSL_ERROR_INTERNAL_ERROR_ALERT
First a summary of my configuration:
Device:
OS: Fedora Linux 39 (Server Edition)
RAM: 16GB
CPU: Intel N100
Further is a pihole running in a container with all DNS Servers checked.
I tried to follow the following tutorial for the installation:
https://linuxiac.com/how-to-install-nextcloud-with-docker-compose/
I bought a domain name from name.com further referred as “domain.de”. There i created an “A” record subdomain “nextcloud.domain.de” pointing to my public ipv4 address. Which is the subdomain i entered into the docker-compose.yaml and .env, as in the tutorial, and successfully forwards me to my public ipv4.
On my router, a FRITZ!Box 6591 Cable, as well as on my server i enabled the ports 443 and 80. I also enabled it for the docker container.
After following the guide, the processes are running as follow (docker ps):
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
40aa9f633bac nginx:alpine "/docker-entrypoint.…" 59 minutes ago Up 59 minutes 80/tcp nextcloud-web
9db337d53895 nextcloud:stable-fpm "/entrypoint.sh php-…" 59 minutes ago Up 59 minutes 9000/tcp nextcloud-app
0e475b7b41a1 nextcloud:stable-fpm "/cron.sh" 59 minutes ago Up 59 minutes 9000/tcp nextcloud-cron
113e99e28e64 lucaslorentz/caddy-docker-proxy:ci-alpine "/bin/caddy docker-p…" 59 minutes ago Up 59 minutes 0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp, 2019/tcp reverse-proxy
bc7176048b52 mariadb:10.11 "docker-entrypoint.s…" 59 minutes ago Up 59 minutes 3306/tcp mariadb-database
27229a9cd71f redis:alpine "docker-entrypoint.s…" 59 minutes ago Up 59 minutes 6379/tcp redis-dbcache
267feb0b7adc pihole/pihole:latest "/s6-init" 3 days ago Up 2 days (healthy) 0.0.0.0:53->53/udp, :::53->53/udp, 0.0.0.0:53->53/tcp, 0.0.0.0:67->67/udp, :::53->53/tcp, :::67->67/udp, 0.0.0.0:8080->80/tcp, :::8080->80/tcp pihole
Now i tried to solve it with ChatGPT, but that was unsuccessful, but it directed me to the following logs. Often was the Caddyfile mentioned, but i don’t know how to access it, since:
it generates an in-memory “Caddyfile”
reverse-proxy:
{"level":"info","ts":1707577570.219483,"logger":"docker-proxy","msg":"Running caddy proxy server"}
{"level":"info","ts":1707577570.2218099,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//localhost:2019","//[::1]:2019","//127.0.0.1:2019"]}
{"level":"info","ts":1707577570.2220664,"msg":"autosaved config (load with --resume flag)","file":"/config/caddy/autosave.json"}
{"level":"info","ts":1707577570.2220752,"logger":"docker-proxy","msg":"Running caddy proxy controller"}
{"level":"info","ts":1707577570.2233665,"logger":"docker-proxy","msg":"Start","CaddyfilePath":"","EnvFile":"","LabelPrefix":"caddy","PollingInterval":30,"ProxyServiceTasks":true,"ProcessCaddyfile":true,"ScanStoppedContainers":false,"IngressNetworks":"[nextcloud_network]","DockerSockets":[""],"DockerCertsPath":[""],"DockerAPIsVersion":[""]}
{"level":"info","ts":1707577570.2248712,"logger":"docker-proxy","msg":"Connecting to docker events","DockerSocket":""}
{"level":"info","ts":1707577570.2252162,"logger":"docker-proxy","msg":"IngressNetworksMap","ingres":"map[c5393474a4c8edba72c06cab1db7bfc9279176cc398cf75a649d6be986bf322f:true nextcloud_network:true]"}
{"level":"info","ts":1707577570.2364483,"logger":"docker-proxy","msg":"Swarm is available","new":false}
{"level":"info","ts":1707577570.2396436,"logger":"docker-proxy","msg":"New Caddyfile","caddyfile":"# Empty caddyfile"}
{"level":"warn","ts":1707577570.2399669,"logger":"docker-proxy","msg":"Caddyfile to json warning","warn":"[Caddyfile:1: Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies]"}
{"level":"info","ts":1707577570.2399783,"logger":"docker-proxy","msg":"New Config JSON","json":"{}"}
{"level":"info","ts":1707577570.2400258,"logger":"docker-proxy","msg":"Sending configuration to","server":"localhost"}
{"level":"info","ts":1707577570.2408218,"logger":"admin.api","msg":"received request","method":"POST","host":"localhost:2019","uri":"/load","remote_ip":"127.0.0.1","remote_port":"48264","headers":{"Accept-Encoding":["gzip"],"Content-Length":["41"],"Content-Type":["application/json"],"User-Agent":["Go-http-client/1.1"]}}
{"level":"info","ts":1707577570.2409077,"msg":"config is unchanged"}
{"level":"info","ts":1707577570.2409143,"logger":"admin.api","msg":"load complete"}
{"level":"info","ts":1707577570.2410192,"logger":"docker-proxy","msg":"Successfully configured","server":"localhost"}
{"level":"info","ts":1707577570.6779194,"logger":"docker-proxy","msg":"New Caddyfile","caddyfile":"nextcloud.domain.de {\n\theader /* {\n\t\tStrict-Transport-Security max-age=15552000;\n\t}\n\treverse_proxy 172.19.0.7\n\trewrite /.well-known/acme-challenge/ /remote.php/dav\n\trewrite /.well-known/caldav /remote.php/dav\n\trewrite /.well-known/carddav /remote.php/dav\n\trewrite /.well-known/nodeinfo /index.php/.well-known/nodeinfo\n\trewrite /.well-known/webfinger /index.php/.well-known/webfinger\n}\n"}
{"level":"info","ts":1707577570.6817713,"logger":"docker-proxy","msg":"New Config JSON","json":"{\"apps\":{\"http\":{\"servers\":{\"srv0\":{\"listen\":[\":443\"],\"routes\":[{\"match\":[{\"host\":[\"nextcloud.domain.de\"]}],\"handle\":[{\"handler\":\"subroute\",\"routes\":[{\"handle\":[{\"handler\":\"headers\",\"response\":{\"set\":{\"Strict-Transport-Security\":[\"max-age=15552000;\"]}}}],\"match\":[{\"path\":[\"/*\"]}]},{\"group\":\"group0\",\"handle\":[{\"handler\":\"rewrite\",\"uri\":\"/remote.php/dav\"}],\"match\":[{\"path\":[\"/.well-known/acme-challenge/\"]}]},{\"group\":\"group0\",\"handle\":[{\"handler\":\"rewrite\",\"uri\":\"/index.php/.well-known/webfinger\"}],\"match\":[{\"path\":[\"/.well-known/webfinger\"]}]},{\"group\":\"group0\",\"handle\":[{\"handler\":\"rewrite\",\"uri\":\"/index.php/.well-known/nodeinfo\"}],\"match\":[{\"path\":[\"/.well-known/nodeinfo\"]}]},{\"group\":\"group0\",\"handle\":[{\"handler\":\"rewrite\",\"uri\":\"/remote.php/dav\"}],\"match\":[{\"path\":[\"/.well-known/carddav\"]}]},{\"group\":\"group0\",\"handle\":[{\"handler\":\"rewrite\",\"uri\":\"/remote.php/dav\"}],\"match\":[{\"path\":[\"/.well-known/caldav\"]}]},{\"handle\":[{\"handler\":\"reverse_proxy\",\"upstreams\":[{\"dial\":\"172.19.0.7:80\"}]}]}]}],\"terminal\":true}]}}}}}"}
{"level":"info","ts":1707577570.6818514,"logger":"docker-proxy","msg":"Sending configuration to","server":"localhost"}
{"level":"info","ts":1707577570.6822155,"logger":"admin.api","msg":"received request","method":"POST","host":"localhost:2019","uri":"/load","remote_ip":"127.0.0.1","remote_port":"48264","headers":{"Accept-Encoding":["gzip"],"Content-Length":["1073"],"Content-Type":["application/json"],"User-Agent":["Go-http-client/1.1"]}}
{"level":"info","ts":1707577570.6835005,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//localhost:2019","//[::1]:2019","//127.0.0.1:2019"]}
{"level":"info","ts":1707577570.683787,"logger":"http.auto_https","msg":"server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS","server_name":"srv0","https_port":443}
{"level":"info","ts":1707577570.6838162,"logger":"http.auto_https","msg":"enabling automatic HTTP->HTTPS redirects","server_name":"srv0"}
{"level":"info","ts":1707577570.68386,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc0008bc900"}
{"level":"info","ts":1707577570.685509,"logger":"http","msg":"enabling HTTP/3 listener","addr":":443"}
{"level":"info","ts":1707577570.6861784,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]}
{"level":"info","ts":1707577570.6862957,"logger":"http.log","msg":"server running","name":"remaining_auto_https_redirects","protocols":["h1","h2","h3"]}
{"level":"info","ts":1707577570.6863084,"logger":"http","msg":"enabling automatic TLS certificate management","domains":["nextcloud.domain.de"]}
{"level":"info","ts":1707577570.6875813,"msg":"autosaved config (load with --resume flag)","file":"/config/caddy/autosave.json"}
{"level":"info","ts":1707577570.6876369,"logger":"admin.api","msg":"load complete"}
{"level":"info","ts":1707577570.6878622,"logger":"docker-proxy","msg":"Successfully configured","server":"localhost"}
{"level":"warn","ts":1707577570.6878984,"logger":"tls","msg":"storage cleaning happened too recently; skipping for now","storage":"FileStorage:/data/caddy","instance":"3b206458-607a-4634-9425-21a316386329","try_again":1707663970.687895,"try_again_in":86399.999999252}
{"level":"info","ts":1707577570.6879976,"logger":"tls","msg":"finished cleaning storage units"}
{"level":"info","ts":1707577570.691727,"logger":"admin","msg":"stopped previous server","address":"localhost:2019"}
nextcloud-app:
crond: crond (busybox 1.35.0) started, log level 8
crond: USER www-data pid 7 cmd php -f /var/www/html/cron.php
Exception: Not installed in /var/www/html/lib/base.php:283
Stack trace:
#0 /var/www/html/lib/base.php(709): OC::checkInstalled(Object(OC\SystemConfig))
#1 /var/www/html/lib/base.php(1196): OC::init()
#2 /var/www/html/cron.php(43): require_once('/var/www/html/l...')
#3 {main}
crond: USER www-data pid 8 cmd php -f /var/www/html/cron.php
Exception: Not installed in /var/www/html/lib/base.php:283
Stack trace:
#0 /var/www/html/lib/base.php(709): OC::checkInstalled(Object(OC\SystemConfig))
#1 /var/www/html/lib/base.php(1196): OC::init()
#2 /var/www/html/cron.php(43): require_once('/var/www/html/l...')
#3 {main}
crond: USER www-data pid 9 cmd php -f /var/www/html/cron.php
Exception: Not installed in /var/www/html/lib/base.php:283
Stack trace:
#0 /var/www/html/lib/base.php(709): OC::checkInstalled(Object(OC\SystemConfig))
#1 /var/www/html/lib/base.php(1196): OC::init()
#2 /var/www/html/cron.php(43): require_once('/var/www/html/l...')
#3 {main}
crond: USER www-data pid 10 cmd php -f /var/www/html/cron.php
Exception: Not installed in /var/www/html/lib/base.php:283
Stack trace:
#0 /var/www/html/lib/base.php(709): OC::checkInstalled(Object(OC\SystemConfig))
#1 /var/www/html/lib/base.php(1196): OC::init()
#2 /var/www/html/cron.php(43): require_once('/var/www/html/l...')
#3 {main}
crond: USER www-data pid 11 cmd php -f /var/www/html/cron.php
Exception: Not installed in /var/www/html/lib/base.php:283
Stack trace:
#0 /var/www/html/lib/base.php(709): OC::checkInstalled(Object(OC\SystemConfig))
#1 /var/www/html/lib/base.php(1196): OC::init()
#2 /var/www/html/cron.php(43): require_once('/var/www/html/l...')
#3 {main}
crond: USER www-data pid 12 cmd php -f /var/www/html/cron.php
Exception: Not installed in /var/www/html/lib/base.php:283
Stack trace:
#0 /var/www/html/lib/base.php(709): OC::checkInstalled(Object(OC\SystemConfig))
#1 /var/www/html/lib/base.php(1196): OC::init()
#2 /var/www/html/cron.php(43): require_once('/var/www/html/l...')
#3 {main}
crond: USER www-data pid 13 cmd php -f /var/www/html/cron.php
Exception: Not installed in /var/www/html/lib/base.php:283
Stack trace:
#0 /var/www/html/lib/base.php(709): OC::checkInstalled(Object(OC\SystemConfig))
#1 /var/www/html/lib/base.php(1196): OC::init()
#2 /var/www/html/cron.php(43): require_once('/var/www/html/l...')
#3 {main}
crond: USER www-data pid 14 cmd php -f /var/www/html/cron.php
Exception: Not installed in /var/www/html/lib/base.php:283
Stack trace:
#0 /var/www/html/lib/base.php(709): OC::checkInstalled(Object(OC\SystemConfig))
#1 /var/www/html/lib/base.php(1196): OC::init()
#2 /var/www/html/cron.php(43): require_once('/var/www/html/l...')
#3 {main}
crond: USER www-data pid 15 cmd php -f /var/www/html/cron.php
Exception: Not installed in /var/www/html/lib/base.php:283
Stack trace:
#0 /var/www/html/lib/base.php(709): OC::checkInstalled(Object(OC\SystemConfig))
#1 /var/www/html/lib/base.php(1196): OC::init()
#2 /var/www/html/cron.php(43): require_once('/var/www/html/l...')
#3 {main}
crond: USER www-data pid 16 cmd php -f /var/www/html/cron.php
Exception: Not installed in /var/www/html/lib/base.php:283
Stack trace:
#0 /var/www/html/lib/base.php(709): OC::checkInstalled(Object(OC\SystemConfig))
#1 /var/www/html/lib/base.php(1196): OC::init()
#2 /var/www/html/cron.php(43): require_once('/var/www/html/l...')
#3 {main}
crond: USER www-data pid 17 cmd php -f /var/www/html/cron.php
Exception: Not installed in /var/www/html/lib/base.php:283
Stack trace:
#0 /var/www/html/lib/base.php(709): OC::checkInstalled(Object(OC\SystemConfig))
#1 /var/www/html/lib/base.php(1196): OC::init()
#2 /var/www/html/cron.php(43): require_once('/var/www/html/l...')
#3 {main}
crond: USER www-data pid 18 cmd php -f /var/www/html/cron.php
Exception: Not installed in /var/www/html/lib/base.php:283
Stack trace:
#0 /var/www/html/lib/base.php(709): OC::checkInstalled(Object(OC\SystemConfig))
#1 /var/www/html/lib/base.php(1196): OC::init()
#2 /var/www/html/cron.php(43): require_once('/var/www/html/l...')
#3 {main}
crond: USER www-data pid 19 cmd php -f /var/www/html/cron.php
Exception: Not installed in /var/www/html/lib/base.php:283
Stack trace:
#0 /var/www/html/lib/base.php(709): OC::checkInstalled(Object(OC\SystemConfig))
#1 /var/www/html/lib/base.php(1196): OC::init()
#2 /var/www/html/cron.php(43): require_once('/var/www/html/l...')
#3 {main}
crond: USER www-data pid 20 cmd php -f /var/www/html/cron.php
Exception: Not installed in /var/www/html/lib/base.php:283
Stack trace:
#0 /var/www/html/lib/base.php(709): OC::checkInstalled(Object(OC\SystemConfig))
#1 /var/www/html/lib/base.php(1196): OC::init()
#2 /var/www/html/cron.php(43): require_once('/var/www/html/l...')
#3 {main}
I also suspect the pihole and DNS to be a problem, but i just can’t figure it out myself. I would appreciate any help and will provide more information, if possible. Thank you already for reading.