sethforprivacy/self-hosted-services

Bad Gateway in nextcloud and 404 in traefik

Closed this issue · 13 comments

I trying to run only nextcloud and uptime-kuma. I commented everything that wasn't used by nextcloud or uptime-kuma. only left this services:

  • traefik
  • uptime-kuma
  • nextcloud
  • nextcloud-db
  • nextcloud-cron
  • redis (says it needed it for nextcloud)
  • watchtower

I did not erase any volumes.

I made sure that all my hostnames are correctly setup in my dns.
This are the logs for traefik:

traefik           | time="2022-05-30T11:36:25Z" level=info msg="Configuration loaded from flags."
traefik           | time="2022-05-30T11:37:59Z" level=error msg="service \"nextcloud\" error: unable to find the IP address for the container \"/nextcloud\": the server is ignored" providerName=docker container=nextcloud-self-hosted-services-<censoredID>

This are some relevant logs for nextcloud:

nextcloud         | Next Doctrine\DBAL\Driver\PDO\Exception: SQLSTATE[42501]: Insufficient privilege: 7 ERROR:  permission denied for table oc_appconfig in /var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php:26
nextcloud         | Stack trace:
nextcloud         | #0 /var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Connection.php(87): Doctrine\DBAL\Driver\PDO\Exception::new(Object(PDOException))
nextcloud         | #1 /var/www/html/3rdparty/doctrine/dbal/src/Connection.php(1062): Doctrine\DBAL\Driver\PDO\Connection->query('SELECT * FROM "...')
nextcloud         | #2 /var/www/html/lib/private/DB/Connection.php(261): Doctrine\DBAL\Connection->executeQuery('SELECT * FROM "...', Array, Array, NULL)
nextcloud         | #3 /var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(345): OC\DB\Connection->executeQuery('SELECT * FROM "...', Array, Array)
nextcloud         | #4 /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php(281): Doctrine\DBAL\Query\QueryBuilder->execute()
nextcloud         | #5 /var/www/html/lib/private/AppConfig.php(411): OC\DB\QueryBuilder\QueryBuilder->execute()
nextcloud         | #6 /var/www/html/lib/private/AppConfig.php(176): OC\AppConfig->loadConfigValues()
nextcloud         | #7 /var/www/html/lib/private/AppConfig.php(367): OC\AppConfig->getApps()
nextcloud         | #8 /var/www/html/lib/private/legacy/OC_App.php(983): OC\AppConfig->getValues(false, 'installed_versi...')
nextcloud         | #9 /var/www/html/lib/private/Server.php(713): OC_App::getAppVersions()
nextcloud         | #10 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(162): OC\Server->OC\{closure}(Object(OC\Server))
nextcloud         | #11 /var/www/html/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(Pimple\Container))
nextcloud         | #12 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(129): Pimple\Container->offsetGet('OC\\Memcache\\Fac...')
nextcloud         | #13 /var/www/html/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\SimpleContainer->query('OC\\Memcache\\Fac...', false)
nextcloud         | #14 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(57): OC\ServerContainer->query('OC\\Memcache\\Fac...')
nextcloud         | #15 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(184): OC\AppFramework\Utility\SimpleContainer->get('OC\\Memcache\\Fac...')
nextcloud         | #16 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(162): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(OC\Server))
nextcloud         | #17 /var/www/html/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(Pimple\Container))
nextcloud         | #18 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(129): Pimple\Container->offsetGet('OCP\\ICacheFacto...')
nextcloud         | #19 /var/www/html/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\SimpleContainer->query('OCP\\ICacheFacto...', false)
nextcloud         | #20 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(57): OC\ServerContainer->query('OCP\\ICacheFacto...')
nextcloud         | #21 /var/www/html/lib/private/Server.php(1105): OC\AppFramework\Utility\SimpleContainer->get('OCP\\ICacheFacto...')
nextcloud         | #22 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(162): OC\Server->OC\{closure}(Object(OC\Server))
nextcloud         | #23 /var/www/html/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(Pimple\Container))
nextcloud         | #24 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(129): Pimple\Container->offsetGet('OCP\\Lock\\ILocki...')
nextcloud         | #25 /var/www/html/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\SimpleContainer->query('OCP\\Lock\\ILocki...', false)
nextcloud         | #26 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(57): OC\ServerContainer->query('OCP\\Lock\\ILocki...')
nextcloud         | #27 /var/www/html/lib/private/Server.php(2082): OC\AppFramework\Utility\SimpleContainer->get('OCP\\Lock\\ILocki...')
nextcloud         | #28 /var/www/html/lib/private/Files/View.php(122): OC\Server->getLockingProvider()
nextcloud         | #29 /var/www/html/lib/private/Server.php(454): OC\Files\View->__construct()
nextcloud         | #30 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(162): OC\Server->OC\{closure}(Object(OC\Server))
nextcloud         | #31 /var/www/html/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(Pimple\Container))
nextcloud         | #32 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(129): Pimple\Container->offsetGet('OC\\Files\\Node\\H...')
nextcloud         | #33 /var/www/html/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\SimpleContainer->query('OC\\Files\\Node\\H...', false)
nextcloud         | #34 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(57): OC\ServerContainer->query('OC\\Files\\Node\\H...')
nextcloud         | #35 /var/www/html/lib/private/Server.php(1445): OC\AppFramework\Utility\SimpleContainer->get('OC\\Files\\Node\\H...')
nextcloud         | #36 /var/www/html/lib/base.php(602): OC\Server->boot()
nextcloud         | #37 /var/www/html/lib/base.php(1104): OC::init()
nextcloud         | #38 /var/www/html/console.php(48): require_once('/var/www/html/l...')
nextcloud         | #39 /var/www/html/occ(11): require_once('/var/www/html/c...')
nextcloud         | #40 {main}


