Aisle Development

Gitea

Your own GitHub.

Add to my serverdocker-compose generator (French)Step-by-step guide (French)Official documentation

What is it for?

Gitea hosts your Git repositories with a GitHub-like interface: issues, pull requests, wiki and even continuous integration (Actions). Light and fast.

Who is it for?

Developers who want to keep their code at home.

Good to know

Port 2222 is for git over SSH: open it in the firewall if you use it.

After installing

  1. Right after installing, open the site, keep SQLite as the database and create the administrator account at the bottom of the setup page: until you do, the first visitor can configure the instance for you.

The docker-compose

Example behind Traefik. To adapt it (Nginx Proxy Manager, local port…) with a line-by-line explanation, use the generator (in French).

# docker-compose.yml : Gitea
services:
  gitea:
    image: gitea/gitea:1
    container_name: gitea
    restart: unless-stopped
    environment:
      USER_UID: "1000"
      USER_GID: "1000"
      GITEA__server__DOMAIN: git.mydomain.com
      GITEA__server__ROOT_URL: https://git.mydomain.com/
      GITEA__server__SSH_DOMAIN: git.mydomain.com
      GITEA__server__SSH_PORT: "2222"
      GITEA__service__DISABLE_REGISTRATION: "true"
      TZ: Europe/Paris
    volumes:
      - ./data:/data
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    ports:
      - "2222:22"
    networks:
      - traefik
    labels:
      - traefik.enable=true
      - traefik.http.routers.gitea.rule=Host(`git.mydomain.com`)
      - traefik.http.routers.gitea.entrypoints=websecure
      - traefik.http.routers.gitea.tls.certresolver=letsencrypt
      - traefik.http.services.gitea.loadbalancer.server.port=3000

networks:
  traefik:
    external: true