Portainer text on white paper with pencil

Portainer as alternative to Synology Docker GUI

What is Portainer?

Portainer is a lightweight management application that allows you to easily manage your Docker environment through a web interface.

If you haven’t installed Docker, please have a look at Using Docker on Synology NAS.

Don’t forget to have a look at Portainer App Templates for LinuxServer.io Docker containers and install 140+ applications at the push of a button.

Why use Portainer?

Although there is a Synology Docker GUI available, with the Portainer setup described here, you have an alternative to manage Docker containers on a Synology NAS.

But most importantly. Sometimes there is a need for settings, which can’t be done through the Synology Docker GUI. Using Portainer offers access to all Docker features – not just the limited feature set provided by the Synology Docker GUI.

Install Portainer on Synology NAS

We will discuss two ways to install Portainer. The first one uses the Synology Task Scheduler and the second one uses SSH access to install Portainer.

If you are already familiar with the command line interface, I suggest using SSH access.

Task Scheduler

To get started, fire up DiskStation Manager, and then open up Control Panel and go to Task Scheduler, Create, Scheduled Task, User-defined script.

DiskStation Manager > Control Panel > Task Scheduler > Create > Scheduled Task, User-defined script

Synology task scheduler create task

Enter “Install Portainer” for the Task description, select user root and uncheck the Enabled toggle.

Synology task scheduler create task generalSynology task scheduler create task general

Select “Run on the following date” and “Do not repeat”.

Synology task scheduler create task schedule

If we look at the Portainer documentation, we can use the following Docker commands to deploy the Portainer Server.

docker volume create portainer_data
docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce
docker run -d -p 9001:9001 --name portainer_agent --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v /volume1/@docker/volumes:/var/lib/docker/volumes portainer/agent
Code language: Markdown (markdown)

Note that the Portainer Agent is not needed on standalone hosts, however it does provide additional functionality if used so we are going to install it as well.

Copy the commands in the User-defined script area and choose OK.

Synology task scheduler create task task settings

Accept the warning and choose OK.

Synology task scheduler create task task settings message

Select the task “Install Portainer” and choose Run.

Synology task scheduler run task

Accept the warning and choose OK.

Synology task scheduler run task message

Wait a minute or two for Portainer to install, and continue with Using Portainer.

SSH access

If you haven’t enabled SSH access, have a look at How to use SSH to connect to Synology NAS.

Start the SSH client, connect to your Synology NAS and switch to root.

sudo -iCode language: Markdown (markdown)

If we look at the Portainer documentation, we can use the following Docker commands to deploy the Portainer Server.

docker volume create portainer_data
docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce
docker run -d -p 9001:9001 --name portainer_agent --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v /volume1/@docker/volumes:/var/lib/docker/volumes portainer/agent
Code language: Markdown (markdown)

Note that the Portainer Agent is not needed on standalone hosts, however it does provide additional functionality if used so we are going to install it as well.

Run the Docker commands and wait for the commands to finish.

After the commands are finished you can exit your SSH session.

exitCode language: Markdown (markdown)

The Portainer application is installed and ready to roll!

Using Portainer

Start your browser and type http://synology-nas-ip-address:9000.

Create the initial administrator user by providing a password and choose “Create user”.

Portainer create user

Choose Agent and enter the Name and Agent URL where you enter the IP-address of your Synology NAS.

Choose Connect.

Portainer connect

After connecting to the Agent, you see the Portainer Home page.

Choose the Synology NAS endpoint.

Portainer home

After connecting to the endpoint, you see the Portainer Dashboard page where you can administer your Docker environment.

Portainer home

Select Containers from the menu and the Portainer Container list page opens.

Portainer container list

Select a container and the Portainer Container details page opens where you can stop, start, remove the container and more.

Portainer container details

Next to the container, you can also administer images, networks, volumes and more.

Portainer App Templates

Don’t forget to have a look at Portainer App Templates for LinuxServer.io Docker containers and install 140+ applications at the push of a button.