5
submitted 14 hours ago by shaked_coffee@feddit.it to c/nextcloud@lemmy.ml

I'm currently running a Nextcloud instance in docker, using the "multiple containers" method, but I recently discovered that the reccomended method to run it is using this "All In One" image I previously didn't know about, and so I wanted to try to migrate to that setup (also in order to have easily also the office and whiteboard features that atm I don't have on my instance + have easier Backup-restore process)

The problem is that on my server I'm using traefik as a reverse proxy to expose services to the internet, and it is working on a specific docker network (called traefik_net) where also every container that should be exposed is connected, and from the official documentation of Nextcloud AIO I really don't understand how am I supposed to configure it to work in a setup like mine (mainly because the mastercontainer creates all the containers it needs on a network called nextcloud_aio and I didn't find a way to change that and where to set the proper traefik lables)

Anyone that is running AIO behind a traefik reverse proxy maybe can help me to understand?

top 2 comments
sorted by: hot top controversial new old
[-] wedge_film@lemmy.dbzer0.com 1 points 6 hours ago

I've used a AIO + traefik docker setup once, but I might be a little bit rusty, it's been some time. Docs state that labels do not work with the AIO, due to the fact that mastercontainer manages the containers. With the AIO it is better to not get in the way of the mastercontainer - if any issues occur you have a non-standard deployment and need to consider that while troubleshooting. Not the most elegant solution, but you could run vanilla AIO with traefik external routing via exposed apache port on the node IP using the file provider. If you don't have one you'll need to adjust the traefik config file to include:

providers:
  file:
    filename: #dynamic config file path goes here, example: /etc/traefik/fileConfig.yml
    watch: true

Create such file and restart traefik container.

You can use this file to provide all sorts of configs, traefik constantly checks it and makes adjustments. Here's an example:

http:
  ## EXTERNAL ROUTING ##
  routers:
    nextcloud:
      rule: "Host(`nextcloud.example.com`)"
      entrypoints:
        - "https"
      service: nextcloud
      middlewares:
      tls:
        certresolver: "letsencrypt"
  ## SERVICES ##
  services:
    nextcloud:
      loadBalancer:
        servers:
          - url: "http://IP:PORT of the apache container"

You may route internally if traefik runs on the host network. Check the link to the github documentation above for more info. Consider adjusting for a trusted proxy by limiting access to the apache container as described there.

[-] N0x0n@lemmy.ml 1 points 11 hours ago* (last edited 10 hours ago)
EDIT

Never mind, my reading skills... I never used the AIO image... Sorry :/.


this post was submitted on 29 Sep 2024
5 points (100.0% liked)

nextcloud

700 readers
8 users here now

Nextcloud is a suite of client-server software for creating and using file hosting services.

https://nextcloud.com

https://github.com/nextcloud

IRC: #nextcloud on libera.chat
Matrix: #nextcloud:matrix.org

Other Nextcloud communities on Lemmy

founded 4 years ago
MODERATORS