Gogs — Painless Self-Hosted Git Service
Gogs is a lightweight, self-hosted Git service written in Go. It runs on minimal hardware, supports multiple platforms, and provides a GitHub-like experience with issue tracking, pull requests, and webhooks.
Review-first install path
This asset needs a review step. The copied prompt tells the agent to dry-run, show the writes, then proceed only after confirmation.
npx -y tokrepo@latest install cda70b8e-39da-11f1-9bc6-00163e2b0d79 --target codexDry-run first, confirm the writes, then run this command.
What it is
Gogs is a self-hosted Git service built with Go that provides a clean web interface for hosting Git repositories. It includes issue tracking, pull requests, code review, built-in wiki, webhooks, and organization management.
Gogs targets small teams and individual developers who want a private Git hosting solution that runs on minimal hardware -- even a Raspberry Pi -- without the resource overhead of GitLab or Gitea.
How it saves time or tokens
Gogs is a single binary with embedded assets and templates. There is no separate web server, no Node.js build step, and no external dependencies beyond a database. Deployment takes minutes instead of hours, and the low resource footprint means it can run alongside other services on budget hardware.
How to use
- Download and run the Gogs binary:
# Binary install
wget https://dl.gogs.io/0.13.0/gogs_0.13.0_linux_amd64.tar.gz
tar -xzf gogs_0.13.0_linux_amd64.tar.gz && cd gogs
./gogs web
- Or run via Docker:
docker run -d --name=gogs -p 3000:3000 -v gogs-data:/data gogs/gogs
- Open the web UI and complete the first-run setup wizard to configure your database and admin account.
Example
# Clone a repository from your Gogs instance
git clone http://your-gogs-server:3000/username/repo.git
# Push a new repository
mkdir myproject && cd myproject
git init && git add . && git commit -m 'init'
git remote add origin http://your-gogs-server:3000/username/myproject.git
git push -u origin main
Related on TokRepo
- Self-Hosted Tools -- More self-hosted developer tools and services
- DevOps Tools -- Git hosting fits the DevOps toolchain
Common pitfalls
- Gogs uses XORM and supports SQLite, MySQL, PostgreSQL, and MSSQL. SQLite is simplest for single-user setups but does not handle concurrent writes well.
- Gogs and Gitea share a common codebase origin. Gitea has more contributors and features but also higher resource usage. Pick based on your scale needs.
- SSH key management requires the Gogs binary to have access to the authorized_keys file. Misconfigured SSH causes clone failures over SSH protocol.
Frequently Asked Questions
Gitea is a community fork of Gogs created in 2016. Gitea has more active contributors and additional features like GitHub Actions-compatible CI. Gogs focuses on simplicity and low resource usage. Both provide a GitHub-like web interface for Git hosting.
Gogs supports SQLite, MySQL, PostgreSQL, and MSSQL via the XORM ORM. SQLite requires no external database server and works well for small installations. MySQL and PostgreSQL are recommended for teams.
Yes. Gogs compiles for ARM architectures and its low memory footprint (typically under 100MB RAM) makes it suitable for Raspberry Pi and other ARM single-board computers.
Yes. Gogs provides pull request workflows with diff viewing, inline comments, and merge options. The feature set is simpler than GitHub but covers the core code review workflow.
Gogs supports repository mirroring from external Git URLs. You can also use the API to create repositories and then push existing Git repos via standard git remote commands.
Citations (3)
- Gogs GitHub— Gogs is a painless self-hosted Git service written in Go
- Gogs Documentation— Gogs supports SQLite, MySQL, PostgreSQL, and MSSQL databases
- Git Documentation— Git protocol specification for repository hosting
Related on TokRepo
Discussion
Related Assets
Gitea — Lightweight Self-Hosted Git Service
Gitea is a painless self-hosted Git service with code hosting, review, CI/CD, package registry, and project management — a lightweight GitHub/GitLab alternative.
Forgejo — Community-Owned Self-Hosted Git Forge
Forgejo is a self-hosted lightweight software forge forked from Gitea under community governance. It provides Git hosting, code review, issue tracking, and CI/CD in a single Go binary.
Shlink — Self-Hosted URL Shortener with Analytics
Shlink is a self-hosted URL shortener that lets you create short links with full analytics, QR codes, and API access. Built with PHP, it supports custom domains and provides detailed visit tracking.
Shiori — Simple Self-Hosted Bookmark Manager
Shiori is a lightweight self-hosted bookmark manager written in Go with full-text search, archiving, and a clean web interface for organizing your saved links.