Run a personal Git repository on your NAS
A personal Git repository on a NAS gives you a private, always-available remote for code, scripts, configuration files, and family projects. It combines version control with hardware you control, so commits stay off public hosting platforms and can be copied to another system without relying on a third-party account.
Unlike GitHub, GitLab, or Bitbucket, a self-hosted service has no monthly subscription, but it also has no magic. You administer users, updates, storage, networking, and recovery. The right setup is usually a small server with a clean backup process rather than a complicated platform built for hundreds of developers.
A NAS can host a bare Git repository over SSH, a browser-based service such as Gitea or Forgejo, or a heavier GitLab instance. QNAP and Synology systems support several of these approaches through packages or containers, although compatibility depends on the processor, installed NAS operating system, and available memory.
For Australian homes, the attraction is practical: a fibre, hybrid fibre, or fixed-wireless NBN connection can support remote work, while the NAS remains the local source of truth. The aim is a dependable Git server with safe remote access, not a replacement for every feature offered by a managed cloud platform.
Choose the right NAS workflow
Choose the simplest workflow that meets your needs. A bare repository is ideal for one or two developers because Git pushes directly to it over SSH and there is no web interface to maintain. Gitea or Forgejo adds pull requests, issue tracking, previews, and a polished dashboard. GitLab suits larger teams, but its resource demands make it a poor fit for many entry-level NAS units.
Match the software to the hardware. A low-power ARM NAS can comfortably run a bare repository or a lightweight Gitea container; x86 systems with 8 GB or more of memory have more headroom for GitLab, CI runners, and simultaneous builds. Confirm that the container image supports your CPU architecture before installing anything. Australian retailers normally advertise GST-inclusive pricing, so compare the memory upgrade and supported drive interfaces as part of the true cost.
For source code, two mirrored drives or a RAID array may be plenty, while Git LFS and large media need more capacity. An SSD cache improves random I/O, although it does not protect deleted files and should not be treated as a backup. Keep the Git data on a dedicated volume with enough free space for temporary objects, clones, and pack maintenance.
Prepare the repository service
Create a dedicated NAS user and storage folder before installing the Git service. Give that account only the permissions it needs, and keep operating-system administration separate from repository access. On QNAP, Container Station is a common route; on Synology, Container Manager provides the equivalent Docker-based environment. A native Git package can be simpler when the available version is current and maintained.
For a bare setup, create the repository as the service account rather than as an administrator. The basic command is git init --bare --shared=group /volume1/git/project.git, with the path adjusted for your NAS. Protect the parent directory, assign ownership correctly, and restrict shell access with git-shell where the operating system supports it. The repository has no working files by design; Git objects and refs live in its data directory.
For a web workflow, configure Gitea or Forgejo with persistent storage for the database, repositories, attachments, and configuration. Record those paths in your recovery notes, set the correct file ownership, and test an administrative restart before adding users. Enable built-in update notifications, but schedule package or image updates for a quiet period and retain a rollback copy of the previous configuration.
Connect devices and collaborators
Add the NAS as a Git remote from each workstation. An SSH remote such as ssh://git@nas.local/volume1/git/project.git lets the NAS resolve on the local network without complex firewall rules. Commit a small test, push it, clone it into a fresh folder, and confirm that the history matches before relying on the system for active work.
Use separate repository permissions for collaborators. A personal project might allow read and write access for trusted household members while keeping deployment secrets elsewhere. Branch protection, review rules, and signed commits are worthwhile once more than one person contributes. Git hooks can run tests on the server, but remember that hooks execute code and therefore deserve the same scrutiny as any other automation.
Remote access needs Australian network planning. NBN services may use fibre-to-the-premises, hybrid fibre coaxial, or fixed wireless, and some connections still sit behind carrier-grade NAT or receive changing IP addresses. A VPN such as WireGuard or Tailscale usually provides a more dependable route than exposing SSH directly. This also works for a developer travelling from Perth to Sydney or across Melbourne and Brisbane time zones without inventing a different access method.
Protect data and control access
Put the Git service on a trusted VLAN or home network segment and allow only the ports and directions you require. Keep the NAS administration interface separate from the Git application, disable unused file-sharing services, and require strong SSH keys or a password manager for every account. Restrict administrator access by source address where practical, and review connection logs for failed logins and unfamiliar devices.
If the service must be reachable from the internet, terminate TLS at a reverse proxy, enable multi-factor authentication, and keep software updates current. Gitea and Forgejo can work through a proxy with WebSocket support for live repository views. A private VPN remains preferable for personal use because it exposes fewer services and avoids putting login forms directly against the public internet.
Repository contents can contain malicious hooks, leaked credentials, and deceptive URLs. Scan commits and dependencies, rotate any secret that reaches history, and avoid opening unexpected links from an authenticated browser session. An unrelated gaming link such as this gaming reference could be inserted as a phishing lure; unexpected links deserve inspection rather than blind trust.
Back up beyond the RAID array
RAID improves availability, but it is not a backup. A mistaken deletion, ransomware event, failed controller, or corrupt filesystem can affect every mirrored copy. Enable scheduled snapshots on QNAP or Synology when the feature is supported, and keep snapshots long enough to catch mistakes. Snapshots recover an earlier state; they do not replace a protected copy stored somewhere else.
Create versioned off-site backups with tools such as Kopia, Duplicati, Hyper Backup, or restic. A second NAS, an encrypted external drive stored at another property, or an Australian cloud region can provide separation from the primary system. Use immutable or read-only backup credentials where available, encrypt sensitive repositories before upload, and check the provider’s data-location terms.
Git-specific recovery is straightforward when tested. Export a git bundle for important milestones, or clone the bare repository to another disk and verify both the object database and branch refs. Run git fsck periodically and rehearse restoring into a clean directory. After a ransomware or hardware failure, a known-good backup plus a documented DNS and SSH setup is often faster than rebuilding every clone from scratch.
Capacity and speed deserve monitoring as history grows. Packing and garbage collection can temporarily consume extra space, so leave headroom on the volume. SSD caching helps Git operations and builds on HDD-backed models, while LFS objects belong on fast, monitored storage. In plain Aussie language, “she’ll be right” is not a recovery strategy: alerts and test restores must tell you what is actually happening.
Your first move should be a controlled pilot rather than a wholesale migration. Create the NAS account, install either a bare SSH repository or Gitea, push one small test project, and verify a fresh clone. Record the service path, administrator recovery method, snapshot schedule, and off-site destination in one page that another household member can follow.
Once that test survives a reboot and a restore, move the project that matters most, then schedule recurring backup checks and quarterly recovery drills. Create the account today, install one Git service, make the first push, and put the off-site backup in place before calling the NAS your source of truth.