Synology NAS can be used as a lightweight private Git server. For personal projects or a small team, this is often enough: repositories stay inside the LAN, access can be managed through NAS accounts, and the data can be backed up with Synology’s built-in tools.
This note records the basic setup idea and the backup workflow with Hyper Backup.
Install Git Server
Open Package Center on Synology DSM and install the Git Server package.
After installation, open Git Server and allow the required users to use Git over SSH. The NAS account must have SSH access and permission to the folder where repositories are stored.
Prepare A Repository Directory
Create a shared folder or a subdirectory for Git repositories, for example:
|
|
Inside this directory, create bare repositories:
|
|
A bare repository does not contain a working tree. It is suitable for use as a remote repository.
Connect From A Client
From another machine, clone the repository through SSH:
|
|
You can also add it as a remote in an existing local project:
|
|
If SSH uses a non-standard port, specify it in the SSH configuration or use a custom remote URL.
Permissions
Make sure the repository directory belongs to the correct user or group. If multiple users need access, assign them to a shared group and grant read/write permission to the Git folder.
When push fails, check these items first:
- whether SSH login works;
- whether the user is allowed in Git Server;
- whether the folder permission is writable;
- whether the repository was initialized as bare;
- whether the remote URL is correct.
Back Up With Hyper Backup
After repositories are stored on the NAS, configure Hyper Backup to back up the Git directory.
In Hyper Backup:
- Create a new backup task.
- Select the destination, such as another disk, another NAS, rsync server or cloud storage.
- Select the Git repository folder.
- Configure the schedule.
- Enable version retention if needed.
This protects the repository data against disk failure, accidental deletion or wrong pushes.
Restore Notes
When restoring, recover the whole bare repository directory. After restoration, test with:
|
|
If cloning works, the repository is usable again.
Summary
Synology Git Server is simple, but it is enough for many private repositories. The important points are SSH access, correct folder permissions, bare repositories and a reliable Hyper Backup task.