Can't connect to MariaDB from the selfhosted templates

Hey hello and thank you for the software!

I’m trying to setup nextcloud and mariadb from this template.

However I changed it a little bit since it doens’t work that way and I ended up with this docker-compose.yml

version: "2"
    image: linuxserver/nextcloud
    container_name: nextcloud
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
      - /var/lib/docker/volumes/Nextcloud/Config:/config
      - ${PORT}:80
    restart: unless-stopped
      - nextcloud_db
      - nextcloud_db
    image: linuxserver/mariadb
    container_name: nextcloud_db
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
      - MYSQL_DATABASE=nextcloud_db
      - MYSQL_USER=nextcloud
      - /var/lib/docker/volumes/Nextcloud/DB:/config
      - ${PORT2}:3306
    restart: unless-stopped
      name: proxied

I’m getting this error message when using the wizard.

Thank you very much for your help and have a nice weekend! :slight_smile:

hi @finge81 welcome to the forum :handshake:

there multiple docker items you don’t properly use (at least from what you post)…

  • item network: proxied is not referenced elsewhere
  • links: nextcloud_db seems orphaned
    (btw: i’m under impression links is deprecated in general)
  • likely your customization did brake a working example…
  • at this forum we support “clean” Nextcloud…
  • I appreciate linuxserver work but they do lot of “non standard” stuff.
  • please reach out to GitHub - linuxserver/docker-nextcloud and ask for support there.
1 Like

Couple serious issues standout:

  • Your Nextcloud volume command is probably not what you want since /var/lib/docker/volumes is the Docker internal path for where it stores named volumes. It’s highly unusual to reference it directly in your docker-compose
  • All of the {…} parameters need to be set in and provided by your runtime environment for the docker-compose. Without providing those we can’t really help since the docker-compose file is incomplete without them
  • The network config looks inappropriate

Have you considered starting with a simpler setup first in order to confirm things are function as expected when and that your understanding of the config versus your intended design is accurate? You can easily incrementally make adjustments in this way and then rebuild your stack via docker-compose until it is functioning exactly how you like. Just don’t put real data in until your incremental tweaking is done. :slight_smile:

1 Like

Thank you both for your replies!
Well I did put nextcloud as of now to the side because I do have some exams to do, but I am actually concerned about my security @jtr, and I did some research and stumbled across this fresh thread on the internet.

So does the directory filepath actually matter now?
Because I don’t really understand what Ákos Takács really means there.

I have no way of answering that without more context from you. What is your specific concern or goal?