Nextcloud Bad Gateway

  • I do not have nginx for the moment, I just follow KM0201 tuto.

    Here is the stack :

    version: "2.1"
    services:
    nextcloud:
    image: ghcr.io/linuxserver/nextcloud:latest
    container_name: nextcloud
    ##network_mode: swag_default
    environment:
    - PUID=998
    - PGID=100
    volumes:
    - /srv/dev-disk-by-uuid-0d45c8f5-06ad-448b-b231-fddefcac8735/config/nextcloud/config:/config
    - /srv/dev-disk-by-uuid-0d45c8f5-06ad-448b-b231-fddefcac8735/config/nextcloud/data:/data
    - /etc/localtime:/etc/localtime:ro
    depends_on:
    - mariadb
    ports:
    - 450:443
    restart: unless-stopped
    mariadb:
    image: ghcr.io/linuxserver/mariadb:latest
    container_name: nextclouddb
    ##network_mode: swag_default
    environment:
    - PUID=998
    - PGID=100
    - MYSQL_ROOT_PASSWORD=XXXXX
    volumes:
    - /srv/dev-disk-by-uuid-0d45c8f5-06ad-448b-b231-fddefcac8735/config/nextclouddb:/config
    - /etc/localtime:/etc/localtime:ro
    restart: unless-stopped
  • PUID=1000

    PUID=998

    This shows that you didn't follow his tutorial properly

  • Hi Soma,

    I think my PUID and PGID are correct :


    Hi HannesJo,

    You are corretc, I follow the path and I see logs. So I have a problem in config .php wich come from a french tuto that does not work for me.

    So I decide to follow MK0201 tuto. Do you know how I can get a correct config.php ?

    • Official Post

    As your screenshot shows 998 is the uid to your admin user which should only be used in connection with your web-gui login. You need to use a regular, unprivileged user, created by you in the Users section of the gui, the first being 1000. This is the GUID you should be using. You probably got 998 from a DBTech video. :(

    System Backup Typo alert: Under the Linux section the command should be sudo umount /dev/sda1 NOT sudo unmount /dev/sda1

    Backup Data Disk to Backup Disk on Same Machine: In a Scheduled Job:rsync -av --delete /srv/dev-disk-by-uuid-f8814ed9-9a5c-4e1c-8830-426968c20ea3/ /srv/dev-disk-by-uuid-e67439d5-00a3-4942-bd5f-b84ab86aa850/ Don't forget trailing slashes, and BE CAREFUL. (HT: Getting Started with OMV5)

    Equipment - Thinkserver TS140, NanoPi M4 (v.1), Odroid XU4 (Using DietPi): PiHole

    • Official Post

    Hi Soma,

    I think my PUID and PGID are correct :

    You literally failed in the first paragraph...


    Quote


    Everything that starts with a # needs to be adjusted for your system and then the # erased. Nothing other than those lines need to be changed despite what you've seen in other tutorials. DO NOT ADJUST THE ##network_mode at this time. That will come later when we set up the proxy. Again, do not mix this with other tutorials, you'll just fail and be frustrated.

    Delete your config and data folders

    Stop followuing dbtech tutorials

    Create a user in the webUI and get a proper PUID (probably going to be 1000 since it's likely your first user)

    Follow that post.


    It 100% works

  • Hi KM0201,

    I see no error in swag log :

    cont-init: info: /etc/cont-init.d/99-custom-files exited 0

    s6-rc: info: service legacy-cont-init successfully started

    s6-rc: info: service legacy-services: starting

    services-up: info: copying legacy longrun cron (no readiness notification)

    services-up: info: copying legacy longrun fail2ban (no readiness notification)

    services-up: info: copying legacy longrun nginx (no readiness notification)

    services-up: info: copying legacy longrun php-fpm (no readiness notification)

    s6-rc: info: service legacy-services successfully started

    s6-rc: info: service 99-ci-service-check: starting

    [ls.io-init] done.

    s6-rc: info: service 99-ci-service-check successfully started

    Server ready

    s6-rc: info: service s6rc-oneshot-runner: starting

    s6-rc: info: service s6rc-oneshot-runner successfully started

    s6-rc: info: service fix-attrs: starting

    s6-rc: info: service 00-legacy: starting

    s6-rc: info: service 00-legacy successfully started

    s6-rc: info: service fix-attrs successfully started

    s6-rc: info: service legacy-cont-init: starting

    cont-init: info: running /etc/cont-init.d/01-envfile

    cont-init: info: /etc/cont-init.d/01-envfile exited 0

    cont-init: info: running /etc/cont-init.d/02-tamper-check

    cont-init: info: /etc/cont-init.d/02-tamper-check exited 0

    cont-init: info: running /etc/cont-init.d/10-adduser

    usermod: no changes


    -------------------------------------

    _ ()

    | | ___ _ __

    | | / __| | | / \

    | | \__ \ | | | () |

    |_| |___/ |_| \__/



    Brought to you by linuxserver.io

    -------------------------------------


    To support the app dev(s) visit:

    Certbot: https://supporters.eff.org/donate/support-work-on-certbot


    To support LSIO projects visit:

    https://www.linuxserver.io/donate/

    -------------------------------------

    GID/UID

    -------------------------------------


    User uid: 1000

    User gid: 100

    -------------------------------------


    cont-init: info: /etc/cont-init.d/10-adduser exited 0

    cont-init: info: running /etc/cont-init.d/20-config

    cont-init: info: /etc/cont-init.d/20-config exited 0

    cont-init: info: running /etc/cont-init.d/30-keygen

    cont-init: info: /etc/cont-init.d/30-keygen exited 0

    cont-init: info: running /etc/cont-init.d/50-config

    using keys found in /config/keys

    Variables set:

    0

    PGID=100

    TZ=

    URL=xxxxxxxxxx.duckdns.org

    SUBDOMAINS=wildcard

    EXTRA_DOMAINS=

    ONLY_SUBDOMAINS=false

    VALIDATION=duckdns

    CERTPROVIDER=

    DNSPLUGIN=

    EMAIL=xxxxxxxxxx@gmail.com

    STAGING=


    Using Let's Encrypt as the cert provider

    SUBDOMAINS entered, processing

    Wildcard cert for xxxxxxxxxx.duckdns.org will be requested

    E-mail address entered: xxxxxxxxxx@gmail.com

    duckdns validation is selected

    the resulting certificate will only cover the subdomains due to a limitation of duckdns, so it is advised to set the root location to use http://www.subdomain.duckdns.org

    Certificate exists; parameters unchanged; starting nginx

    cont-init: info: /etc/cont-init.d/50-config exited 0

    cont-init: info: running /etc/cont-init.d/60-renew

    The cert does not expire within the next day. Letting the cron script handle the renewal attempts overnight (2:08am).

    cont-init: info: /etc/cont-init.d/60-renew exited 0

    cont-init: info: running /etc/cont-init.d/70-templates

    cont-init: info: /etc/cont-init.d/70-templates exited 0

    cont-init: info: running /etc/cont-init.d/90-custom-folders

    cont-init: info: /etc/cont-init.d/90-custom-folders exited 0

    cont-init: info: running /etc/cont-init.d/99-custom-files

    [custom-init] no custom files found exiting...

    cont-init: info: /etc/cont-init.d/99-custom-files exited 0

    s6-rc: info: service legacy-cont-init successfully started

    s6-rc: info: service legacy-services: starting

    services-up: info: copying legacy longrun cron (no readiness notification)

    services-up: info: copying legacy longrun fail2ban (no readiness notification)

    services-up: info: copying legacy longrun nginx (no readiness notification)

    services-up: info: copying legacy longrun php-fpm (no readiness notification)

    s6-rc: info: service legacy-services successfully started

    s6-rc: info: service 99-ci-service-check: starting

    [ls.io-init] done.

    s6-rc: info: service 99-ci-service-check successfully started

    Server ready

    • Official Post

    Sorry I'm exhausted I need to get some sleep. I'll try to take a look at this in a few hours if you're on later tonight I'll probably be in the discord channel if you want some help

    • Official Post

    Your cert looks good. Your problem probably lies somewhere in your proxy configuration. look at this [How-To] under the Configuration of Proxy section to find your .conf and config.php files. Post those in a code box - but hide your passwords, etc.

    System Backup Typo alert: Under the Linux section the command should be sudo umount /dev/sda1 NOT sudo unmount /dev/sda1

    Backup Data Disk to Backup Disk on Same Machine: In a Scheduled Job:rsync -av --delete /srv/dev-disk-by-uuid-f8814ed9-9a5c-4e1c-8830-426968c20ea3/ /srv/dev-disk-by-uuid-e67439d5-00a3-4942-bd5f-b84ab86aa850/ Don't forget trailing slashes, and BE CAREFUL. (HT: Getting Started with OMV5)

    Equipment - Thinkserver TS140, NanoPi M4 (v.1), Odroid XU4 (Using DietPi): PiHole

    • Official Post

    You probably should hide your username, dbpassword, and domain. Delete the post above and copy/paste the file in a code box using the </> button in the menu bar above, but hide that sensitive information.

    Code
    Code box like this. 

    System Backup Typo alert: Under the Linux section the command should be sudo umount /dev/sda1 NOT sudo unmount /dev/sda1

    Backup Data Disk to Backup Disk on Same Machine: In a Scheduled Job:rsync -av --delete /srv/dev-disk-by-uuid-f8814ed9-9a5c-4e1c-8830-426968c20ea3/ /srv/dev-disk-by-uuid-e67439d5-00a3-4942-bd5f-b84ab86aa850/ Don't forget trailing slashes, and BE CAREFUL. (HT: Getting Started with OMV5)

    Equipment - Thinkserver TS140, NanoPi M4 (v.1), Odroid XU4 (Using DietPi): PiHole

  • Hi Agricola,

    Do you think I must change dbuser and dbpassword ?

    • Official Post

    If you do you will have to reconfigure your compose file and delete your config folder and rerun your swag cert. make sure you have a strong password on your nextcloud login.

    System Backup Typo alert: Under the Linux section the command should be sudo umount /dev/sda1 NOT sudo unmount /dev/sda1

    Backup Data Disk to Backup Disk on Same Machine: In a Scheduled Job:rsync -av --delete /srv/dev-disk-by-uuid-f8814ed9-9a5c-4e1c-8830-426968c20ea3/ /srv/dev-disk-by-uuid-e67439d5-00a3-4942-bd5f-b84ab86aa850/ Don't forget trailing slashes, and BE CAREFUL. (HT: Getting Started with OMV5)

    Equipment - Thinkserver TS140, NanoPi M4 (v.1), Odroid XU4 (Using DietPi): PiHole

  • dbuser and dbpassword were set by default.

    I have change accordint to my stack but have still the same problem.

    Hereafter my nextcloud.subdomain.conf :

  • and my config.php :

    • Official Post

    Are you not able to reach your Nextcloud login page at nextcloud.your-subdomain.duckdns.org ?

    System Backup Typo alert: Under the Linux section the command should be sudo umount /dev/sda1 NOT sudo unmount /dev/sda1

    Backup Data Disk to Backup Disk on Same Machine: In a Scheduled Job:rsync -av --delete /srv/dev-disk-by-uuid-f8814ed9-9a5c-4e1c-8830-426968c20ea3/ /srv/dev-disk-by-uuid-e67439d5-00a3-4942-bd5f-b84ab86aa850/ Don't forget trailing slashes, and BE CAREFUL. (HT: Getting Started with OMV5)

    Equipment - Thinkserver TS140, NanoPi M4 (v.1), Odroid XU4 (Using DietPi): PiHole

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!