gitea
Serve self-hosted Git repositories
TLDR
Run the Gitea web server using the default configuration
Create the necessary database schema and tables
Run administrative subcommands for user management or authentication management
Display help for a specific subcommand
Display help
Display version
SYNOPSIS
gitea [-c CONFIG] [global options] subcommand [args]
PARAMETERS
-c, --config FILE
Path to configuration file (default app.ini relative to binary or custom)
--custom PATH
Custom path for templates, assets, and app.ini (default data/gitea)
--data PATH
Data path for repos, avatars, sessions (default data)
--work-path PATH
Working directory path
--log-root-path PATH
Root directory for log files
--tempdir PATH
Directory for temporary files
--port PORT
HTTP/HTTPS listen port (default 3000)
--pid FILE
Path to PID file
--quiet
Suppress debug output
--debug
Enable debug logging
-h, --help
Show help
-v, --version
Print version information
--ssh-listen-host HOST
SSH listen host
--ssh-listen-port PORT
SSH listen port (default 22)
DESCRIPTION
Gitea is a community-driven, lightweight self-hosted Git server written in Go, providing GitHub-like features including repositories, issues, pull requests, wikis, and CI/CD integration via Drone or Woodpecker.
The gitea command-line interface manages the server lifecycle, from starting the web server to administrative tasks like user management, database migrations, backups, and diagnostics. It supports SQLite, MySQL, PostgreSQL, and MSSQL databases, with configurable SSH and HTTP access.
Key usage includes running gitea web for the production server (often via systemd), gitea dump for ZIPs of repos/data/DB, and gitea doctor for integrity checks. Highly customizable via app.ini, Gitea is ideal for personal use, small teams, or enterprises seeking a lightweight alternative to GitLab. Binaries are available for Linux, Windows, macOS, ARM, and Docker images simplify deployment.
CAVEATS
Requires write access to data directories; config changes need restart. Not for direct internet exposure without reverse proxy (Nginx/Traefik). SSH must match server config.
COMMON SUBCOMMANDS
web: Start HTTP server
dump: Full backup (ZIP/DB/repos)
admin user create: Add admin user
doctor check-repo: Verify repos
migrate: Import from GitHub/GitLab
STARTUP EXAMPLE
gitea web --config /etc/gitea/app.ini
Or systemd: systemctl start gitea
HISTORY
Forked from Gogs in December 2016 by its author and community for faster development under MIT license. Reached 1.0 in 2019; now at v1.22+ with millions of users, focusing on performance, federation, and Forgejo fork emergence.


