πŸ§‘β€πŸ’»πŸ‘©β€πŸ’» Gogs

Gogs is an open source implementation of GitHub that you can use to run your own online Git service.

Gogs: A painless self-hosted Git service
Gogs is a painless self-hosted Git service.

Gogs (Code) is a F/OSS project for hosting your own Git service. While git (the command line tool)can be used completely offline, many people (in the modern world anyway) like to use online Git services to collaborate with other people, and even alone.

There are two very popular Git-based online collaboration services these days: GitHub and GitLab:

GitHub: Let’s build from here
GitHub is where over 100 million developers shape the future of software, together. Contribute to the open source community, manage your Git repositories, review code like a pro, track bugs and fea…
The most-comprehensive AI-powered DevSecOps platform
From planning to production, bring teams together in one application. Ship secure code more efficiently to deliver value faster.

Gogs lets you stand up your own GitHub/GitLab that you can use alone, with friends, or any other way you want.

Gogs screenshot (source: gogs.io)

Gogs isn't the only F/OSS project that does this (weirdly enough, GitHub is not open source, GitLab is), but it's one of the well known alternatives to GitLab at the very least, and stable option with some large sponsors and lots of interest.

If you're writing code and want to own/maintain more of your Software Development LifeCycle (SDLC) – i.e. control more of where your code goes when it leaves your machine... Then Gogs is for you.

There's a fork of Gogs called Gitea that's also worth mentioning, which we covered a while back (as a newsletter edition) – you can check out the archive:

Gitea
Gitea is lightweight but full-featured git hosting software. Host your F/OSS software with F/OSS software!

🌠 Features

Gogs, like GitHub and GitLab has a ton of features, so we can't do them justice all here:

  • Online hosting of Git-based repositories
  • Web based UI for easy navigation
  • User authentication and authorization system
  • Support for modern Git-based online workflows like pull requests
  • Plugins for integration with the frontend of the website (ex. Emojis, code snippets, markdown integrations)
  • Compatibility with multiple backend databases
  • Easily installable from binary
  • Support for webhooks on repository events
  • Localized in over 10 different languages

πŸ€– As described by AI

Gogs is a lightweight, self-hosted Git service that offers an easy and fast way to manage Git repositories on your own servers. It is written in Go, which makes it efficient and cross-platform, supporting all major operating systems. The primary goal of Gogs is to provide a simple, yet robust Git server solution that can be quickly deployed with minimal configuration. Its low resource requirements and straightforward installation process make it an attractive option for small teams or individuals who want to run their own Git service without relying on third-party hosting providers.

The project includes essential features such as repository management, issue tracking, a built-in wiki, and a powerful access control system. It also integrates with popular CI/CD tools, making it suitable for continuous integration workflows. Although it lacks some of the more advanced features found in larger Git hosting platforms like GitHub or GitLab, Gogs is praised for its simplicity, speed, and ease of use, making it an ideal choice for personal projects, small teams, or organizations that require a no-fuss, self-hosted Git solution.

πŸ“Ί Watch this

Gogs has been around for a while and is a favorite of the self-hosting enthusiast, so it's easy to find some set up guides:

This video is a bit old, but the basics are still the same, and Gogs has a great installation guide so you don't have to let a 3 year old video tell you what to do:

Installation - Gogs
Gogs is a painless self-hosted Git service.

πŸ‘Ÿ Getting started

🐳 With Docker

The easiest way to get started with Gogs is to use docker:

docker run \
  --name=gogs \
  -p 10022:22 \
  -p 10880:3000 \
  -v /var/gogs:/data \
  gogs/gogs

By default, this saves the local data used by Gogs to /var/data on your hard disk, but Gogs supports a lot more configuration (ex. backing databases like Postgres), so here's a fuller example of a docker compose setup:

services:

    postgres:
      image: postgres:16-alpine
      container_name: postgres
      restart: unless-stopped
      environment:
        - POSTGRES_USER=gogs
        - POSTGRES_PASSWORD=p4ssw0rd
        - POSTGRES_DB=gogs
      ports:
        - "5432:5432"       
      volumes:
        - ./db-data:/var/lib/postgresql/data

    gogs:
      image: gogs/gogs:latest
      container_name: gogs
      restart: unless-stopped
      ports:
        - "3000:3000"
        - "10022:22"      
      links:
        - postgres
      environment:
        - TZ="Europe/Madrid"
      volumes:
        - ./gogs-data:/data
      depends_on:
        - postgres

Docker compose example (source: jmlcas/gogs)

Obviously you'll want to source the password from somewhere else (like ENV – avoid storing passwords in plain text!), but this is a great place to start quickly with Gogs.

πŸ§‘β€πŸ’» Want to contribute?

Gogs is quite a popular MIT licensed open source project and it's managed on Github. The repository is quite active, with over 495 contributors and 44.7k ⭐s!

You can jump in and make this already-awesome project even more awesome by finding some open issues to work on:

Issues Β· gogs/gogs
Gogs is a painless self-hosted Git service. Contribute to gogs/gogs development by creating an account on GitHub.

πŸ“¬ Want Awesome F/OSS in your inbox?

We'll send you new articles as soon as they go live.