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.
Portainer & Docker
When you’re running a home server orVPS, Docker is pretty great because you can add services without messing (too much) with the underlying system configuration.
As we saw with Nextcloud though, even with just four Docker containers things were starting to become unwieldy. Portainer is a Docker management system that aims to restore order to your containers.
It comes in two parts, server and agent, which both ship as Docker containers. We’ll only need the server image for this initial foray.
The agent is used to marshall Docker Swarms, which are another way of connecting containers together. We’ll start by creating a volume for data, and then firing up the image:
Note that images can be added according to their listing on Docker Hub, so you can find out more about the Portainer image athttps://hub.docker.com/r/portainer/portainer
You should find Portainer’s admin panel now waiting for you on port9000, so point your browser there, choose a password, selectManage the local Docker environmentand enjoy the friendly interface.
If you installed Nextcloud through Docker earlier, you should see all those containers listed in theLocal Endpointon the Home screen.
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!
If you clickContainerson the menu on the left, you’ll see these (and our latest Portainer container) in more detail. The quick actions column allows you to see each container’s logs, info, stats and also log in to each one directly from the browser.
This is a great way to do some troubleshooting, but recall that containers in general are quite minimal, so you won’t find any fancy utilities. Adding a new container is easy. For example, if you want to add Collabora’s CODE, and connect it with a Nextcloud install, hit theAdd Containerbutton and enter a meaningful name.
In the Image field entercollabora/code, and in theManual network port publishingsection enter127.0.0.1:9980in thehostfield and9980in thecontainerfield.
In theAdvanced containersettings below, go to theEnvsection and set the following environment variables:
Finally in theRestart policycolumn selectAlways, so the container restarts on configuration change. HitDeployand the container will spring into life.
For guidance connecting it to your Nextcloud instance, check the documentation athttps://nextcloud.com/collaboraonline.
All going well you should be able to specify it from Nextcloud, specifically from theCollabora Onlinesection in Settings. You may need to tweak the reverse proxy container to direct traffic to the new container, if you used the Docker Compose example on the previous page.
In that case you’ll find that example in theStackssection with a warning about it being created outside of Portainer.
In Portainer parlance, groups of containers are called Stacks, and it can only do limited things with externally created Stacks. However, it’s easy to create a new Stack; just paste, upload, or point Portainer to the URL of adocker-compose.ymlfile.
Current page:Portainer & Docker
7 myths about email security everyone should stop believing
Best Usenet client of 2024
Professionals are facing “tech overload” as they try to juggle multiple devices in the workplace