This docker-compose file will install Nextcloud, MariaDB and draw.io, all behind an Nginx reverse proxy and secured with Let's Encrypt.
Then the after-install.sh script installs and configures draw.io app into Nextcloud.
The docker-compose file depends on https://blog.ssdnodes.com/blog/installing-nextcloud-docker/
- Two subdomain. One for Nextcloud and the other for draw.io. For example,
nextcloud.example.comanddrawio.example.com - The latest version of Docker (https://docs.docker.com/engine/installation/)
- Docker compose (https://docs.docker.com/compose/install/)
-
Create a directory to include Nextcloud. MariaDB, Nginx data.
mkdir nextcloud-drawio cd nextcloud-drawio -
Download
docker-compose.ymlandafter-install.shfiles from this repository folder.wget https://raw.githubusercontent.com/jgraph/docker-drawio/dev/nextcloud/docker-compose.yml wget https://raw.githubusercontent.com/jgraph/docker-drawio/dev/nextcloud/after-install.sh chmod +x after-install.sh -
Edit the docker-compose file to set the domains and LE email.
- Replace
nextcloud.YOUR-DOMAINwith your Nextcloud subdomain e.g,nextcloud.example.com - Replace
drawio.YOUR-DOMAINwith your draw.io subdomain e.g,drawio.example.com - Replace
YOUR-EMAILwith your email to be used by Let's Encrypt for notifications e.g,user@example.com - Optional: You can also change the Maria DB user information and root password.
- Replace
-
Run the docker-compose file and wait for all containers to run (all show done status)
docker-compose up -d -
Now goto Nextcloud subdomain (e.g,
nextcloud.example.com) and complete the setup- Select the admin username and password
- Select
Storage & databasethen selectMySQL/MariaDB - For DB configurations, use the same info in the
docker-compose.ymlfile. If you used the default values, thenDatabase userisnextcloud,Database passwordismysql,Database nameisnextcloud, and most importantly change the host fromlocalhosttodbwhich is the name of the MariaDB service in the docker compose file.
-
Now, we should install draw.io Nextcloud app and set draw.io URL to point to the self-hosted draw.io we just started. This can be easily done by running the
after-install.shgiving it the draw.io URL as first parameter. For example:./after-install.sh https://drawio.example.com -
You Nextcloud with draw.io is now ready. Test it by creating a new diagram and make sure draw.io is served from your domain instead of www.draw.io