nextcloud         | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.8. Set the 'ServerName' directive globally to suppress this message

I don't really know why would there be a problems with permisions with nextcloud docker.

the uptime-kuma instance actually does work and has it propper ssl certificate.

Nextcloud does receive its certificate but it returns a 502 and Traefik return a 404 and a invalid certificate.

I'm running a Fedora 35 VPS with nothing on it except this.

found this issue in the nextcloud docker repository that might have something todo with it

Can you post the logs for the nextcloud-db container? The Nextcloud logs are pretty clear that it's a database permissions issue so those logs would go a long ways.

It would also be extremely helpful if you can share the full docker-compose.yaml file so that I can be sure you didn't accidentally comment out a necessary line etc.

I reinitiated tbe containers from scratch this are the logs and compose

Here is the docker-compose file:

version: '3.7'
services:
  traefik:
    image: "traefik:v2.6.2"
    container_name: "traefik"
    restart: unless-stopped
    command:
      - "--providers.docker=true"
      - "--providers.docker.exposedbydefault=false"
      - "--entrypoints.websecure.address=:443"
      - "--entrypoints.web.address=:80"
      - "--entrypoints.web.http.redirections.entrypoint.to=websecure"
      - "--entrypoints.web.http.redirections.entrypoint.scheme=https"
      - "--certificatesresolvers.selfhostedservices.acme.tlschallenge=true"
      - "--certificatesresolvers.selfhostedservices.acme.email=${LE_EMAIL_ADDRESS}"
      - "--certificatesresolvers.selfhostedservices.acme.storage=/letsencrypt/acme.json"
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - "./letsencrypt:/letsencrypt"
      - "/var/run/docker.sock:/var/run/docker.sock:ro"

  uptime-kuma:
    image: louislam/uptime-kuma:1
    container_name: uptime-kuma
    restart: always
    volumes:
      - uptime-kuma:/app/data
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.status.rule=Host(`${STATUS_HOSTNAME}`)"
      - "traefik.http.routers.status.entrypoints=websecure"
      - "traefik.http.routers.status.tls.certresolver=selfhostedservices"

  nextcloud:
    image: nextcloud:apache
    container_name: nextcloud
    restart: unless-stopped
    volumes:
      - nextcloud:/var/www/html
    environment:
      - NEXTCLOUD_ADMIN_USER=${NEXTCLOUD_ADMIN_USER}
      - NEXTCLOUD_ADMIN_PASSWORD=${NEXTCLOUD_ADMIN_PASSWORD}
      - NEXTCLOUD_TRUSTED_DOMAINS=${NEXTCLOUD_HOSTNAME}
      - TRUSTED_PROXIES=172.16.0.0/12
      - OVERWRITEHOST=${NEXTCLOUD_HOSTNAME}
      - OVERWRITEPROTOCOL=https
      - POSTGRES_HOST=nextcloud_db
      - POSTGRES_USER=nextcloud
      - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
      - POSTGRES_DB=nextcloud
      - REDIS_HOST=redis
    depends_on:
      - nextcloud_db
      - redis
    labels:
      - "traefik.enable=true"
      - "traefik.http.middlewares.nextcloud.headers.browserXSSFilter=true"
      - "traefik.http.middlewares.nextcloud.headers.contentTypeNosniff=true"
      - "traefik.http.middlewares.nextcloud.headers.stsIncludeSubdomains=true"
      - "traefik.http.middlewares.nextcloud.headers.stsPreload=true"
      - "traefik.http.middlewares.nextcloud.headers.stsSeconds=155520011"
      - "traefik.http.middlewares.nextcloud_redirect.redirectregex.permanent=true"
      - "traefik.http.middlewares.nextcloud_redirect.redirectregex.regex=https://(.*)/.well-known/(card|cal)dav"
      - "traefik.http.middlewares.nextcloud_redirect.redirectregex.replacement=https://$${1}/remote.php/dav/"
      - "traefik.http.routers.nextcloud.entrypoints=websecure"
      - "traefik.http.routers.nextcloud.middlewares=nextcloud,nextcloud_redirect,nextcloud-https"
      - "traefik.http.routers.nextcloud.rule=Host(`${NEXTCLOUD_HOSTNAME}`)"
      - "traefik.http.routers.nextcloud.tls.certresolver=selfhostedservices"
      - "traefik.http.services.nextcloud.loadbalancer.server.port=8080"
      - "traefik.http.middlewares.nextcloud.headers.customRequestHeaders.X-Forwarded-Proto=https"
      - "traefik.http.middlewares.nextcloud-https.redirectscheme.scheme=https"
      - "traefik.http.routers.nextcloud-http.entrypoints=web"
      - "traefik.http.routers.nextcloud-http.rule=Host(`${NEXTCLOUD_HOSTNAME}`)"
      - "traefik.http.routers.nextcloud-http.middlewares=nextcloud-https@docker"

  nextcloud_db:
    image: postgres:alpine
    container_name: nextcloud_db
    restart: unless-stopped
    volumes:
      - nextcloud_db:/var/lib/postgresql/data
    environment:
      - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
      - POSTGRES_DB=nextcloud
      - POSTGRES_USER=nextcloud
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U nextcloud"]
      interval: 10s
      timeout: 5s
      retries: 5
      
  nextcloud_cron:
    image: nextcloud:apache
    restart: unless-stopped
    volumes:
      - nextcloud:/var/www/html
    entrypoint: /cron.sh

  redis:
    image: redis:alpine
    container_name: redis
    restart: unless-stopped
    volumes:
      - redis-data:/var/lib/redis
      - send_redis-data:/data
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 1s
      timeout: 3s
      retries: 30

  watchtower:
    image: containrrr/watchtower:latest
    container_name: watchtower
    restart: unless-stopped
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock"

