Setup and Install Portainer on Synology NAS

Currently reading
Setup and Install Portainer on Synology NAS

The Synology Docker UI is nice but lacks some functionality such as Stacks, Templates and other useful things that can make managing your containers a lot easier. Portainer will run seamlessly along side the Synology Docker UI.

First make a folder on your Synology to hold the portainer data and
make sure you change the path /volume1/docker/portainer in the example to match yours.

Continue reading...
 
The Endpoint in Portainer refers to the docker-api, which by default is the socket /var/run/docker.sock.
To bind the docker-api to a tcp port, it needs to be declared explicitly in /var/packages/Docker/etc/dockerd.json (on other systems this is located in /etc/docker/daemon.json).

I never lost the feeling that the Syno-UI "normalizes" container configurations, thus removing settings unknown to it and deleting volumes with a host path not beeing on a fileshare. I simply created a symlink to /var/run/docker.sock in the docker share and use it on the host side mount of the volume and never had any problems. But then I read that people live happily ever after without the symlink workaround..
 
Pretty damn cool...thanks for putting this up.

I did manage to do something dumb...named my container Portainer (capital p) and noticed the problem and initially changed the command to use a capital "P." Then decided to renmae the folder and run the command as original, but got distracted in the middle by family, and came back later and ran it w/lower case "p" folder and upper case "P" in the command.

Yeah, I'm pretty amazing.

So command fails completing properly so I have to remove the images/containers and run again. <sigh> I really make things interesting for myself...
 
So how can I add the Dockers from another NAS? Or is that not possible?

2020-04-13_14-08-29.jpg
 
So how can I add the Dockers from another NAS? Or is that not possible?
Have not tried but it is supposed to work.
Are you sure your portainer is able to reach the host/endpoint you have entered and the port on the host is also reachable ?
 
Last edited:
The Endpoint in Portainer refers to the docker-api, which by default is the socket /var/run/docker.sock.
To bind the docker-api to a tcp port, it needs to be declared explicitly in /var/packages/Docker/etc/dockerd.json (on other systems this is located in /etc/docker/daemon.json).

I could swear I wrote that the binding needs to be made specificaly.... ;)

Edit your daemon.json / dockerd.json (see the exact path above) as root and add following content:
{
"hosts" : [ "tcp://host-ip:2375", "unix:///var/run/docker.sock" ]
}

If your daemon.json already includes lines, just add the "hosts" line.
You may need to add a "," (without double quotes) to the previous line's end - or to the "hosts" line if a line follows it.

Make sure to restart the docker service after the modifcation:
- on Syno: restart the docker package
- On any other Linux os: execute the command sudo service docker restart


Then use "host-ip:2375" as the endpoint. Make sure the port is NOT accessible from the internet, as basicly everyone could remote control your docker engine!
 
@jphermans I am glad that it works, the agent has a different objective and was introduced for swarm deployments to get a grip on cluster wide resources (see: Agent — Portainer 1.23.2 documentation).

But then again: whatever works :)

Word of warning: what is true for tcp docker-api access, is also true for the agent port: if accessible from the internet, everyone can control your node. If you have to export the port to the internet, make sure to at least use mutual tls.
 
Last edited:
How did you started the container? This is how I start it.
Code:
docker run -d  -p 9001:9001 --name=portainer_agent --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/agent
 
Yesterday Portainer refused to accept my login. Stopped container, deleted /config/*.* and relaunch.
It would be nice to have password bypass.
Maybe you can make a second admin account as backup and when you have again the problem then you can test if the backup account works. I never had this problem and working now several years with portainer.
 
Only if you want to set the admin password during first start automaticly. The same can be done with the endpoint as well. This is only important if you want to have a full automated initial setup of Portainer.

The ui has a menu to create users. And you should definitly listen to jphermans and create a second admin account. Had logins problems a couple of times in the past.
 
Another image update and this happened again. Checked my IP and it was fine. The only way I saw to overcome this was to delete the container and recreate it from scratch.

FWIW, I imported a settings backup and it also failed to connect.

Am I the only one seeing this when updating Portainer? I use the download image/stop container/clear container/restart container method FWIW.
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

  • Article
Today I will show you how to setup your Synology to be used as storage on Proxmox. You can use it to store...
Replies
0
Views
3,904
  • Article
Welcome to NASCompares YouTube channel! Check out our next video below...
Replies
0
Views
2,809
  • Article
Welcome to NASCompares YouTube channel! Check out our next video below. - - - Check out FREE NAS...
Replies
0
Views
1,356
  • Article
Welcome to NASCompares YouTube channel! Check out our next video below. - - - Check out FREE NAS...
Replies
0
Views
1,242
  • Article
Welcome to NASCompares YouTube channel! Check out our next video below. - - - Check out FREE NAS...
Replies
0
Views
2,078
  • Article
Welcome to NASCompares YouTube channel! Check out our next video below. - - - Check out FREE NAS...
Replies
0
Views
1,390
  • Article
Welcome to NASCompares YouTube channel! Check out our next video below. - - - Check out FREE NAS...
Replies
0
Views
1,529

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Back
Top