All templates

Forgejo

v1.0.0

Lightweight self-hosted Git forge for repositories, issues, pull requests, and packages.

gitdevelopment by getarcaneapp
x-arcane:
  icon: https://cdn.jsdelivr.net/gh/selfhst/icons@main/svg/forgejo.svg
  urls:
    - https://forgejo.org/
    - https://codeberg.org/forgejo/forgejo

services:
  forgejo:
    image: codeberg.org/forgejo/forgejo:latest
    restart: unless-stopped
    ports:
      - "${HTTP_PORT:-3003}:3000"
      - "${SSH_PORT:-222}:22"
    environment:
      USER_UID: ${USER_UID:-1000}
      USER_GID: ${USER_GID:-1000}
      FORGEJO__server__DOMAIN: ${FORGEJO_DOMAIN}
      FORGEJO__server__SSH_DOMAIN: ${FORGEJO_SSH_DOMAIN}
      FORGEJO__server__ROOT_URL: ${FORGEJO_ROOT_URL}
      FORGEJO__server__HTTP_PORT: 3000
      FORGEJO__server__SSH_PORT: ${SSH_PORT:-222}
      FORGEJO__service__DISABLE_REGISTRATION: ${DISABLE_REGISTRATION:-false}
    volumes:
      - ${BASE_PATH}/data:/data
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    labels:
      com.getarcaneapp.arcane.icon: https://cdn.jsdelivr.net/gh/selfhst/icons@main/svg/forgejo.svg

README

This template starts Forgejo with its built-in SQLite option for a lightweight first setup. Larger installations should move to PostgreSQL or MySQL before heavy use.

Set FORGEJO_ROOT_URL, FORGEJO_DOMAIN, and FORGEJO_SSH_DOMAIN to the real hostname before inviting users.