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
Regulars will be familiar with our ranting and raving about how greatNextcloudis. And it keeps getting better – the latest edition of the self-hosted storage and sharing platform, Nextcloud 19, sees it transformed into a complete Collaboration Hub.
If you already have a LAMP (Linux, Apache, MySQL, PHP) or equivalent stack set up on a home server or VPS, you can easily add a Nextcloud instance to it, either by extracting an archive to your web server’s root directory, or by copying the Web Installer PHP file there and running it directly.
Setting up a LAMP stack (or indeed a LEMP stack with Nginx and MariaDB) is easy enough (although it’s a bit of a faff having to create databases by hand) in Ubuntu or Debian – we’ve covered it before and there are countless guides a mere DuckDuckGo search away.
This time around we’re going to installNextclouddifferently, via Docker. In theory this will mean our instance will be portable, so you could go from running on your VPS to running on a home server, or vice versa, with relative ease.
Data and configuration are stored in volumes outside the Docker container (which you should consider a fairly ephemeral, fungible thing), so migrating the service just involves copying those volumes and connecting them to a new instance of the container.
First on the agenda is to install the Docker engine which requires adding their GPG key to the apt keyring:
You should check the fingerprint of that key matches the one beginning9DC8and given in full in theonline documentation(where you can also copy and paste these lengthy commands).
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!
Next add the Docker repos (change focal to bionic if you’re using 18.04), update caches and install Docker with:
Check that it’s working by running theHello Worldimage, then fire up the Nextcloud image:
The first switch tells Docker to run the container detached (in the background), and the second tells it to expose the container’s port 80 (where the webserver is running) to port 8080 on our server.
So now – once a few hundred megs are downloaded and the container springs in to life – if you browse tohttp://yourserver:8080(with your address or hostname) you should find the Nextcloud welcome screen.
You’ll see a warning about the container using SQLite; this lightweight database will be fine for a few users, but more popular setups will need a proper MySQL or MariaDB instance.
Go back to the terminal, find your container’s name (from the last column of the first command) and stop it with:
Current page:Nextcloud
7 myths about email security everyone should stop believing
Best Usenet client of 2024
I’ve used Genmoji and now I’m convinced Apple Intelligence will be a huge success