Docker on Synology is EASY
I previously wrote about Docker for Windows, which turned out to be pretty simple.
It also gives us hints on how to accomplish this on Synology SRM. Which also sounded complicated, but is actually equally simple.
For this, I'm using Uptime Kuma as the example. Exact settings may vary by application.
Here's what you do:
1. Go to Package Center and install Docker (DSM 6.x) or Container Manager (DSM 7.x).
2. Navigate to the "docker" subfolder of your Synology.
-
For Container Manager (DSM 7.x):
3. Create a subdirectory for your Docker application (i.e. "rustdesk-server").
4. Go find the official "docker-compose.yaml" file for the Docker application you want.
** WARNING: Just like with ANY software you install, be sure you are using the correct, official installer. Malware disguised as legitimate software is hardly a problem confined to Docker, so always be careful! **
5. Drop the .yaml file into the new directory.
6. Click on the Project tab on the left.
- Click Create.
- Give your project a name.
- Point it to the folder you created in File Station (docker/rustdesk-server).
- Click Next
It will then run the .yaml file and install your new program.
-
For Docker (DSM 6.x):
3. Search for your desired package in the Registry tab.
Note: it will ask for a "tag"; this decides which exact version of the app you are going to download. You will have to figure out which "tag" is the right one.
4. Switch to "Image". Click on the just-downloaded image and select "Launch".
Note: If "Launch" is greyed out, the image is still downloading. (The hard drive / platter icon on the right will blink while this is occurring, but that is really easy to miss - bad UI design.)
5. In General Settings:
Give it a name (i.e. uptime-kuma").
- If present, check the box for "Enable auto-restart".
- Click "Advanced Settings".
6. In Advanced Settings, check the box for "Enable auto-restart" (if present).
7. In Volume:
- Click Add Folder, then select the folder for the Docker app.
- Under Mount path, type "/app/data".
8. In Port Settings: set Container Port and Local Port to the right one for that app (i.e. 3001). Or you can leave it at "Auto" if the Auto setting is right.
9. Click Apply, then Next, then Apply.
-
And shazam! You've just set up your first "self-hosted" app!
(Well, OK, you still need to actually set up said app / service, which is a whole 'nother thing. But it's ready when you are.)
-
And yes, you can sudo into your server, go to the correct subfolder and run:
sudo docker compose up -d
But you don't have to. So if that's not something you understand / can do, that's fine! Forget that and just follow the steps above.
-
I'm assuming your server is on 24/7/365, so the new application will always be available. Which makes this a great option for always-on, on-demand services.
Accessing this new program depend on that specific program, but many Docker apps run via a web dashboard. So you open http://<YOUR-SERVER-IP>:21114, or whatever, to access your new "service".
-
Notes:
- Many Synology devices are underpowered due to anemic hardware, and might not be able to run demanding apps properly. (An example would be on-the-fly video transcoding via Jellyfin.)
- If the server goes down, your services will go with it (obviously). If an application is critical, consider setting up some kind of fallback.
-
Now that you understand Docker on SRM, take a look at some useful apps for beginners.
Comments
Post a Comment