volumes:
  bitmonero:
  redis-data:
  nextcloud:
  nextcloud_db:
  wallabag:
  wallabag_db:
  tor-keys:
  privatebin-data:
  uptime-kuma:
  p2pool-data:
  postgresdata:
  db_data:
  wordpress_data:
  cryptpad-blob:
  cryptpad-block:
  cryptpad-customize:
  cryptpad-data:
  cryptpad-datastores:
  send_redis-data:
  bitwarden-data:
  data-redis:
  jellyfin-data:

and this are the logs of nextcloud_db:

nextcloud_db  | The files belonging to this database system will be owned by user "postgres".
nextcloud_db  | This user must also own the server process.
nextcloud_db  | 
nextcloud_db  | The database cluster will be initialized with locale "en_US.utf8".
nextcloud_db  | The default database encoding has accordingly been set to "UTF8".
nextcloud_db  | The default text search configuration will be set to "english".
nextcloud_db  | 
nextcloud_db  | Data page checksums are disabled.
nextcloud_db  | 
nextcloud_db  | fixing permissions on existing directory /var/lib/postgresql/data ... ok
nextcloud_db  | creating subdirectories ... ok
nextcloud_db  | selecting dynamic shared memory implementation ... posix
nextcloud_db  | selecting default max_connections ... 100
nextcloud_db  | selecting default shared_buffers ... 128MB
nextcloud_db  | selecting default time zone ... UTC
nextcloud_db  | creating configuration files ... ok
nextcloud_db  | running bootstrap script ... ok
nextcloud_db  | sh: locale: not found
nextcloud_db  | 2022-05-31 13:13:49.581 UTC [30] WARNING:  no usable system locales were found
nextcloud_db  | performing post-bootstrap initialization ... ok
nextcloud_db  | syncing data to disk ... ok
nextcloud_db  | 
nextcloud_db  | 
nextcloud_db  | Success. You can now start the database server using:
nextcloud_db  | 
nextcloud_db  |     pg_ctl -D /var/lib/postgresql/data -l logfile start
nextcloud_db  | 
nextcloud_db  | initdb: warning: enabling "trust" authentication for local connections
nextcloud_db  | You can change this by editing pg_hba.conf or using the option -A, or
nextcloud_db  | --auth-local and --auth-host, the next time you run initdb.
nextcloud_db  | waiting for server to start....2022-05-31 13:14:23.038 UTC [48] LOG:  starting PostgreSQL 14.3 on x86_64-pc-linux-musl, compiled by gcc (Alpine 11.2.1_git20220219) 11.2.1 20220219, 64-bit
nextcloud_db  | 2022-05-31 13:14:23.047 UTC [48] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
nextcloud_db  | 2022-05-31 13:14:23.073 UTC [49] LOG:  database system was shut down at 2022-05-31 13:14:12 UTC
nextcloud_db  | 2022-05-31 13:14:23.087 UTC [48] LOG:  database system is ready to accept connections
nextcloud_db  |  done
nextcloud_db  | server started
nextcloud_db  | 2022-05-31 13:14:25.042 UTC [67] FATAL:  database "nextcloud" does not exist
nextcloud_db  | CREATE DATABASE
nextcloud_db  | 
nextcloud_db  | 
nextcloud_db  | /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
nextcloud_db  | 
nextcloud_db  | 2022-05-31 13:14:26.146 UTC [48] LOG:  received fast shutdown request
nextcloud_db  | waiting for server to shut down....2022-05-31 13:14:26.156 UTC [48] LOG:  aborting any active transactions
nextcloud_db  | 2022-05-31 13:14:26.160 UTC [48] LOG:  background worker "logical replication launcher" (PID 55) exited with exit code 1
nextcloud_db  | 2022-05-31 13:14:26.160 UTC [50] LOG:  shutting down
nextcloud_db  | 2022-05-31 13:14:26.242 UTC [48] LOG:  database system is shut down
nextcloud_db  |  done
nextcloud_db  | server stopped
nextcloud_db  | 
nextcloud_db  | PostgreSQL init process complete; ready for start up.
nextcloud_db  | 
nextcloud_db  | 2022-05-31 13:14:26.294 UTC [1] LOG:  starting PostgreSQL 14.3 on x86_64-pc-linux-musl, compiled by gcc (Alpine 11.2.1_git20220219) 11.2.1 20220219, 64-bit
nextcloud_db  | 2022-05-31 13:14:26.294 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
nextcloud_db  | 2022-05-31 13:14:26.294 UTC [1] LOG:  listening on IPv6 address "::", port 5432
nextcloud_db  | 2022-05-31 13:14:26.309 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
nextcloud_db  | 2022-05-31 13:14:26.324 UTC [69] LOG:  database system was shut down at 2022-05-31 13:14:26 UTC
nextcloud_db  | 2022-05-31 13:14:26.345 UTC [1] LOG:  database system is ready to accept connections
nextcloud_db  | 2022-05-31 13:15:29.533 UTC [121] ERROR:  permission denied for table oc_appconfig
nextcloud_db  | 2022-05-31 13:15:29.533 UTC [121] STATEMENT:  SELECT * FROM "oc_appconfig"

