2026-07-28 15:44:34 +03:00
2026-07-28 15:44:34 +03:00
2026-07-28 15:44:34 +03:00
2026-07-28 15:44:34 +03:00
2026-07-28 15:44:34 +03:00

Local Git Server

A self-hosted Git server powered by Gitea with a GitHub-style web interface, repository browsing, issues, pull requests, actions, releases, and SSH/HTTP Git access.

Start it

  1. Copy .env.example to .env.
  2. Change POSTGRES_PASSWORD in .env to a long random value.
  3. Start the stack:
docker compose up -d
  1. Open http://localhost:3000.
  2. Create the first account. The first account becomes an administrator.

The Git SSH endpoint is available on port 2222:

git clone ssh://git@localhost:2222/your-user/your-repository.git

HTTPS cloning is also available from the repository page:

git clone http://localhost:3000/your-user/your-repository.git

Useful commands

# View service logs
docker compose logs -f gitea

# Stop containers but keep repositories and database data
docker compose down

# Stop and permanently delete all Git data
docker compose down -v

Production notes

  • Put Gitea behind HTTPS with a reverse proxy before exposing it to the internet.
  • Use a managed or separately backed-up PostgreSQL instance for important repositories.
  • Set DISABLE_REGISTRATION=true and REQUIRE_SIGNIN_VIEW=true for a private team server.
  • Back up both the gitea_data and postgres_data volumes.
  • Update GITEA_ROOT_URL and GITEA_DOMAIN to the public hostname before deploying.
S
Description
No description provided
Readme
33 KiB
Languages
Shell 100%