Clean build of nextcloud (Hub 10 - 31.0.4) on docker using a portainer stack and traefik (3.3.6) reverse proxy
Docker
# Nextcloud
nextcloud:
image: nextcloud:production-apache
container_name: nextcloud
networks:
t2_proxy:
ports:
- "8120:80"
volumes:
- /appdata/nexcloud/html:/var/www/html
- /appdata/nexcloud/custom_apps:/var/www/html/custom_apps
- /appdata/nexcloud/html/config:/var/www/html/config
- /media/vol666/ncloud:/var/www/html/data
environment:
- MYSQL_PASSWORD_FILE=nc_db_password
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_HOST=ncdb
secrets:
- nc_db_password
I’ve got traefik running as a reverse proxy and in the yaml i’ve set
routers:
ncloud-rtr:
rule: "Host(`fondling.goat-lovers.org`)" #only the brave will visit this
entryPoints:
- https
middlewares:
- chain-nextcloud
service: ncloud-svc
services:
ncloud-svc:
loadbalancer:
servers:
- url: "http://192.168.1.22:8120"
I can access my nextcloud via my browser and using https BUT I get the error below in the Security & Setup Warnings, probably because the container is using port 80
Accessing site insecurely via HTTP. You are strongly advised to set up your server to require HTTPS instead.
Without it some important web functionality like “copy to clipboard” or “service workers” will not work!
For more details see the documentation.
I’ve checked the apache config on the running container, tried changing the port in the docker config from 80 to 443 and then updating the traefik service but that makes the containers web service inaccessible.
Can anyone give me any guidance on clearing this issue?