HowTo: Ubuntu + Docker + Nextcloud + Talk + Collabora

can you please tell me the path of this file? how can I edit this file? Thanks

@jub Please start a new thread for troubleshooting. Unfortunately I can’t read your error.

@Asif_Khan If you are referring to the docker-compose.yml file, you make it yourself, and the path can be different.

@KarlF12 Vielen Dank, dass Sie sich fĂźr mein Problem interessieren. ich habe ein neues Thema dazu erstellt: The implementation of the HowTo Question about HowTo https://help.nextcloud.com/t/howto-ubuntu-docker-nextcloud-talk-collabora/76430/11 brings error message Internal server error

I could solve my problem. After a long, unsuccessful search I started all over again and it worked.
My guess: During the first run of docker-compose up -d I forgot to change the MYSQL_ROOT_PASSWORD in the .env and I think “password” does not accept MariaDB as password. Is it possible that the repeated call of docker-compose up -d does not re-read the file .env?

Anyway: NextCloud is running! Thanks again @KarlF12 for this helpful HowTo!

You are, at least IMHO, being ungrateful and quite frankly, annoying. @KarlF12 has, what I assume, taken his personal time creating this tutorial, and for people like you to basically jump on his case because of an error with a character, one in which he has already suggested how to fix, is well, annoying.

I could be wrong, but he isn’t being paid to do this, and probably has a “real” job and responsibilities, and instead of you being appreciative to his work, you are being pedantic.

There is no need to build new image. Standard image can be used (in secondary service) with cron.sh as entry point:

version: '3'
services:          
  cron:
    image: nextcloud
    entrypoint: /cron.sh    
    networks:
      - your_nextcloud_network     
    restart: always
    volumes:
      - vol_html:/var/www/html

WOW! What great work you have done with this tutorial. I had been working for days on this before I found it.

EDIT!

I have now deleted quite a few comments because they were due to my own fault. For the help of others I will let this stand as to tell them where I went wrong.

First and gravest mistake: I snap-installed Nextcloud with the Ubuntu server installation. After that I tried to install Collabora Online Docker alongside it. I don’t know if it is possible, but for me it created all manner of problems.

Second, since I already had Nextcloud snap installation and Collabora docker I mainly looked for ways to patch or heal my configuration. I tried to redo some things and fix others.

I decided I needed a fresh install of the OS (Ubuntu server without Nextcloud snap). After the fresh install I meticulously followed the above guide and I couldn’t be happier! It all works great!

Some things to be careful with:

  1. Read carefully and follow every part of the Docker installation under point 3. There is a link to a guide you need to follow - do it attentively. Same goes for Docker Compose.

  2. Make sure you have port forwarding set to the correct internal ip-address. Mine had changed after reinstallation of OS and I had forgotten to change it in the router settings.

  3. I had a hard time with step 5. Create the folder in /home/username/ and call it nextcloud.

Under step 5.1 (.env-file)
The NEXTCLOUD_IPADDRESS=10.20.30.40 is to be set to internal ip-address of the server.
The passwords I just made up. Is there any other way of doing it?

All those files I created by using ‘sudo nano /home/username/nextcloud/.env’ and equivalent.

Step 5.4 was unintelligible to me untill I had read it several times. I’m learning as I am doing. I might need to go through that step soon but so far I haven’t.

  1. Step 6.1 - the trusted proxy warning is covered in 6.2.

The apache site configs referred to seems to be the 010-nextcloud.conf found in /etc/apache2/sites-enabled/. Remove the # before the line mentioned in the warning to make the HSTS warning go away.

If you followed the guide closely there should be no problems with step 6.2.

  1. Step 6.4 - in my case at least, the port forwarded as well as the cloud.domain.name:port should be 3478. The guide gives to different ports.

It all works like a charm and I am so happy, happy! Even I could do it

THANKS TO the great contributions of KarlF12!

Thank you very much for this guide!

Cordially,
Martin

It’s actually two commands. The 2nd line just loads the changes so you don’t have to log out/in for the new alias to take effect.

I’m not sure here, but the error sounds like there was maybe a typo?

You should still resolve any warnings. They usually have links that tell what you need to do.

I think that command was probably rejected and did nothing.

I wouldn’t think so, but if you’re going to run Nextcloud in Docker, I would remove the snap.

Okay @nightcobe so in regards to the .bashrc stuff, this is just creating a command alias for your Ubuntu user. It shortens the command so you can invoke occ inside the container without having to type “docker exec -it -u www-data nextcloud php” before it every time. That’s what you would have to do normally.

There is no need to sudo this part. In fact that will probably make it not work.

Are you able to run Docker commands without sudo? If not then make sure you added your user to the docker group and log out/in.

This is going to be really hard to troubleshoot because I have no idea what state your system is in or what changes you’ve already made. If you think the overwriteprotocol https is what broke it then I would start with undoing that and see if it runs.

If not then I think the best thing to do is start a new topic and post your configs so we can take a look.

I don’t know why your system wouldn’t have a docker group. I’ve never run into that issue. This group is added by the Docker package when it’s installed. Did you follow all the steps in section 3 above?

When running docker-compose it’s best to be in the folder with docker-compose.yml. Otherwise you have to specify the config path every time.

I think that is probably the best course to be honest. Your system has been through a number of other configurations already and I don’t know the history to tell you what to look at.

What I can tell you is if you follow my guide above start to finish it’ll work. I’ve set up probably 5-10 of them just like this.

Hello again!

