How to build a Linux-powered smart home
Add some intelligence to your home and offices
When you purchase through links on our site, we may earn an affiliate commission.Here’s how it works.
Nextcloud via Docker… continued
At this point we could connect Nextcloud to a MariaDB container, and have both store their data in named volumes, which will provide portability.
The resulting volumes will be available in the/var/lib/docker/volumes/directory. We can also add boring names to our containers.
Getting these two containers to talk to each other is tricky, so we’ll refer you to the Docker Compose section in the documentation here, but we’ll return to this idea soon.
Containers still continue to exist after they have been stopped. Multiple instantiations of the same one aren’t really a space issue, since the layers of the union filesystem are shared between them.
But it’s nice to tidy up after yourself, so check your containers occasionally withdocker psand clear unwanted ones, such as our database above, with:
If you want to get rid of everything (danger, beware), you can do so with:
You could at this point go back to the web installer and enter some administrative credentials, doggedly proceeding with the SQLite database, and reusing the first volume.
Are you a pro? Subscribe to our newsletter
Sign up to the TechRadar Pro newsletter to get all the top news, opinion, features and guidance your business needs to succeed!
But we’re going to borrow from the community and use the example Docker Compose setup, skimming over a few details which you should check in the documentation.
Running Docker this way uses four containers, one of which is a reverse proxy running Nginx, which can provide SSL encryption (which is essential if you make this installation available to the internet at large).
Also existing in this setup is a Let’s Encrypt host to automatically update certificates.
So if you’ve got a domain name setup, the whole thing will be seamless.
Grab the Compose recipe and environment from the Tutorials download, or fetch it from thenextcloud/dockerrepo on GitHub.
Edit thedocker-composefile, setting in particular the MySQL password, the virtual host (your domain name) and Let’s Encrypt variables.
Then follow theofficial documentation to install Docker Composeas this process may change.
If something doesn’t work, you can peer into the logs of each container, for example:
One way or another, you’ll find your way back to the Nextcloud setup screen, and then all further configuration will be free of terminal commands.
You just need to choose an admin password, usedbfor the database name (it uses Docker’s internal networking so doesn’t need a domain name) and wait a few moments for everything to be initialised.
Your first step should be to create a new user, which you can do from theUserssection in the drop-down menu in the top right. It’s better to keep the admin account for, well, admin.
While you’re here, you can use your administrative privileges to see how apps are added to Nextcloud. SelectAppsfrom the user menu in the top right, and you’ll find a categorised list of them.
It’s good practice to keep your containers updated with the command:
from the directory with thedocker-compose.ymlfile.
Current page:Nextcloud via Docker… continued
7 myths about email security everyone should stop believing
Best Usenet client of 2024
Lego will let you build Sir Ernest Shackleton’s iconic lost ship, the Endurance, in its next Icons set