Things would be much easier if I have newer Synology Diskstation with Docker support. However my Synology Diskstation 214+ doesn’t support Docker. Probably because of slow CPU and low RAM.
On the other hand, it is powerful enough to run Gogs. Think of it like a very simple GitHub or GitLab. No CI/CD features, only Git management, users, teams, mirrors, webhooks wiki, issues and simple tasks. It also supports Git hooks so you can prepare your deployments workflow this way, no matter of missing CI/CD user interface.
If you have Synology with Docker support, feel free to try Gogs in Docker containers. There is also a popular fork called Gitea.
Gogs
Gogs installation on Synology Diskstation
There is a third party SPK package for Gogs. Installation is very simple even for the not experienced users or developers. Just follow these steps:
-
Install Git using default Symfony DSM package manager
-
Install MariaDB the same way
-
Create a database named gogs. You can use PhpMyAdmin for that.
-
Go to your Package Center for your Synology DSM, click the Settings button and enable third-party packages.
-
Now download and install Gogs SPK file for your Synology Diskstation platform. Mine was ARM based.
-
Run the app from Synology DSM icon and follow the instruction to set up the Gogs.
How to update Gogs to the latest version on your Synology NAS
The problem is the package mentioned above contains an old version of Gogs. Luckily, update is not very hard:
-
Enable SSH access to your Synology
-
Download and unpack the latest Linux version of Gogs for your platform (ARM) from the binary packages list.
-
Unpack the downloaded archive. You should get gogs folder with gogs executable, scripts folder and a pair of readme files.
-
SSH to your Synology and stop the Gogs service using command:
synoservicecfg --stop pkgctl-Gogs -
Copy the new version to the folder /volume1/@appstore/Gogs/gogs. You will probably need sudo access.
-
Now start the service again using this command: synoservicecfg --start pkgctl-Gogs
-
Everything should go smooth and you should see a new Gogs version using your web browser.
Maybe you are asking why I do not use GitLab, GitHub, Bitbucket or other cloud services. I simply do not need them. I just need storage with a simple Git management to be able to work from different places (home & office desk). I do not need sophisticated CI/CD for large projects, I’m happy with PHPloy and some shell scripts.