Overview
Gitea is configured through theapp.ini file located in custom/conf/app.ini. You can also use environment variables to override configuration values.
Configuration File Location
The configuration file path is determined by the following hierarchy:--configflag passed to the binary- Built-in value set at build time
- Default:
{CustomPath}/conf/app.ini
General Settings
Application Settings
Application name shown in page titles
Operating system user that runs Gitea. Automatically detected if not set.
Application run mode:
dev or prod. Dev mode provides easier debugging.Working directory for Gitea. Defaults to the directory containing the binary.
Server Configuration
All server settings are configured in the[server] section.
Protocol and Domain
Protocol the server listens on:
http, https, http+unix, fcgi, or fcgi+unixDomain name of the server
Public URL of the Gitea instance. Defaults to
{PROTOCOL}://{DOMAIN}:{HTTP_PORT}/HTTP listen address. Can be an IPv4/IPv6 address or Unix socket path.
HTTP listen port
SSH Configuration
Disable SSH feature when not available
Use built-in SSH server instead of system SSH
Domain name exposed in clone URLs. Defaults to DOMAIN or ROOT_URL domain.
SSH port exposed in clone URLs
Port the built-in SSH server listens on. Defaults to SSH_PORT.
TLS Configuration
Enable automatic TLS certificate generation via ACME (Let’s Encrypt)
Path to TLS certificate file (manual TLS only)
Path to TLS key file (manual TLS only)
Storage Configuration
Default path for storing application data
Root directory containing templates and static files
LFS Configuration
Enable Git LFS support
LFS authentication secret. Change this to a random value.
LFS authentication validity period
Maximum allowed LFS file size in bytes (0 = no limit)
Security Configuration
All security settings are in the[security] section.
Disable the web installer. Set to true after installation.
Global secret key for encryption. CRITICAL: Do not lose this key.
Secret for internal API communication between Gitea components
Password hashing algorithm:
pbkdf2, argon2, scrypt, bcryptAdmin Settings
Configure admin-specific behavior in the[admin] section.
Prevent non-admin users from creating organizations
Default email notification preference for new users
Comma-separated list of disabled features for all users:
deletion- Account deletionmanage_ssh_keys- SSH key managementmanage_gpg_keys- GPG key managementmanage_mfa- Multi-factor authenticationmanage_credentials- Access token managementchange_username- Username changeschange_full_name- Full name changes
Additional disabled features for external authentication users (LDAP, OAuth2, etc.)
Environment Variables
You can override any configuration value using environment variables with the format:Examples
Viewing Configuration
To view the current configuration, use:Configuration Validation
After modifyingapp.ini, validate your configuration:
Best Practices
Minimal Configuration
Only set values that differ from defaults. Smaller config files are easier to maintain.