This tutorial shows how to set up Docker with Portainer on a Docker-unsupported Synology Diskstation. This tutorial should work on all Synology Diskstations. I tested it on the DS118.
Make sure that:
- the Diskstation have an internet connection
- the nano command in linux for the Diskstation exists
- you have access and administrator permissions to the DSM
- the ssh service is enabled
Get the latest docker version: here for example: docker-24.0.7.tgz
-
Execute the following command in the terminal to download docker:
sudo wget https://download.docker.com/linux/static/stable/aarch64/[version]
Replace [version] to the newest version
-
Unpack the tgz file:
sudo tar xzvf [file]
Replace [file] to the file name
-
You need to copy all directories and files of the unpacked directory to the linux commands:
sudo cp [name]/* /usr/bin/
Replace [name] to the name of the unpacked docker file
- Create the /etc/docker/daemon.json configuration file with the following configuration:
{ "storage-driver": "vfs", "iptables": false, "bridge": "none" }
- You can try to run docker with the following command:
sudo dockerd
If it doesn't work, please check whether you have done everything correctly according to the instructions. If it's just a permission error, you don't have enough permissions to the Synology user!
To run docker on the startup, you need to create a new execute script that run the command on startup:
-
Go to Control Panel > Task Scheduler, click Triggered Task and Custom Task.
-
It opens a new window. The Task is the name of the Task. I named it Docker Runner.
-
As User, you need to choose a administrator user!
-
The Event is triggered when the diskstation boots up.
-
Go to Task Settings and enter following script/commands as Command execute:
echo -n "[password]" | sudo -S rm -rf /var/run/docker.pid echo -n "[password]" | sudo -S killall containerd echo -n "[password]" | sudo -S dockerd
Replace [password] to the password of your user
-
Click Ok to create the new Task!
-
Go in your SSH-Client and type following command:
docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest
It will create a new docker container with portainer.
-
Go in your browser on http://[ip_of_diskstation]:9000
Replace [ip_of_diskstation] to the IP-Address of you Diskstation!
If you did everything right, it should work. If it doesn't work, you can create a new issue!