nextcloud logs

nextcloud  | Configuring Redis as session handler
nextcloud  | Initializing nextcloud 24.0.1.1 ...
nextcloud  | New nextcloud instance
nextcloud  | Installing with PostgreSQL database
nextcloud  | Starting nextcloud installation
nextcloud  | PostgreSQL username and/or password not valid
nextcloud  |  -> You need to enter details of an existing account.
nextcloud  | Trace: #0 /var/www/html/lib/private/Setup.php(353): OC\Setup\PostgreSQL->setupDatabase('nextcloud')
nextcloud  | #1 /var/www/html/core/Command/Maintenance/Install.php(108): OC\Setup->install(Array)
nextcloud  | #2 /var/www/html/3rdparty/symfony/console/Command/Command.php(255): OC\Core\Command\Maintenance\Install->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
nextcloud  | #3 /var/www/html/3rdparty/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
nextcloud  | #4 /var/www/html/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(OC\Core\Command\Maintenance\Install), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
nextcloud  | #5 /var/www/html/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
nextcloud  | #6 /var/www/html/lib/private/Console/Application.php(211): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
nextcloud  | #7 /var/www/html/console.php(99): OC\Console\Application->run()
nextcloud  | #8 /var/www/html/occ(11): require_once('/var/www/html/c...')
nextcloud  | #9 {main}
nextcloud  | 
nextcloud  | Previous: Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[08006] [7] could not connect to server: Connection refused
nextcloud  | 	Is the server running on host "nextcloud_db" (172.22.0.3) and accepting
nextcloud  | 	TCP/IP connections on port 5432?
nextcloud  | Trace: #0 /var/www/html/lib/private/Setup/PostgreSQL.php(99): OC\DB\Connection->connect()
nextcloud  | #1 /var/www/html/lib/private/Setup.php(353): OC\Setup\PostgreSQL->setupDatabase('nextcloud')
nextcloud  | #2 /var/www/html/core/Command/Maintenance/Install.php(108): OC\Setup->install(Array)
nextcloud  | #3 /var/www/html/3rdparty/symfony/console/Command/Command.php(255): OC\Core\Command\Maintenance\Install->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
nextcloud  | #4 /var/www/html/3rdparty/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

