PORTAINER & DOCKER
Contain your sprawling smart home office with Portainer, then ruminate on a fully featured email server with Mailcow
WHEN YOU’RE RUNNING a home server or VPS, Docker is pretty great because you can add services without messing (too much) with the underlying system configuration. As we’ve seen with Nextcloud, though, even with just four Docker containers things become unwieldy. Portainer is a Docker management system that aims to restore order.
It comes in two parts—server and agent—which both ship as Docker containers. you’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. Let’s start by creating a volume for data, and then firing up the image.
$ docker volume create portainer_data
$ docker run -d -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/ docker.sock -v portainer_data:/data portainer/portainer
Note that images can be added according to their listing on Docker Hub, so you can find out more about the Portainer image at https://hub.docker.com/r/ portainer/portainer. You should find Portainer’s admin panel now waiting for you on port 9000, so point your browser there, choose a password, select “Manage the local Docker environment” and enjoy the friendly interface. If you installed Nextcloud through Docker earlier, you should see all those containers listed in “Local Endpoint” on the Home screen. If you click “Containers” on 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 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.