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:
- open
docker-compose.yml
- insert your nextcloud domain behind
VIRTUAL_HOST=
andLETSENCRYPT_HOST=
- enter a valid email behind
LETSENCRYPT_EMAIL=
- if you use mariadb or mysql choose a root password for the database behind
MYSQL_ROOT_PASSWORD=
- insert your nextcloud domain behind
- choose a password for the database user nextcloud in
db.env
behindMYSQL_PASSWORD=
(for mariadb/mysql) orPOSTGRES_PASSWORD=
(for postgres) - run
docker-compose build --pull
to pull the most recent base images and build the custom dockerfiles - 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!