Can't access my nextcloud, help me with docker-compose.yml

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):
    • 32.0.0.13
  • Operating system and version (e.g., Ubuntu 24.04):
    • Ubuntu 24.04.3 LTS
  • Web server and version (e.g, Apache 2.4.25):
    • N/A
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • nginx 1.27.1.2
  • PHP version (e.g, 8.3):
    • N/A
  • Is this the first time you’ve seen this error? (Yes / No):
    • No
  • When did this problem seem to first start?
    • About a week ago
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • docker-compose
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • No

Summary of the issue you are facing:

My docker-compose install works, however, I cannot access the site using the IP and port.

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

  1. Execute docker-compose up -d

  2. Wait for install to complete and check docker logs for errors. None observed

  3. open browser and enter http://192.168.1.110:8081

Log entries

Nextcloud

Please provide the log entries from your Nextcloud log that are generated during the time of problem (via the Copy raw option from Administration settings->Logging screen or from your nextcloud.log located in your data directory). Feel free to use a pastebin/gist service if necessary.

cannot access log because I cannot access my Nextcloud app.

Web Browser

If the problem is related to the Web interface, open your browser inspector Console and Network tabs while refreshing (reloading) and reproducing the problem. Provide any relevant output/errors here that appear.

Nothing shown

Web server / Reverse Proxy

The output of your Apache/nginx/system log in /var/log/____:

N/A

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

Nextcloud is not installed - only a limited number of commands are available

                                                            
  There are no commands defined in the "config" namespace. 

Apps

The output of occ app:list (if possible).

Nextcloud is not installed - only a limited number of commands are available

                                                            
  There are no commands defined in the "app" namespace. Tips for increasing the likelihood of a response

My docker-compose.yml (what is wrong with it?)

services:
  # Nextcloud Database Container
  nextcloud_db:

    image: mariadb:11.4
    container_name: nextcloud_db
    restart: always
    # command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW --innodb-file-per-table=1 --skip-innodb-read-only-compressed

    volumes:
      - /mnt/data/nextcloud/db:/var/lib/mysql

    environment:
      - MYSQL_ROOT_PASSWORD=password
      - MYSQL_PASSWORD=password
      - MYSQL_DATABASE=nextcloud_db 
      - MYSQL_USER=mysqluser

  # Nextcloud Redis Container
  nextcloud_redis:
    image: redis:latest
    container_name: nextcloud_redis
    restart: always
    command: redis-server --requirepass password

  # Nextcloud App Container
  nextcloud_app:
    image: nextcloud:latest
    container_name: nextcloud_app
    restart: always
    ports:
      - 8081:80
      - 4430:443
  volumes:
    - /mnt/data/nextcloud/main:/var/www/html
    - /mnt/data/nextcloud/data:/var/www/html/data
    - /mnt/data/nextcloud/config:/var/www/html/config
    - /mnt/data/nextcloud/apps:/var/www/html/custom_apps
  environment:
    - MYSQL_PASSWORD=password
    - MYSQL_DATABASE=nextcloud_db
    - MYSQL_USER=mysqluser
    - MYSQL_HOST=nextcloud_db
    - REDIS_HOST_PASSWORD=password
    - NEXTCLOUD_ADMIN_USER=admin
    - NEXTCLOUD_ADMIN_PASSWORD=password 
    - NEXTCLOUD_TRUSTED_DOMAINS=nextcloud.mydomain.com
    - NEXTCLOUD_DEFAULT_PHONE_REGION=US
  depends_on:
    - nextcloud_db
    - nextcloud_redis
volumes:
  nextcloud:
  db:

tried http://192.168.1.110:8081, https://192.168.1.110:8081, http://192.168.1.110:4430 and https://192.168.1.110:4439

@dirtyharrywk

Your are using nextcloud latest image from docker standard repository.

Information about it is here : https://hub.docker.com/_/nextcloud

as noted in this page :

:warning::warning::warning: This image is maintained by community volunteers and designed for expert use. For quick and easy deployment that supports the full set of Nextcloud Hub features, use the Nextcloud All-in-One docker container⁠ maintained by Nextcloud GmbH.

To follow if there are issues pending on this image this is here : GitHub · Where software is built

So my questions

Why did you pick this installation method more that the AOI all in one where all services are setuped ?

How do you setup your nginx since it is not provided with nextcloud docker ?

See https://hub.docker.com/_/nextcloud documentation and part about tag latest that is apache.

Regards

2 Likes

I don’t need the aio, it’s way more than I want. I simply use Nextcloud for local Dropbox like storage.

Nginx is in a separate docker compose file with no issues.

There is some glue between nginx and nextcloud : how did you setup that ?

1 Like

I think switching to Nextcloud AIO would be a solid choice. It’s the official solution and can be easily tailored to what you need.
If you just want to use it as storage, you can simply disable all the modules you don’t need right after installation — like Talk, Office, or other extra features.
This way, you get a stable system that’s easy to manage, and if you ever decide to add more functionality later, you can just enable those modules.
It’s convenient, flexible, and easy to expand without having to rebuild everything from scratch.

2 Likes

@dirtyharrywk

Where did you obtain the docker-compose file sample your are using ?

nextcloud:latest is same as nextcloud:apache then it is documented here

https://hub.docker.com/_/nextcloud#running-this-image-with-docker-compose

My Nginx docker compose:

  app:
    image: 'jc21/nginx-proxy-manager:latest'
    restart: unless-stopped
    ports:
      - '8088:80'
      - '81:81'
      - '4443:443'
    volumes:
      - /mnt/data/NGINX_Proxy_Manager/data:/data
      - /mnt/data/NGINX_Proxy_Manager/letsencrypt:/etc/letsencrypt

I think switching to Nextcloud AIO would be a solid choice. It’s the official solution and can be easily tailored to what you need.

I will give it a try on a Proxmox VM. Thank you!

1 Like

Just for your consideration - Proxmox + NGINX + Nextcloud AIO + Watchtower Deployment Guide

:wink:

3 Likes

have change this line???

otherwise delete it and add the Trusted Domain to config.php