Page 1 of 1
Git Server - Migration from Synology
Posted: 26 Nov 2025, 00:49
by lsoto
Hello.
I am going to migrate my old Synology DS920+ to a brand new F4-424 Pro bought in Amazon at the Black Friday.
I do not miss most of the features that I use at the Synology, but the GIT server that is not available. I could not found any app/instructions (a couple of them are from 2023 referring a Medium blog not available anymore) regarding the setup of a Git Server.
I would like to run it natively, not under an emulated docker image whith a share FS.
I know that TOS 6 has an Ubuntu under the hood, but it is supposed we should not touch it (update, install new packages, modify configuration), so I am wondering how to proceed.
Any guidance would be appreciated.
Re: Git Server - Migration from Synology
Posted: 29 Nov 2025, 05:01
by Maniform
Hi !
I'm interested too by configuring a git server. I tried GitBucket from community but it's not compatible with TOS 6 it seems.
https://tmnascommunity.eu/download/gitbucket/
Re: Git Server - Migration from Synology
Posted: 30 Nov 2025, 05:19
by Maniform
I may have found a way to make it work :
https://tmnascommunity.eu/download/modbase1/
ModBase1 contains
git. If it works as expected, you could create a git server by
- Create a "git" shared folder.
- Create a project from the NAS
Code: Select all
cd Volume1/git
mkdir YourProject.git
cd YourProject.git
git init --bare
git symbolic-ref HEAD refs/heads/main
The last command may be optional and is to set the main branch name to "main".
- Clone and use your git project from your computer
And that should work !
From my side, I can't try this solution yet, I need to wait 2 more days because it seems we are limited to 5 downloads in community apps per week.
I managed to create a git folder and use a Raspberry Pi 5 as a git interface to do it. It works well but I would prefer to keep everything in the NAS.
I hope this will help you !

Re: Git Server - Migration from Synology
Posted: 03 Dec 2025, 01:14
by Maniform
Update: I tried it but as always, cloning a git project through SSH doesn't work because of
Code: Select all
bash: line 1: git-upload-pack: command not found
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
For some reason, the PATH isn't initialized the same way when you use SSH login and git commands.
When I log with SSH, I can use
without any other configuration requirements but
doesn't have the same PATH.

Re: Git Server - Migration from Synology
Posted: 03 Dec 2025, 15:24
by TMzethar
Re: Git Server - Migration from Synology [Accepted]
Posted: 05 Dec 2025, 02:25
by lsoto
Ok, I managed to do it, always that you use the syntax git://server/repo.git
This does not work with SSH for several reasons. No fancy UI, etc. Just bare git server.
(There could be a way to enable the ssh and thus the user control using the ssh keys, but it involve touching a TOS modified/customized file and I am not going to disclose it here: ssh_prepare)
It is an open server. So far I did not found the way to restrict the access to it. It is listening at port TCP:9418 (if you want to create a FW rule)
TL;DR
#Create at the UI the group git, the user git-daemon or whatever you want (the UI does not allows you to create the user git ??). Create the volume for your git repository and assign the rights to the user git-daemon
# on the CLI, convert to
# Install git package
apt update && apt install git git-daemon-sysvinit
(it is going to tell you modifying the OS should not be done and if you are sure about that)
#modify the user git-daemon with the bash shell (instead of no shell) to allow create repos later
chsh git-daemon -s /bin/bash
#create/modify the /etc/default/git-daemon to your taste
---------------------
# Defaults for git-daemon initscript
# sourced by /etc/init.d/git-daemon
# installed at /etc/default/git-daemon by the maintainer scripts
GIT_DAEMON_ENABLE=true
GIT_DAEMON_USER=git-daemon
### This is "Git root"
GIT_DAEMON_DIRECTORY=/Volume1/git
### Remap all the path requests as relative to the given path.
### So instead of git://server/Volume1/git/myrepo we could use git://server/myrepo
GIT_DAEMON_BASE_PATH=/Volume1/git
# other options. Check man page (internet) of git-daemon
GIT_DAEMON_OPTIONS=" --export-all --syslog --informative-errors"
---------------------
# ping systemctl to reload changes
systemctl daemon-reload
# enable and start the service
systemctl enable --now git-daemon.service
#check that it is running
systemctl status git-daemon.service
********
### Create a repo
su - git-daemon
cd /Volume1/git
mkdir test.git && cd test.git
git init --bare .
**** on your workstation
git clone git://server/test.git