-->

How to Run Docker Containers on Synology NAS

docker synology, nas

As a big fan of Raspberry Pis, I have been running multiple Pis with multiple Docker containers. They can serve a lot of different purposes for your home lab. The problem is you have to make sure you backup your data frequently. You can use a NAS as your backup system but what’s even better is to utilize the compute power of your Synology NAS and run your Docker containers directly on the NAS. This way you can have built-in redundancy assuming you did set up redundancy with your NAS which is generally the common goal.

Getting Started

To run Docker containers on your Synology NAS, you need to install a package called Container Manager. You can check if your Synology is compatabile with this package on his page: Container Manager compatability

In this tutorial, I’ll be using a Synology DS1821+ model.

Open Package Center, and search for “container”.

Search results for container in the package center

Click Install on Container Manager package or you can click on somewhere else on the box to read the details of the package. Then you can click Install on that page too.

Container manager package details

Once installed, click Open to see the details

Container manager installed

You can now that the Container Manager is ready to use:

Container manager ready to use

## Running Containers To run a container off of a Docker image, first you need to pull the image from a Docker registry. By default, the container manager uses DockerHub as its Docker registry but you can sutomize it by clicking Registry –> Settings.

Docker registry settings

Here you can add other registries from other providers.

To test your setup, click on nginx package and click Download.

nginx on container manager

When asked to choose a tag, accept the default which is “latest” and click Download again.

Choose tag dialog

Once the image is downloaded, you can see it in the Image section

Image details

Click Run button. You should a settings dialog window. Here you can customize the resouce allocation of your container.

General settings while running a container

Click Next and you will be presented with the Advanced Settings such as port mapping, environment variables etc.

Advanced settings while running a container

Here enter a local port to be able to access your web server. In this example, I will use port 6500 to access the nginx on this container.

Click Next again, review the Summary and click Done.

Container settings summary

You can now view your container by switching to the container tab.

You view your new Nginx server running on your Synology NAS at port 6500, simply go to your NAS address followed by :6500 to indicate the port and you should see it in action:

nginx running on port-6500

Summary

In this beginners tutorial, you learned how to install the Container Manager package on your Synology NAS and ran your first container. In the upcoming articles, we will cover running Docker containers in more depth with more real-life examples.

Resources