Nextcloud 18.0.1 with Docker-compose

Today I got my nextcloud server running with docker compose. Here is a run down of what I had to figure out:

I had to chose how to install it, went with what is in the github repo: https://github.com/nextcloud/docker.git

I chose the with-nginx-proxy with apache: https://github.com/nextcloud/docker/tree/master/.examples/docker-compose/with-nginx-proxy/mariadb/apache. The nginx proxy is a must if you are having this server out in the public.

Then I followed the instructions in the .examples folder on github:

  1. open docker-compose.yml
    1. insert your nextcloud domain behind VIRTUAL_HOST=and LETSENCRYPT_HOST=
    2. enter a valid email behind LETSENCRYPT_EMAIL=
    3. if you use mariadb or mysql choose a root password for the database behind MYSQL_ROOT_PASSWORD=
  2. choose a password for the database user nextcloud in db.env behind MYSQL_PASSWORD= (for mariadb/mysql) or POSTGRES_PASSWORD= (for postgres)
  3. run docker-compose build --pull to pull the most recent base images and build the custom dockerfiles
  4. start nextcloud with docker-compose up -d

After the container is up and running, I had two issues inside nextcloud settings/ Overview. Both issues were related to the database, having to run a php file to update the database.

To update the database, I had to run a php file from the command line. But before that, I had to install sudo in the container. I am thinking that after a restart the container will be recreated and sudo will no longer be available.

  • docker exec -it apache_app_1 bash
  • inside the container:
  • apt-get install sudo
  • sudo -u www-data php ./occ:add-missing-indices
  • sudo -u www-data php ./occ:convert-filecache-bigint

Another issue I came up with was when connecting my windows client, after I clicked Grant Access, nothing was happening. I was able to fix that by adding the

'overwriteprotocol' => 'https' 

inside the html/config/config.php file, to do this I had to install nano as a text editor.

Comments

So empty here ... leave a comment!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Sidebar