Tech & GadgetsProjects & Hobbies

Portainer on a Synology: the control room for your home apps

Install Portainer on a Synology NAS in a few minutes, without SSH: what Docker and Portainer are, the setup, the first login, updates and safety.

By Georgios Tsimplidis4 min read

A home server is only as useful as the apps you run on it. On a Synology, most of the good ones, like TeslaMate, Immich or wger, come as Docker containers. And the most comfortable way to run containers is Portainer.

This is the first building block of a small series. Once Portainer runs, installing a new app is mostly copy, paste and click.

Docker in one paragraph

A Docker container is an app packed together with everything it needs to run: its own little operating system, libraries and settings. It runs isolated from the rest of the NAS, starts in seconds, and can be deleted without leaving a mess. An image is the recipe a container is made from. A stack (or “compose file”) is a short text file that describes several containers that belong together, for example an app and its database.

Think of a shipping container: the crane doesn’t care whether it holds olive oil or electronics, it lifts the box. Docker does the same for software: the app behaves the same on my NAS, on yours, or on a server in a data centre.

Why Portainer, if Synology already has Container Manager?

Synology’s own package, Container Manager, installs Docker and has a simple interface. It’s fine for one or two containers. Portainer is better once you run more:

  • Stacks with a web editor: paste a compose file, add your secrets as variables, deploy.
  • Logs and a console for every container, one click away.
  • Updates of a whole stack with a fresh image in two clicks.
  • The same tool everywhere: what you learn here works on any Docker host.

Before you start

  • A Synology that can run Container Manager. Most Plus models can; check your model in Synology’s Package Center or on the Container Manager product page. I run everything on a DS1621+.
  • DSM 7.2 or newer.
  • An administrator account on the NAS.

You don’t need SSH: everything below happens in the DSM web interface.

Step 1: install Container Manager

  1. Open Package Center, search for Container Manager, and click Install.
  2. When it asks, let it create the shared folder docker on your main volume.

That’s Docker itself. Container Manager’s own interface you can ignore from now on.

Step 2: make a folder for Portainer’s settings

  1. Open File Station, go into the docker folder.
  2. Create a folder called portainer (lowercase).

Portainer keeps its users and settings there, so they survive updates.

Step 3: start Portainer with the Task Scheduler

DSM’s Task Scheduler can run a command as the system administrator. We’ll use it once, to start Portainer.

  1. Open Control Panel → Task Scheduler.
  2. Click Create → Scheduled Task → User-defined script.
  3. On the General tab: name it Install Portainer, set User to root, and untick Enabled. We only want to run it by hand.
  4. On the Task Settings tab, paste this into Run command:
docker run -d --name=portainer \
  -p 9443:9443 \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v /volume1/docker/portainer:/data \
  --restart=always \
  portainer/portainer-ce:lts
  1. Click OK, confirm the warning, select the task and click Run.

What the command means:

  • -p 9443:9443: Portainer’s web interface, over HTTPS, on port 9443 of your NAS.
  • -v /var/run/docker.sock…: lets Portainer talk to Docker and manage the other containers.
  • -v /volume1/docker/portainer:/data: Portainer’s settings go into the folder from step 2. If your docker folder is on another volume, change volume1.
  • --restart=always: Portainer starts again after a reboot.
  • portainer-ce:lts: the free Community Edition, long-term support version.

Step 4: first login, within five minutes

  1. In your browser, open https://YOUR-NAS-IP:9443 (for example https://192.168.1.10:9443).
  2. The browser warns that the certificate isn’t trusted: Portainer uses its own certificate for now. Continue to the site. (The next article fixes this properly.)
  3. Create the administrator user with a long, unique password.
  4. Click Get Started and open the local environment.

Do it within five minutes. For safety, Portainer locks the setup page if nobody creates an admin in time. If that happens, restart the container: in Container Manager → Container, select portainer and choose Restart, then try again.

You should now see all your containers, images, volumes and networks. Welcome to the control room.

Updating Portainer

Portainer can’t update itself. Create a second task the same way (user root, not enabled) called Update Portainer, with this script:

docker stop portainer
docker rm portainer
docker pull portainer/portainer-ce:lts
docker run -d --name=portainer \
  -p 9443:9443 \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v /volume1/docker/portainer:/data \
  --restart=always \
  portainer/portainer-ce:lts

Run it when Portainer tells you a new version is out. Your settings stay in the portainer folder, so you log in as before.

Safety first

Portainer can control every container on your NAS, and through Docker, most of the NAS itself. Treat it like the keys to the house:

  • A strong, unique password for the admin user, kept in a password manager.
  • Never open it to the internet. No port forwarding on your router. From outside, I reach mine only through the WireGuard tunnel I described in Talos lives in my hallway.
  • Only deploy stacks you understand, from sources you trust: the project’s own documentation first.

Your data, your rules

Every app you run this way keeps its data on your own disks. No subscription, no terms of service that change every year, no one analysing your photos or your trips. That’s the whole point of the server, and why I wrote about the numbers behind it in Dare, then calculate.

What’s next