# New Setup Docker Compose not working

**URL:** <https://help.nextcloud.com/t/new-setup-docker-compose-not-working/115673>\
**Category:** ℹ️ Support\
**Created:** [May 6, 2021, 4:43pm UTC](https://help.nextcloud.com/t/new-setup-docker-compose-not-working/115673 "2021-05-06T16:43:24Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wibias](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wibias/32/37925_2.png) [@Wibias](https://help.nextcloud.com/u/Wibias)\
**Post date:** [May 6, 2021, 4:43pm UTC](https://help.nextcloud.com/t/new-setup-docker-compose-not-working/115673/1 "2021-05-06T16:43:24Z")

</div>

Hey!

So I wanted to install nextcloud on docker using docker-compose.

But when I insert my creditentals I get this error. ![](https://i.imgur.com/Ju8d0iN.png)

The Nextcloud and the mariadb setup is completly fresh.

Compose file looking like this.

> db:  
> image: mariadb:10.6.0  
> container\_name: mariadb  
> volumes:  
> - /srv/homeautomation/mariadb:/var/lib/mysql  
> - /etc/localtime:/etc/localtime:ro  
> environment:  
> - MYSQL\_ROOT\_PASSWORD=password123  
> networks:  
> - db\_network  
> restart: unless-stopped

> nextcloud:  
> image: nextcloud:21.0.1  
> container\_name: nextcloud  
> networks:  
> - db\_network  
> depends\_on:  
> - db  
> volumes:  
> - /srv/homeautomation/nextcloud:/var/www/html  
> - /srv/homeautomation/nextcloud/config:/var/www/html/config  
> - /srv/homeautomation/nextcloud/custom\_apps:/var/www/html/custom\_apps  
> - /srv/homeautomation/nextcloud/data:/var/www/html/data  
> - /srv/homeautomation/nextcloud/themes:/var/www/html/themes  
> - /etc/localtime:/etc/localtime:ro  
> - /Disk1:/data  
> ports:  
> - “8083:80/tcp”  
> restart: unless-stopped

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [May 6, 2021, 7:27pm UTC](https://help.nextcloud.com/t/new-setup-docker-compose-not-working/115673/2 "2021-05-06T19:27:57Z")

</div>

im my docker setup I defined a user dedicated for Nextcloud (besides mysqlroot). I’m not an expert in MariaDB but maybe an application is simply not allowed to use root credentials.

try adding Nextcloud DB and Nextcloud user (and use this credentials for NC setup):

```auto
    environment:
      - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
      - MYSQL_PASSWORD=pwdOfNextcloudUser
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud

```

> hint: you can use environment files like .env - it makes easier to use and change settings - if you use ${NC\_MYSQL\_PWD} multiple times you only need to change it once in your .env file…

---

<div class="post-metadata">

**Author:** ![Wibias](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wibias/32/37925_2.png) [@Wibias](https://help.nextcloud.com/u/Wibias)\
**Post date:** [May 6, 2021, 8:12pm UTC](https://help.nextcloud.com/t/new-setup-docker-compose-not-working/115673/4 "2021-05-06T20:12:06Z")

</div>

Hey, thanks for the answer. Sadly I just tried it and it doesn’t work. Still the same error.

---

<div class="post-metadata">

**Author:** ![Chartman123](https://help.nextcloud.com/user_avatar/help.nextcloud.com/chartman123/32/15034_2.png) [@Chartman123](https://help.nextcloud.com/u/Chartman123)\
**Post date:** [May 7, 2021, 12:59pm UTC](https://help.nextcloud.com/t/new-setup-docker-compose-not-working/115673/5 "2021-05-07T12:59:57Z")

</div>

Did you specify the mysql password environment variable also for your nextcloud container?

---

<div class="post-metadata">

**Author:** ![Wibias](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wibias/32/37925_2.png) [@Wibias](https://help.nextcloud.com/u/Wibias)\
**Post date:** [May 7, 2021, 1:31pm UTC](https://help.nextcloud.com/t/new-setup-docker-compose-not-working/115673/6 "2021-05-07T13:31:53Z")

</div>

Yup just tried it with the mysql\_password variable in the nextcloud container. That didn’t work. Also setting every mysql variable(Host, Password, User and Database) didnt work sadly. Still the same error as above.

---

<div class="post-metadata">

**Author:** ![Chartman123](https://help.nextcloud.com/user_avatar/help.nextcloud.com/chartman123/32/15034_2.png) [@Chartman123](https://help.nextcloud.com/u/Chartman123)\
**Post date:** [May 7, 2021, 4:05pm UTC](https://help.nextcloud.com/t/new-setup-docker-compose-not-working/115673/7 "2021-05-07T16:05:50Z")

</div>

Seems to be related to MariaDB 10.6, which by the way is currently in alpha status:

> ##### MariaDB starting with [10.6](https://mariadb.com/kb/en/what-is-mariadb-106/)
> 
> From [MariaDB 10.6.0](https://mariadb.com/kb/en/mariadb-1060-release-notes/), tables that are of the `COMPRESSED` row format are read-only by default. This is the first step towards removing write support and deprecating the feature.
> 
> Set the [innodb\_read\_only\_compressed](https://mariadb.com/kb/en/innodb-system-variables/#innodb_read_only_compressed) variable to `OFF` to make the tables writable.

> **[InnoDB COMPRESSED Row Format](https://mariadb.com/kb/en/innodb-compressed-row-format/)**
>
> Similar to the COMPACT row format, but can store even more data on overflow pages.

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [May 7, 2021, 4:16pm UTC](https://help.nextcloud.com/t/new-setup-docker-compose-not-working/115673/8 "2021-05-07T16:16:50Z")

</div>

Please start with the [official](https://hub.docker.com/_/nextcloud) docker-compose file - this is doesn’t cover everything you want (e.g. no cron and redis) but it is good starting point…

```auto
version: '2'

volumes:
  nextcloud:
  db:

services:
  db:
    image: mariadb
    restart: always
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
    volumes:
      - db:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=
      - MYSQL_PASSWORD=
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud

  app:
    image: nextcloud
    restart: always
    ports:
      - 8080:80
    links:
      - db
    volumes:
      - nextcloud:/var/www/html
    environment:
      - MYSQL_PASSWORD=
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
      - MYSQL_HOST=db

```

another more complex setup I posted [here](https://help.nextcloud.com/t/totally-baffled-how-to-get-started-newbie-alert/112181/24). But I strongly recommend to start with an easy example and add complexity once more simple setup works.

---

<div class="post-metadata">

**Author:** ![Wibias](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wibias/32/37925_2.png) [@Wibias](https://help.nextcloud.com/u/Wibias)\
**Post date:** [May 7, 2021, 6:15pm UTC](https://help.nextcloud.com/t/new-setup-docker-compose-not-working/115673/9 "2021-05-07T18:15:59Z")

</div>

Sooo. The fix was actually pretty easy for mariadb 10.6.0.  
@Chartman123 lead me in the right direction.  
Adding

> command: --innodb-read-only-compressed=OFF

fixes the error. The other stuff that is in the offical docker-compose file isn’t needed for this to be fixed(Not really sure what that does anyway). Thanks for the help!

---

<div class="post-metadata">

**Author:** ![BoboN7](https://help.nextcloud.com/user_avatar/help.nextcloud.com/bobon7/32/31285_2.png) [@BoboN7](https://help.nextcloud.com/u/BoboN7)\
**Post date:** [August 16, 2021, 5:19pm UTC](https://help.nextcloud.com/t/new-setup-docker-compose-not-working/115673/10 "2021-08-16T17:19:04Z")

</div>

Hi, can you maybe elaborate on how you fixed this?  
I tried to exec into the container and run

```auto
mysqld --innodb-read-only-compressed=OFF

```

but it didn’t work  
 ![grafik](https://help.nextcloud.com/uploads/default/original/3X/b/5/b56dcdf928e92ed31e3d436ed2039057d6b03610.png)  
It basically said: Don’t touch me, you don’t know what your doing!  
Or should i just edit some config file withing the volume? (from outside the container?)

---

<div class="post-metadata">

**Author:** ![Chartman123](https://help.nextcloud.com/user_avatar/help.nextcloud.com/chartman123/32/15034_2.png) [@Chartman123](https://help.nextcloud.com/u/Chartman123)\
**Post date:** [August 16, 2021, 6:04pm UTC](https://help.nextcloud.com/t/new-setup-docker-compose-not-working/115673/11 "2021-08-16T18:04:13Z")

</div>

Just running this command probably wouldn’t help much as it’s not persistent. So just add the command when you run the container.

---

<div class="post-metadata">

**Author:** ![BoboN7](https://help.nextcloud.com/user_avatar/help.nextcloud.com/bobon7/32/31285_2.png) [@BoboN7](https://help.nextcloud.com/u/BoboN7)\
**Post date:** [August 16, 2021, 7:15pm UTC](https://help.nextcloud.com/t/new-setup-docker-compose-not-working/115673/12 "2021-08-16T19:15:31Z")

</div>

Alright, thanks 🙂 !  
creating a command section in my docker-compose.yml file worked:  
 ![grafik](https://help.nextcloud.com/uploads/default/original/3X/f/a/fa121c376d0c3ed78114287b5995018737533a74.png)

---

<div class="post-metadata">

**Author:** ![medicineman25](https://help.nextcloud.com/letter_avatar/medicineman25/32/6_22734026db12803ebb3e059622ac3534.png) [@medicineman25](https://help.nextcloud.com/u/medicineman25)\
**Post date:** [January 5, 2022, 7:23am UTC](https://help.nextcloud.com/t/new-setup-docker-compose-not-working/115673/13 "2022-01-05T07:23:41Z")

</div>

Why hasn’t this been added to the official docker-compose file? This is still a problem.

---

<div class="post-metadata">

**Author:** ![system](https://help.nextcloud.com/user_avatar/help.nextcloud.com/system/32/29333_2.png) [@system](https://help.nextcloud.com/u/system)\
**Post date:** [September 23, 2024, 4:18pm UTC](https://help.nextcloud.com/t/new-setup-docker-compose-not-working/115673/14 "2024-09-23T16:18:13Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
