← All articles

How to install Docker on a Synology NAS for the first time

On a Synology NAS, you install Docker through the Container Manager package in Package Center. You need DSM 7.2 or later and a supported model: if Container Manager doesn't show up in Package Center, your NAS can't run it. After that, the easiest way to run an app is to paste its docker-compose file into a "project."

What is Docker for on a NAS?

Docker runs apps inside containers. Each one ships with everything it needs and leaves the NAS operating system alone, so you can add an app, remove it, and DSM stays exactly as it was. That's how people run software Synology doesn't offer, like Komga, Kavita or a server that shares their comics.

You'll see three words everywhere. An image is the app as you download it. A container is that image while it runs. A volume maps a folder on the NAS to a folder inside the container, and that's how the app sees your files.

A Synology DS918+, from the Plus series, with its drive trays pulled out. Photo: mculi, CC BY-SA 4.0, Wikimedia Commons
A Synology DS918+, from the Plus series, with its drive trays pulled out. Photo: mculi, CC BY-SA 4.0, Wikimedia Commons

Can your Synology run Docker?

Since DSM 7.2, Container Manager has replaced the older package that was simply called "Docker." So start by updating DSM in Control Panel › Update & Restore.

Not every model supports it. The Plus series does, and Synology adds more models with new versions of the package. The quickest check is to open Package Center and search for "Container Manager." If it shows up, your model is supported. If it doesn't, your model's page on Synology's website lists the packages it can run.

The five steps, from updating DSM to your first running app. Diagram: Foldbook
The five steps, from updating DSM to your first running app. Diagram: Foldbook

Install Container Manager

In Package Center, search for "Container Manager" and click Install. That's it for the software.

During setup, Container Manager creates a shared folder named docker. Keep it: each app will store its settings there, in a subfolder named after it (docker/komga, docker/foldbook, and so on). Your comics stay where they are.

Run your first app as a project

Container Manager has a Registry tab for browsing images by hand, but the Project tab is the easiest route. It reads a docker-compose.yml file, about ten lines that spell out the image, the folders and the port. Most self-hosted apps include one in their docs.

To create a project:

  1. In File Station, create a subfolder inside docker, for example docker/my-app.
  2. In Container Manager › Project › Create, name the project and pick that subfolder as its path.
  3. For the source, choose "Create docker-compose.yml," paste the file, and click through to Done.

Container Manager downloads the image and starts the container. If something gets stuck, the project's log shows what happened.

The lines you'll need to edit

In a compose file, you almost always change the same lines: volumes and ports.

Read a volume line from left to right: the folder on the NAS, then the folder as the app sees it. On a Synology, paths start with /volume1/ followed by the shared folder's name, so comics in a shared folder called Media live at /volume1/Media. Add :ro at the end to make it read-only: the app can read your files but can't change or delete them.

A port line such as "8686:8686" maps a port on the NAS to the app's port. The first number is the one you type in your browser (http://your-nas-address:8686). If that port is already taken on your NAS, change only the first number.

A real example: Foldbook Server

Here's what a real file looks like. This is the one for Foldbook Server, a container that shares your comics, manga and books with friends and family. It connects out to Foldbook's relay on its own, so you don't open any ports on your router.

services:
  foldbook:
    image: ghcr.io/milrer/foldbook-server:latest
    container_name: foldbook-server
    restart: unless-stopped
    ports:
      - "8686:8686"
    volumes:
      - /volume1/Media:/library:ro
      - /volume1/docker/foldbook:/data

Only the two volumes change from one NAS to the next: replace /volume1/Media with the folder that holds your comics, and /volume1/docker/foldbook with the subfolder you created. Once the project runs, http://your-nas-address:8686 shows a six-digit code to enter in the app. The Foldbook Server page covers the rest, including a prompt you can paste into ChatGPT or Claude if you'd like to be walked through it.

You don't need Docker to read at home: Foldbook opens the NAS shared folder directly, as the guide to reading comics from a NAS explains. Docker is for services that run all the time, like Komga (see Komga or a plain shared folder) or sharing your library with other people.

Other questions people ask

Does Docker slow down my NAS?

A stopped container uses nothing. A running app uses the memory and CPU it needs, like any other package. If your NAS has little memory, start apps one at a time and keep an eye on Resource Monitor.

How do I update an app?

Stop the project, clean it (Action › Clean), delete the old image in the Image tab, then build the project again: Container Manager downloads the new version. Settings stored in the docker folder are kept.

Do I need to open ports on my router?

Not to use an app at home, since the port works on your local network. Access from outside depends on the app. Foldbook Server uses an outbound connection and needs no open ports. The post on reading your comics away from home from a Synology walks through the options.

Keep reading