Guide · Open source
How to use Gogs: install and run your own Git server
Updated · written with AI from the project's own documentation and checked against our catalogue data
Gogs is an open-source web application for hosting your own Git repositories on a server you control, with a interface similar in spirit to GitHub. This guide explains what it includes, what hardware it needs, which databases it supports and how to get started with the source. It is written for people who want a private Git service and are comfortable installing and maintaining software themselves.
Quick start
- 1Clone the source. Run git clone https://github.com/gogs/gogs.git to get a copy of the repository on your machine.
- 2Read the installation guide. Follow the installation guide linked from the README at gogs.io/getting-started/installation for setup steps on your platform.
- 3Pick a database. Choose PostgreSQL, MySQL, MariaDB or SQLite3 as the backend, or another database that speaks one of those protocols.
- 4Size the server. Start with a Raspberry Pi or small VPS for personal use, or 2 CPU cores and 512MB RAM as a baseline for a team.
- 5Create users and repositories. Set up user, organization and repository management, then choose how people access repos over SSH, HTTP or HTTPS.
- 6Configure authentication and webhooks. Connect SMTP, LDAP, a reverse proxy, or GitHub sign-in with 2FA, and add webhooks to your chat or other tools as needed.
What Gogs is and who it suits
Gogs is a self-hosted Git service. Its stated goal is to be a simple, stable and extensible service that can be set up in the most painless way. It is written in Go, so it ships as an independent binary distribution across platforms that Go supports, including Linux, macOS, Windows and ARM-based systems.
It is a good fit for small teams that want a private Git server on their own hardware, hobbyists running a home server or Raspberry Pi, and people who prefer not to host code on a third-party platform. It is not a fully managed hosted service, so you install and maintain it yourself.
Get the Gogs source
The source is available from the official repository. Clone it with the command below. The README points to the project homepage, gogs.io, for user documentation and to the installation guide for setup steps.
git clone https://github.com/gogs/gogs.gitChoose hardware and a database
The project says a Raspberry Pi or a $5 DigitalOcean Droplet is more than enough to get started. For teamwork, the README gives 2 CPU cores and 512MB RAM as the baseline, and says to increase CPU cores when the team grows significantly, since the memory footprint remains low.
For the backend, Gogs supports PostgreSQL, MySQL, MariaDB and SQLite3, as well as any database backend that speaks one of those protocols.
- Small or personal use: a Raspberry Pi or small VPS is the project's stated starting point.
- Team use: plan for 2 CPU cores and 512MB RAM as a baseline, then add CPU as the team grows.
- Browser: the smallest officially supported resolution is 1024*768. Browser versions are listed on the Semantic UI page linked from the README.
Use the core features
Gogs covers the everyday parts of a code host. You can manage users, organizations and repositories, and access repositories over SSH, HTTP and HTTPS. Repositories include issues, pull requests, a wiki, protected branches and collaboration tools.
Other features include webhooks (including Slack, Discord and Dingtalk), Git hooks, deploy keys, Git LFS, migration and mirroring of repositories from other code hosts, and a web editor for quick file and wiki edits. Authentication can use SMTP, LDAP, a reverse proxy, GitHub.com or GitHub Enterprise with 2FA.
Know the limits before you commit
The API is experimental. The README points to API documentation but describes support as experimental, so do not plan on a complete GitHub API replacement. Check the documentation for what is covered.
Installation is also on you. There is no managed option described in the source, so backups, updates and security are your responsibility. Ready-made deployment options named in the README include Cloudron, YunoHost and alwaysdata, plus a Docker route on Synology.
Get help and find community resources
For problems, the README points to a troubleshooting page on gogs.io and to GitHub Discussions. The README also links several community tutorials covering Raspberry Pi, Docker, Ubuntu and FreeBSD setups. Check their dates and versions yourself before following them.
What people use it for
- A small team hosting private repositories on its own hardware.
- A hobbyist running a Git server on a Raspberry Pi at home.
- Mirroring or migrating repositories from other code hosts into a self-hosted instance.
- Running a private Git service with a web editor for quick file and wiki changes.
- Connecting repositories to Slack, Discord or Dingtalk through webhooks.
Frequently asked questions
Is Gogs free to use?
Gogs is released under the MIT License, as stated in the README and its LICENSE file. The MIT License governs use of the software; check the LICENSE file for the full text.
What hardware do I need to run Gogs?
The README says a Raspberry Pi or a $5 DigitalOcean Droplet is more than enough to get started. For teamwork, it gives 2 CPU cores and 512MB RAM as the baseline, and suggests adding CPU cores as the team grows.
Which databases does Gogs support?
Gogs supports PostgreSQL, MySQL, MariaDB and SQLite3, and any database backend that speaks one of those protocols. Choose the one that fits your setup.
Does Gogs have a hosted version?
The source does not describe a managed hosted service. You install and maintain Gogs on your own server. The README does link an online trial at try.gogs.io.
How does Gogs compare to Gitea, GitLab and Forgejo?
Gitea, GitLab, Forgejo and Gitolite are comparable projects. This page does not benchmark them, so compare features, resource needs and licensing for your own use case before choosing.
Where do I get help if something breaks?
The README points to the troubleshooting page at gogs.io/asking/troubleshooting and to GitHub Discussions for questions.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Gogs suits small teams and hobbyists who want a lightweight, self-hosted Git service on modest hardware and are happy to maintain it. If you need a fully managed service, a complete GitHub API replacement, or a setup for a very large organization, look at other options such as Gitea, GitLab or Forgejo.
Install options & downloads