NextCloud AIO Docker image: No access.

Discussion of applications not mentioned above.
Post Reply
User avatar
woschai
Posts: 2
Joined: 02 Jan 2024, 21:16

NextCloud AIO Docker image: No access.

Post by woschai »

Hi, I recently got a TerraMaster F2-223, and I'd like to run NextCloud on it.

Background: I see that there is a NextCloud app in TOS, but the version of NextCloud coming with this app seems to be outdated. At least the NextCloud Android complains about a server version which is is no longer supported. Thus I tried to install NextCloud as a Docker image. There is a "Nextcloud manual docker image" with good rating, but the description says that it officially supported by Nextcloud GmbH, and I' rather use the All-in-One docker image.
So I downloaded the image and activated it using the default settings in all the dialogues (no changes to any of the settings). With this, the container seems to start, but I cannot access any of the ports of the bridge. Also, in the "Containers" overview, a message saying "Restarting" is present. So obviously, I did something wrong, but what? Are there instructions how to get this docker image to run?

The container's log contains these messages, which probably are related, but I have no clue what to do with them:
- Docker socket is not available. Cannot continue.
- Please make sure to mount the docker socket into /var/run/docker.sock inside the container!
- If you did this by purpose because you don't want the container to have access to the docker socket, see https://github.com/nextcloud/all-in-one ... al-install.
I did not do this on purpose ...
Any help is appreciated!

Many thanks in advance!

Wolfgang
User avatar
topo01
Posts: 45
Joined: 27 Dec 2022, 20:19
Germany

Re: NextCloud AIO Docker image: No access.

Post by topo01 »

Hi Wolfgang,
I have Nextcloud running but I had to waste many hours until it finally worked. Neither docker-compose nor Portainer worked so I ended up setting it up manually inside TOS Docker Manager. However, I had to use Portainer for pulling the correct images.
Important: I do not access my Nextcloud instance from outside my own network. Therefore I dont bother with Letsencrypt and reverse proxy and such.

Here is what I did:

1. Create Folders which will be your volumes.
I have two folders:
One for the MariaDB database and one for Nextcloud itself for storing all the user data:
/Volume1/cloud/db
/Volume1/cloud/nextcloud

2. Pull image for MariaDB
In Portainer pull image of MariaDB but make sure version is 10.6 (docker image pull mariadb:10.6).

3. Start Container for MariaDB
In TOS Docker Manager start MariaDB with the following options entered manually.
Make sure to adjust your path names and password:
name: mariadb
command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW
volumes:
- /Volume1/cloud/db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=YOURPASSWORD
- MYSQL_PASSWORD=YOURPASSWORD
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
network: bridge

4. Download image for Nextcloud.
I did not want to have the latest version (I think it was 27 at that time) so I pulled in Portainer nextcloud:26.0.3

5. Start Container for Nextcloud
In TOS Docker Manager start Nextcloud with the following options entered manually.
Make sure to adjust your path name and password. Here I use exact same password as for MariaDB.
name: nextcloud
ports:
- local port: 8585
- container port: 80
volumes:
- /Volume1/cloud/nextcloud:/var/www/html
environment:
- MYSQL_PASSWORD=YOURPASSWORD
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_HOST=mariadb
network: bridge

6. Initialize
Now you can enter in your browser address bar myipaddress:8585 (e.g. for me it is my NAS "192.168.178.25:8585").
Enter new admin name and password.
Everything else should already be prefilled. Make sure you select setup database "MySQL/MariaDB". If localhost is empty enter the MariaDB container name mariadb.

7. Create Users
Inside Nextcloud when logged in as admin you can now create all users and install apps.

Good Luck!
F2-220, TOS 5.1.123 (8GB system partition), Docker 2.0.16 (Nextcloud, AdGuard Home), Terra Photos 2.0.13
User avatar
woschai
Posts: 2
Joined: 02 Jan 2024, 21:16

Re: NextCloud AIO Docker image: No access.

Post by woschai »

Hey topo01,

many thanks for the detailed instructions. I just tried to follow them, but I encountered two problems:
- Portainer wants credentials to log in. I don't know what to use here. But I think this is not a real problem as I could use the Docker Manager app directly to pull the MariaDB image.
- Now I am trying to launch the container with the settings you propose. I assumed that the command (--transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW) should go into the field "Execution command" on the page "Execution command" of the launch wizard. But this field is not editable. So where should I enter this command?

Many thanks in advance!

Wolfgang
User avatar
topo01
Posts: 45
Joined: 27 Dec 2022, 20:19
Germany

Re: NextCloud AIO Docker image: No access.

Post by topo01 »

{L_BUTTON_AT}woschai

Hi,
Sorry for my late response.
Looks like I actually did something else than what I wrote above and I can't fully remember - sorry for that. At some point in time I did experiment with docker compose (login through SSH and work on the command line). There you can pass also the command parameter.
If I find my yml file I will post it here.
F2-220, TOS 5.1.123 (8GB system partition), Docker 2.0.16 (Nextcloud, AdGuard Home), Terra Photos 2.0.13
User avatar
topo01
Posts: 45
Joined: 27 Dec 2022, 20:19
Germany

Re: NextCloud AIO Docker image: No access.

Post by topo01 »

No guarantee but this could be the compose file that I used (save with file name docker-compse.yml).
As written before make sure to adjust your paths and passwords.

I think it was not complete for the network part and I had to re-adjust this in the TOS Docker manager for both containers to bridge. Compose was also creating some new network.

Code: Select all

version: '2'

services:
  mariadb:
    image: mariadb:10.6
    restart: always
    command: --transaction-isolation=READ-COMMITTED --innodb_read_only_compressed=OFF --log-bin=binlog --binlog-format=ROW
    volumes:
      - /Volume1/cloud/db:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=YOURPASSWORD
      - MYSQL_PASSWORD=YOURPASSWORD
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
      - MYSQL_HOST=db

  nextcloud:
    image: nextcloud:26.0.3
    restart: always
    ports:
      - 8585:80
    links:
      - mariadb
    volumes:
      - /Volume1/cloud/nextcloud:/var/www/html
    environment:
      - MYSQL_PASSWORD=YOURPASSWORD
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
      - MYSQL_HOST=mariadb
F2-220, TOS 5.1.123 (8GB system partition), Docker 2.0.16 (Nextcloud, AdGuard Home), Terra Photos 2.0.13
User avatar
topo01
Posts: 45
Joined: 27 Dec 2022, 20:19
Germany

Re: NextCloud AIO Docker image: No access.

Post by topo01 »

The environment parameter for - MYSQL_HOST has to be the same as service name:
- MYSQL_HOST=mariadb
(not "- MYSQL_HOST=db)
F2-220, TOS 5.1.123 (8GB system partition), Docker 2.0.16 (Nextcloud, AdGuard Home), Terra Photos 2.0.13
Post Reply

Return to “Others”