Install nextcloud in a docker enviroment with docker-compose.
Table of Contents
To store the database, www-path, and the local data I’ll create some persistent locations.
mkdir /home/nextcloud/data -p mkdir /home/nextcloud/mysql -p mkdir /home/nextcloud/appdata -p
Create a docker-compose.yml in the root folder /home/nextcloud.
version: '3' services: nextcloud_db: container_name: nextcloud_db image: mariadb restart: always command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW --innodb-file-per-table=1 --skip-innodb-read-only-compressed volumes: - /home/nextcloud/mysql:/var/lib/mysql environment: MYSQL_ROOT_PASSWORD: Str0ngSecret! MYSQL_PASSWORD: Str0ngSecret! MYSQL_DATABASE: nextcloud MYSQL_USER: nextcloud nextcloud: container_name: nextcloud image: lscr.io/linuxserver/nextcloud restart: always ports: - 444:443 links: - nextcloud_db volumes: - /home/nextcloud/appdata:/config - /home/nextcloud/data:/data environment: MYSQL_PASSWORD: Str0ngSecret! MYSQL_DATABASE: nextcloud MYSQL_USER: nextcloud MYSQL_HOST: nextcloud_db
In this scenario I mapped the nextcloud container to the external Port :444. Feel free to change it!
If the LDAP Wizzard is not working go to /home/nextcloud/appdata/www/nextcloud/apps/user_ldap/ajax. Here you have to add to every file in the 2nd line the following code.
require_once($_SERVER['DOCUMENT_ROOT'].'/lib/base.php');
2 Comments on Nextcloud with docker-compose
You’re starting mariadb but the installer says that SQLite is being used.
Do you mean the database selection during the install wizard? There is an option to choose if sqlite or MySQL/MariaDB should be used.