LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

gitea

Self-hosted Git service with web interface

TLDR

Start Gitea server
$ gitea
copy
Start with config
$ gitea --config [/etc/gitea/app.ini]
copy
Generate a secret key
$ gitea generate secret [INTERNAL_TOKEN]
copy
Create admin user
$ gitea admin user create --username [admin] --password [password] --email [admin@example.com] --admin
copy
Run health checks
$ gitea doctor check
copy
Dump full installation to an archive
$ gitea dump
copy
Run pending database migrations
$ gitea migrate
copy

SYNOPSIS

gitea [global options] command [command options]

DESCRIPTION

gitea is a self-hosted Git service written in Go. It provides GitHub-like functionality including repositories, issues, pull requests, and CI/CD, all packaged in a single binary.Gitea is lightweight and fast, suitable for personal or small team use. It supports OAuth, LDAP, and various database backends for enterprise deployments.

PARAMETERS

web

Start the web server.
admin
Perform admin operations: manage users (user), auth sources (auth), or regenerate hooks/keys (regenerate).
cert
Generate a self-signed SSL certificate.
doctor
Diagnose and optionally repair problems with the installation (check, recreate-table).
dump
Export the full installation (database, repos, config, etc.) into a compressed archive.
dump-repo / restore-repo
Migrate repository data between Gitea instances.
generate
Generate random secrets/tokens: `INTERNALTOKEN`, `JWTSECRET`, `SECRETKEY`, `LFSJWT_SECRET`.
keys
Provide the `AuthorizedKeysCommand` output used for SSHD integration.
manager
Control a running instance: shutdown, restart, flush queues, adjust logging.
migrate
Run pending database migrations; typically run once before first startup.
-c, --config FILE
Path to the configuration file (default `custom/conf/app.ini`).
-w, --work-path PATH
Gitea's base working directory.
-C, --custom-path PATH
Path to the custom folder.
--port PORT
Server port (web command).
-v, --version
Show version information.
-h, --help
Display help information.

CONFIGURATION

/etc/gitea/app.ini

Main configuration file controlling server settings, database, authentication, and repository defaults.

INSTALL

sudo pacman -S gitea
copy
sudo apk add gitea
copy
brew install gitea
copy
nix profile install nixpkgs#gitea
copy

CAVEATS

Requires configuration for production. Database setup needed. Reverse proxy recommended.

HISTORY

Gitea was forked from Gogs in 2016, becoming a community-driven project with active development and broader feature set.

SEE ALSO

git(1), gitlab-runner(1), gitlab(1)

RESOURCES

Copied to clipboard
Kai