1. The problem I’m having:
I am trying to install and configure Nextcloud-AIO on my server, behind a Caddy reverse proxy. I already have Caddy, using the caddy-docker-proxy plugin—I’d link that plugin here, but I’m running afoul of the max number of allowed links—running in a separate container for my domain, and it correctly directs traffic to other subdomains; for instance, recipes.xanderwhart.us
.
I can get the Nextcloud-AIO container up and running, but in its configuration flow, it asks for the domain that the instance will use. When I enter and submit “cloud.xanderwhart.us
”, I get the following message in the UI:
Domain does not point to this server or the reverse proxy is not configured correctly.
My logs for nextcloud-aio-mastercontainer
also contain error messages, corresponding with the times when I click “submit domain”, which I have pasted below in section 2.
Because of this TLS issue, I am posting for help here, because this appears to be, at least in part, a TLS/proxying issue.
Many of the guides I’ve seen for installing Nextcloud-AIO behind Caddy suggest running an instance of Caddy within the same container; however, because I have other hosted services that I wish to proxy, I don’t believe this would work. My standalone Caddy container is listening on 80 and 443 already.
All that said, I am way out of my depth here, and what I want most is for it to work:
- Nextcloud-AIO properly installs at
cloud.xanderwhart.us
- Other services (at
xanderwhart.us
and subdomains) can be accessed correctly as well
2. Error messages and/or full log output:
From nextcloud-aio-mastercontainer
logs:
nextcloud-aio-mastercontainer | NOTICE: PHP message: The response of the connection attempt to "https://cloud.xanderwhart.us:443" was:
nextcloud-aio-mastercontainer | NOTICE: PHP message: Expected was: 49401199e9d5ff73c176ba30245b59673e46bae182b49e60
nextcloud-aio-mastercontainer | NOTICE: PHP message: The error message was: TLS connect error: error:0A000438:SSL routines::tlsv1 alert internal error
The Docker log for the Caddy container can be found here, since it is a very long log file and I want to preserve people’s scroll wheels in this thread.
3. Caddy version:
Installed from image lucaslorentz/caddy-docker-proxy:2.8.4-alpine
4. How I installed and ran Caddy:
a. System environment:
- Operating system: OpenMediaVault 7.4.16-1 (Sandworm), which is based on Debian 12 (Bookworm)
- Architecture: x86_64
- Docker version: 27.4.0
b. Command:
Running Caddy via Docker Compose; see below
c. Service/unit/compose file:
services:
caddy:
image: lucaslorentz/caddy-docker-proxy:2.8.4-alpine
restart: unless-stopped
ports:
- "80:80"
- "443:443"
- "443:443/udp"
environment:
- CADDY_INGRESS_NETWORKS=caddy
networks:
- caddy
- nextcloud-aio
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./Caddyfile:/etc/caddy/Caddyfile
#- ./site:/srv
- caddy_data:/data
- caddy_config:/config
networks:
caddy:
external: true
nextcloud-aio:
external: true
volumes:
caddy_data:
caddy_config:
d. My complete Caddy config:
Caddyfile:
{
debug
}
https://cloud.xanderwhart.us:443 {
reverse_proxy nextcloud-aio-apache:11000 {
transport http {
tls_insecure_skip_verify
}
}
}
e. Nextcloud-AIO compose file:
# https://github.com/nextcloud/all-in-one
# For custom configuration consult -> https://github.com/nextcloud/all-in-one/blob/main/compose.yaml
services:
nextcloud-aio-mastercontainer:
image: nextcloud/all-in-one:latest
init: true
restart: always
container_name: nextcloud-aio-mastercontainer
volumes:
- nextcloud_aio_mastercontainer:/mnt/docker-aio-config
- /var/run/docker.sock:/var/run/docker.sock:ro
ports:
- 5050:8080
environment:
# - APACHE_ADDITIONAL_NETWORK=caddy
- APACHE_PORT=11000
- APACHE_IP_BINDING=0.0.0.0
- NEXTCLOUD_DATADIR=/akhet/system/appdata/nextcloud_data
networks:
- caddy
volumes:
nextcloud_aio_mastercontainer:
name: nextcloud_aio_mastercontainer
networks:
caddy:
external: true
###########################
# https://wiki.omv-extras.org/doku.php?id=omv7:docker_in_omv
###########################
5. Links to relevant resources:
- Nextcloud-AIO installation instructions for installing behind a reverse proxy
- My post on the Nextcloud forums regarding this
I would provide one more (a link to the OpenMediaVault community wiki page with instructions for installing and setting up Docker and Nextcloud-AIO), but I have reached the limit of links I can add
Thank you for all the help you can provide.
Edit history
- Corrected accidental port in Caddyfile (was 5050, is now 443)