I can see the sql thing that the auth is not valid but I don't really get why if it is a fresh start

Are you properly setting POSTGRES_PASSWORD in your .env file? If you didn't have that set properly when you first spun up the services you may have to blow away the DB container and start over, or manually fix the auth.

Just seems to be a "simple" authentication issue.

yes I'm using POSTGRES_PASSWORD

the logs from the last post are all from a fresh install with fresh volumes, might it be that the postgres password doesn't accept certain caracters or length? (I used bitwarden password generator). I will try that and report back.

Ah, yes, very possible there is a character in there that is breaking the password -- try putting the password in single quotes or using a password without common problematic special characters (&, $, *).

okey interesting, i'm not getting neither the 502 or 404 now, but I'm getting invalid certs, could it be that I'm using a simplelogin email for the certs? this is a HSTS domain. I have A and AAAA records for the subdomains

What do the Traefik logs say? It might have timed out the LE generation because of the Nextcloud container being down.

You can also try restarting the Traefik container to force it to try and renew certs on startup.

this are the logs for traefik after restarting just the traefik container

traefik  | time="2022-05-31T15:14:11Z" level=info msg="Configuration loaded from flags."
traefik  | time="2022-05-31T15:14:11Z" level=error msg="The ACME resolver \"selfhostedservices\" is skipped from the resolvers list because: unable to get ACME account: open /letsencrypt/acme.json: no such file or directory"
traefik  | time="2022-05-31T15:14:15Z" level=error msg="the router nextcloud@docker uses a non-existent resolver: selfhostedservices"
traefik  | time="2022-05-31T15:15:11Z" level=error msg="the router nextcloud@docker uses a non-existent resolver: selfhostedservices"
traefik  | time="2022-05-31T15:15:11Z" level=error msg="the router status@docker uses a non-existent resolver: selfhostedservices"
traefik  | time="2022-05-31T15:15:50Z" level=error msg="service \"nextcloud\" error: unable to find the IP address for the container \"/nextcloud\": the server is ignored" container=nextcloud-self-hosted-services-3c87b1b591cd1b30816e1aca7959379f037ad30547808822a4dc668f9caa8d58 providerName=docker
traefik  | time="2022-05-31T15:15:50Z" level=error msg="the router status@docker uses a non-existent resolver: selfhostedservices"
traefik  | time="2022-05-31T15:15:52Z" level=error msg="the router nextcloud@docker uses a non-existent resolver: selfhostedservices"
traefik  | time="2022-05-31T15:15:52Z" level=error msg="the router status@docker uses a non-existent resolver: selfhostedservices"
traefik  | time="2022-05-31T15:31:50Z" level=error msg="accept tcp [::]:443: use of closed network connection" entryPointName=websecure
traefik  | time="2022-05-31T15:31:50Z" level=error msg="Error while starting server: accept tcp [::]:443: use of closed network connection" entryPointName=websecure
traefik  | time="2022-05-31T15:31:50Z" level=error msg="accept tcp [::]:80: use of closed network connection" entryPointName=web
traefik  | time="2022-05-31T15:31:50Z" level=error msg="Error while starting server: accept tcp [::]:80: use of closed network connection" entryPointName=web
traefik  | time="2022-05-31T15:31:52Z" level=info msg="Configuration loaded from flags."
traefik  | time="2022-05-31T15:31:52Z" level=error msg="The ACME resolver \"selfhostedservices\" is skipped from the resolvers list because: unable to get ACME account: open /letsencrypt/acme.json: no such file or directory"
traefik  | time="2022-05-31T15:31:52Z" level=error msg="the router nextcloud@docker uses a non-existent resolver: selfhostedservices"
traefik  | time="2022-05-31T15:31:52Z" level=error msg="the router status@docker uses a non-existent resolver: selfhostedservices"
ls

I can see the file inside the letsencrypt forlder. Could it be the email is not the same as the one used for registering the domain?

NOTE: I actually had a valid cert before but just for uptime-kuma. Now I don't have one for either service

Does Traefik not have proper permissions to access ./letsencrypt for some reason? Is that folder missing or something? Seems to come down to that now:

The ACME resolver "selfhostedservices" is skipped from the resolvers list because: unable to get ACME account: open /letsencrypt/acme.json: no such file or directory"

Does Traefik not have proper permissions to access ./letsencrypt for some reason? Is that folder missing or something? Seems to come down to that now:

The ACME resolver "selfhostedservices" is skipped from the resolvers list because: unable to get ACME account: open /letsencrypt/acme.json: no such file or directory"

okey, this one was my fault I must have erared the access to the volume for traefik.

I will do a complete reset of everything just in case I messed up something else and see what comes out of that.

EDIT: I got rated limited by lets encrypt might take a while to see if the full reset worked.

The issue mentioned here is still a problem I had to change the db password and username manually on the .env file using the ones on config.php in the container

@lescuer97 404 in traefik is correct, until you set --api.insecure=true in the config, since the ui is not supposed to be used publicly.