Nextcloud container not starting after server reboot

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can. :heart:

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 35.0.0.10
  • Operating system and version (e.g., Ubuntu 24.04):
    • replace me
  • Web server and version (e.g, Apache 2.4.25):
    • 13.7
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • 2.15.1
  • PHP version (e.g, 8.3):
    • in docker image
  • Is this the first time you’ve seen this error? (Yes / No):
    • No
  • When did this problem seem to first start?
    • long ago
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • linuxserver.io docker image
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • No

Summary of the issue you are facing:

Weird issue with the nextcloud containers (image: latest). When the nextcloud containers are running, they can be accessed normally. But when I do a server reboot, all other docker containers restart automatically, except the nextcloud containers. How can I solve this, help is greatly appreciated.

Steps to replicate it (hint: details matter!):

  1. Log into server with ssh

  2. type “reboot”

  3. Wait a view seconds

  4. Open Web UI

  5. access Nextcloud

Configuration

docker-compose.yml:

services:
  nextcloud:
    image: linuxserver/nextcloud:latest
    container_name: nextcloud-app
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Berlin
    volumes:
      - /storage/nextcloud/config:/config
      - /storage/nextcloud/data:/data
    restart: unless-stopped
    depends_on:
      - db
    networks:
      - nextcloud-net
      - proxy-net
  db:
    image: mariadb:11
    container_name: nextcloud-db
    volumes:
      - /storage/nextcloud/db:/var/lib/mysql
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Berlin
      - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
      - MYSQL_DATABASE=${MYSQL_DATABASE}
      - MYSQL_USER=${MYSQL_USER}
      - MYSQL_PASSWORD=${MYSQL_PASSWORD}
    networks:
      - nextcloud-net
  redis:
    image: redis:latest
    container_name: nextcloud-redis
    command: redis-server --requirepass ${REDIS_PASSWORD}
    environment:
      - REDIS_PASSWORD=${REDIS_PASSWORD}
    volumes:
      - /storage/nextcloud/redis:/data
    restart: unless-stopped
    networks:
      - nextcloud-net
networks:
  nextcloud-net:
    driver: bridge
  proxy-net:
    external: true

And I see this message when accessing the web gui after a reboot:

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

And this are the logs after a reboot:

~$ docker logs nextcloud-app
[migrations] started
[migrations] 01-nginx-site-confs-default: skipped
[migrations] 02-default-location: skipped
[migrations] done
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────
Linuxserver.io version: 35.0.0-ls452
Build-date: 2026-09-16T00:49:05+00:00
───────────────────────────────────────

using keys found in /config/keys
Initializing nextcloud 35.0.0.10 (this can take a while) ...
Setting permissions
Initializing finished
[custom-init] No custom files found, skipping...
[ls.io-init] done.
[migrations] started
[migrations] 01-nginx-site-confs-default: skipped
[migrations] 02-default-location: skipped
[migrations] done
usermod: no changes
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────
Linuxserver.io version: 35.0.0-ls452
Build-date: 2026-09-16T00:49:05+00:00
───────────────────────────────────────

using keys found in /config/keys
After completing the web-based installer, restart the Nextcloud container to apply default memory caching and transactional file locking configurations.
Alternatively, you can apply your own configurations by editing /config/www/nextcloud/config/config.php following the documentation:
https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/caching_configuration.html
https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/files_locking_transactional.html
[custom-init] No custom files found, skipping...
[ls.io-init] done.

I’m little confused.. as you can see logs containers must have started? what is the output of docker compose ps in the directory? what happens if you run docker compose up? does the app start?

but as you added

already the issue would be more related to docker rather to containers.. linuxserver.io images have some specialities I would recommend you consult linuxserver.io Nextcloud docs and reach out to linuxserver.io Support

Also, the internal server error looks like it’s coming from Nextcloud, which would imply that the Nextcloud container is running. Maybe the issue is with the MariaDB or Redis container. If one of them does not start, that would explain the internal server error.

I’m already in contact with linuxserverio, seems the database is shutting down:

2026-09-21 17:23:01 0 [Note] mariadbd (initiated by: unknown): Normal shutdown

What means “unknown” in this case?

Found it: There was a “restart: unless-stopped” missing in the docker-compose.yml for the db. Now it works, thanks for your help.