recently I was working on the Raspberry Pi 4 project which includes installing the following:
- Nextcloud (not Nextcloudpi)
I wanted the just Nextcloud to be reachable from the internet. Everything else shall be kept local.
What I have:
A Raspberry Pi 4 which is operating on Raspbian Os 64x with desktop. (Needed for the Collabora office to operate properly in Nextcloud)
An Argon one casing with m.2 SSD connected to it with a mount point
/mnt/ssdand added to the
Free domain on DDNSS.de
example.ddnss.dewhich supports subdomain with wildcard.
Router Netgear R7500-Nighthawk X4 AC2350 which support DynamicDns but sadly enough only noip which in its turn doesn't support wildcard unless you have a paid membership. Thus, I am forced to use
On the router the Raspberry has a static IP and the port forwarding settings are set properly
I kind of understand the Problem that this imposes with the ports and that two services cannot access the same port.
docker-compose.yml file looks like this:
version: '3.6' services: nextcloud: volumes: - ./volumes/nextcloud/html:/var/www/html image: nextcloud container_name: nextcloud ports: - "9321:80" restart: unless-stopped depends_on: - nextcloud_db links: - nextcloud_db networks: - iotstack_nw - nextcloud_internal environment: - MYSQL_HOST=nextcloud_db - MYSQL_PASSWORD=mySQL_password - MYSQL_DATABASE=nextcloud - MYSQL_USER=nextcloud nextcloud_db: environment: - MYSQL_ROOT_PASSWORD=root_password - MYSQL_PASSWORD=mySQL_password - MYSQL_DATABASE=nextcloud - MYSQL_USER=nextcloud image: linuxserver/mariadb container_name: nextcloud_db volumes: - ./volumes/nextcloud/db:/config restart: unless-stopped networks: - nextcloud_internal mariadb: environment: - MYSQL_ROOT_PASSWORD=root_password - MYSQL_PASSWORD=mySQL_password - MYSQL_DATABASE=nextcloud - MYSQL_USER=nextcloud image: linuxserver/mariadb container_name: mariadb volumes: - ./volumes/mariadb/config:/config ports: - "3306:3306" restart: unless-stopped networks: - iotstack_nw portainer-ce: container_name: portainer-ce image: portainer/portainer-ce restart: unless-stopped ports: - "8000:8000" - "9000:9000" volumes: - /var/run/docker.sock:/var/run/docker.sock - ./volumes/portainer-ce/data:/data pihole: container_name: pihole image: pihole/pihole:latest restart: unless-stopped ports: - "5053:53/udp" - "5053:53/tcp" - "9322:80" - "8443:443" environment: - TZ:America/Chicago volumes: - ./etc-pihole/:/etc/pihole/ - ./etc-dnsmasq.d/:/etc/dnsmasq.d/ dns: - 127.0.0.1 - 126.96.36.199 apacheserver: container_name: apache image: httpd:2.4 restart: unless-stopped ports: - "9320:80" - "9443:443" volumes: - ./volumes/apache/:/usr/local/apache2/htdocs networks: iotstack_nw: # Exposed by your host. # external: true name: IOTstack_Net driver: bridge ipam: driver: default config: - subnet: 10.77.60.0/24 # - gateway: 10.77.60.1 iotstack_nw_internal: # For interservice communication. No access to outside name: IOTstack_Net_Internal driver: bridge internal: true ipam: driver: default config: - subnet: 10.77.76.0/24 # - gateway: 10.77.76.1 nextcloud_internal: # Network for NextCloud service name: IOTstack_NextCloud driver: bridge internal: true # default: # external: true # name: iotstack_nw # hosts_nw: # driver: hosts
Now everything works locally.
Well the problems in my case:
- It seems to me that the main problem with that solution is that I am not able to get everything connected with
- Plus how to set the Nextcloud to store data on the
/mnt/ssdon a path outside the docker is still unknown to me.
- force HTTPS/ redirect each
HTTPrequest into HTTPS.
Any detailed help would be appreciated.