I did a fresh restart and clean installed Ubuntu without Nextcloud snap.

After that I followed your guide and everything is working great…

…except Talk. Should I follow the install instructions? I didn’t. And after setting port forward to port 3478, turnserver:port to cloud.domain.name:3489, adding my coturn secret that I made up earlier (was I supposed to just make it up?) the server test gives me the following error:

Error: no working ICE candidates returned by the TURN server

Should the ports be the same though the guide shows them different?

Thank you! I am so happy right now to have come this far!

/Martin

EDIT:

I changed the port in the nextcloud turn server settings so it reflected the 3478 port on the router port forwarding and the server test gives me OK.

Seems to be working with this configuration.

EDIT2:

I might clean up your post here by removing some of my earlier comments as they came from operating in a broken operating system setup.

So, how did you solve it? I have had to turn my VPN off…

/Martin

My specific VPN Client had an option for “Sharing in the local network”:

I have one last question for you, KarlF12. It might be of interest to others.

It seems like my Nextcloud Docker only uses 195GB out of the 930 GB drive. Is this a common problem? How do I make my Docker configuration understand that there is more space to use?

Would be great if it at least used 700 GB, the rest could be kept for the system/server.

To mount an internal harddrive as part of the Nextcloud configuration, do I need to use what you describe about the extra docker image?

Thanks a lot!

Cordially,
Martin

In my experience, Nextcloud shows the same size as the disk that the data folder is on. Can you run and show output from: sudo df -h

And the nextcloud container section of your docker-compose.yml.

This is what I received:

Filesystem Size Used Avail Use% Mounted on
udev 5.6G 0 5.6G 0% /dev
tmpfs 1.2G 1.9M 1.2G 1% /run
/dev/mapper/ubuntu–vg-ubuntu–lv 196G 22G 165G 12% /
tmpfs 5.6G 0 5.6G 0% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 5.6G 0 5.6G 0% /sys/fs/cgroup
/dev/sda2 976M 109M 800M 12% /boot
/dev/loop0 98M 98M 0 100% /snap/core/10583
/dev/loop1 50M 50M 0 100% /snap/certbot/889
/dev/loop2 55M 55M 0 100% /snap/core18/1880
/dev/loop3 56M 56M 0 100% /snap/core18/1944
/dev/loop4 62M 62M 0 100% /snap/core20/904
/dev/loop6 68M 68M 0 100% /snap/lxd/18150
/dev/loop5 72M 72M 0 100% /snap/lxd/16099
/dev/loop7 32M 32M 0 100% /snap/snapd/10707
/dev/loop8 30M 30M 0 100% /snap/snapd/8542
/dev/sdb1 7.3T 52M 6.9T 1% /8TB
overlay 196G 22G 165G 12% /var/lib/docker/overlay2/7743c9b56a2fbf41d2848bafb736834d2c811d24c723165c14ff9b9a417867b4/merged
overlay 196G 22G 165G 12% /var/lib/docker/overlay2/f71ab73440cf7ef1f0a7c64b7cf1ff5e1121e7ddf946aaf11694098a038cfd05/merged
overlay 196G 22G 165G 12% /var/lib/docker/overlay2/af0ccc4fb724881d30a48bcb7668dbafd65cfa841aa9eca8b8ddb369f22eefd9/merged
overlay 196G 22G 165G 12% /var/lib/docker/overlay2/30578c6970d354695a8ed5d300ff2bf18e96cb9144e7bd78bdbea40a9a97b05e/merged
overlay 196G 22G 165G 12% /var/lib/docker/overlay2/4d577fc63043d5f90e871ca9e466068d29c85f7bd66525d7659a8552142fe29e/merged
tmpfs 1.2G 16K 1.2G 1% /run/user/1000

dev/mapper//ubuntu–vg-ubuntu–lv is said to contain 196GB, with 165GB available… should be about 930GB size

Thanks!

sudo fdisk -l has this output for disk sda

Disk /dev/sda: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: ST1000DM003-1CH1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: BF4CB2E1-7CE9-4736-BFC0-3EC169570120

Device Start End Sectors Size Type
/dev/sda1 2048 4095 2048 1M BIOS boot
/dev/sda2 4096 2101247 2097152 1G Linux filesystem
/dev/sda3 2101248 1953521663 1951420416 930.5G Linux filesystem

The same for /dev/mapper/ubuntu–vg-ubuntu–lv

Disk /dev/mapper/ubuntu–vg-ubuntu–lv: 200 GiB, 214748364800 bytes, 419430400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

I also tried to follow the instructions under

However, even though the terminal tells me that it has installed the SMB-client, the external storages app says that “smbclient” not installed.

What I did was that I placed these lines in a file called “dockerfile”

FROM nextcloud:apache

RUN apt-get update && apt-get install -y procps smbclient && rm -rf /var/lib/apt/lists/*

I then changed the docker-compose.yml to read thus:


version: ‘3.7’

networks:
nextcloud:

services:
nextcloud:
image: nextcloud:custom
build: .
container_name: nextcloud
networks:
- nextcloud
etc…

is there anything I should have done otherwise?

Thanks!

Your root partition, where your Docker container and data are presumably located, shows 196G capacity. This is why Nextcloud says the same.

Based on this I would say that you have misconfigured LVM. We’re getting way outside the scope of Nextcloud (and my guide) at this point. Here’s a hint to get you pointed in the right direction. You probably have unallocated LVM extents that you could add to your root partition and extend the filesystem. https://wiki.ubuntu.com/Lvm