461 lines
12 KiB
INI
461 lines
12 KiB
INI
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
;; General Settings
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
;; App name that shows in every page title
|
|
APP_NAME = Gitea: Git with a cup of tea
|
|
;;
|
|
;; The user Gitea runs as
|
|
RUN_USER = git
|
|
;;
|
|
;; Application run mode: "dev" or "prod"
|
|
RUN_MODE = prod
|
|
;;
|
|
;; The working directory
|
|
WORK_PATH = /var/lib/gitea
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
[server]
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
;; Protocol: "http", "https", "http+unix", "fcgi" or "fcgi+unix"
|
|
PROTOCOL = http
|
|
;;
|
|
;; Domain name for the server
|
|
DOMAIN = localhost
|
|
;;
|
|
;; Public URL used in links, set this to your real URL when using a reverse proxy
|
|
ROOT_URL = http://localhost:3000/
|
|
;;
|
|
;; Local (DMZ) URL for Gitea workers (such as SSH update)
|
|
;;LOCAL_ROOT_URL = https://gitea.example.com
|
|
;;
|
|
;; Default path for App data
|
|
;APP_DATA_PATH = data
|
|
;;
|
|
;; Listen address
|
|
;HTTP_ADDR = 0.0.0.0
|
|
;;
|
|
;; Listen port
|
|
HTTP_PORT = 3000
|
|
;;
|
|
;; Disable SSH feature
|
|
;DISABLE_SSH = false
|
|
;;
|
|
;; Whether to use the builtin SSH server or not
|
|
START_SSH_SERVER = false
|
|
;;
|
|
;; Username for the builtin SSH server (defaults to RUN_USER)
|
|
;BUILTIN_SSH_SERVER_USER = git
|
|
;;
|
|
;; SSH domain name to be exposed in clone URL
|
|
;SSH_DOMAIN = localhost
|
|
;;
|
|
;; SSH port displayed in clone URLs
|
|
SSH_PORT = 22
|
|
;;
|
|
;; The port the builtin SSH server should listen on (defaults to SSH_PORT)
|
|
;SSH_LISTEN_PORT =
|
|
;;
|
|
;; Do not manage authorized_keys (using AuthorizedKeysCommand instead)
|
|
SSH_CREATE_AUTHORIZED_KEYS_FILE = false
|
|
;;
|
|
;; Show SSH clone URL to anonymous visitors
|
|
SSH_EXPOSE_ANONYMOUS = false
|
|
;;
|
|
;; Landing page: "home", "explore", "organizations", "login"
|
|
;LANDING_PAGE = home
|
|
;;
|
|
;; Enable gzip compression
|
|
;ENABLE_GZIP = false
|
|
;;
|
|
;; Enable git-lfs support
|
|
LFS_START_SERVER = true
|
|
;;
|
|
;; LFS authentication secret
|
|
;LFS_JWT_SECRET =
|
|
;;
|
|
;; Offline mode (disable CDN)
|
|
;OFFLINE_MODE = true
|
|
;;
|
|
;; Static resource cache time
|
|
;STATIC_CACHE_TIME = 6h
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
[database]
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
;; Database type: "mysql", "postgres", "mssql" or "sqlite3"
|
|
DB_TYPE = postgres
|
|
;;
|
|
;; Database host (can use socket e.g. /var/run/postgresql/)
|
|
HOST = 127.0.0.1:5432
|
|
;;
|
|
;; Database name
|
|
NAME = gitea
|
|
;;
|
|
;; Database user
|
|
USER = gitea
|
|
;;
|
|
;; Database password (use backticks for special chars: PASSWD = `pass`)
|
|
PASSWD = gitea
|
|
;;
|
|
;; For PostgreSQL: "disable", "require", or "verify-full"
|
|
;SSL_MODE = disable
|
|
;;
|
|
;; Schema for PostgreSQL
|
|
;SCHEMA =
|
|
;;
|
|
;; Database path (for sqlite3 only)
|
|
;PATH =
|
|
;;
|
|
;; Show SQL in logs
|
|
;LOG_SQL = false
|
|
;;
|
|
;; Max idle database connections
|
|
;MAX_IDLE_CONNS = 2
|
|
;;
|
|
;; Max open database connections (0 = unlimited)
|
|
;MAX_OPEN_CONNS = 0
|
|
;;
|
|
;; Connection max lifetime
|
|
;CONN_MAX_LIFETIME = 3s
|
|
;;
|
|
;; Auto run database migrations
|
|
;AUTO_MIGRATION = true
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
[security]
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
;; Disable the installer after first setup
|
|
;INSTALL_LOCK = false
|
|
;;
|
|
;; Global secret key (VERY IMPORTANT - do not lose!)
|
|
;SECRET_KEY =
|
|
;; Or use a file:
|
|
;SECRET_KEY_URI = file:/etc/gitea/secret_key
|
|
;;
|
|
;; Internal communication token
|
|
;INTERNAL_TOKEN =
|
|
;; Or use a file:
|
|
;INTERNAL_TOKEN_URI = file:/etc/gitea/internal_token
|
|
;;
|
|
;; Minimum password length
|
|
;MIN_PASSWORD_LENGTH = 8
|
|
;;
|
|
;; Password complexity: "lower,upper,digit,spec" or "off"
|
|
;PASSWORD_COMPLEXITY = off
|
|
;;
|
|
;; Password hash algorithm: "argon2", "pbkdf2", "scrypt" or "bcrypt"
|
|
;PASSWORD_HASH_ALGO = pbkdf2
|
|
;;
|
|
;; Disable custom git hooks (security: allows arbitrary code execution)
|
|
;DISABLE_GIT_HOOKS = true
|
|
;;
|
|
;; Reverse proxy auth headers (for SSO setups)
|
|
;REVERSE_PROXY_AUTHENTICATION_USER = X-WEBAUTH-USER
|
|
;REVERSE_PROXY_AUTHENTICATION_EMAIL = X-WEBAUTH-EMAIL
|
|
;REVERSE_PROXY_LIMIT = 1
|
|
;REVERSE_PROXY_TRUSTED_PROXIES = 127.0.0.0/8,::1/128
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
[oauth2]
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
;; Enable OAuth2 provider
|
|
;ENABLED = true
|
|
;;
|
|
;; JWT signing algorithm: HS256, RS256, ES256, EdDSA, etc.
|
|
;JWT_SIGNING_ALGORITHM = RS256
|
|
;;
|
|
;; OAuth2 JWT secret (for HS256/HS384/HS512)
|
|
;JWT_SECRET =
|
|
;;
|
|
;; OAuth2 access token lifetime (seconds)
|
|
;ACCESS_TOKEN_EXPIRATION_TIME = 3600
|
|
;;
|
|
;; OAuth2 refresh token lifetime (hours)
|
|
;REFRESH_TOKEN_EXPIRATION_TIME = 730
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
[service]
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
;; Require email confirmation for new registrations
|
|
;REGISTER_EMAIL_CONFIRM = false
|
|
;;
|
|
;; Disable self-registration (admin creates accounts only)
|
|
DISABLE_REGISTRATION = true
|
|
;;
|
|
;; Require sign-in to view anything
|
|
;; Set to "expensive" to block anonymous crawlers from code pages
|
|
;REQUIRE_SIGNIN_VIEW = false
|
|
;;
|
|
;; Enable mail notifications
|
|
;ENABLE_NOTIFY_MAIL = false
|
|
;;
|
|
;; Enable basic auth with password (disable to force OAuth2/tokens only)
|
|
;ENABLE_BASIC_AUTHENTICATION = true
|
|
;;
|
|
;; Allow registration only using third-party services
|
|
;ALLOW_ONLY_EXTERNAL_REGISTRATION = false
|
|
;;
|
|
;; Enable captcha validation for registration
|
|
;ENABLE_CAPTCHA = false
|
|
;;
|
|
;; Enable heatmap on users profiles
|
|
;ENABLE_USER_HEATMAP = true
|
|
;;
|
|
;; Default value for KeepEmailPrivate
|
|
;DEFAULT_KEEP_EMAIL_PRIVATE = false
|
|
;;
|
|
;; Default value for AllowCreateOrganization
|
|
;DEFAULT_ALLOW_CREATE_ORGANIZATION = true
|
|
;;
|
|
;; Default value for EnableTimetracking
|
|
;DEFAULT_ENABLE_TIMETRACKING = true
|
|
;;
|
|
;; Default visibility for new organizations: "public", "limited", "private"
|
|
;DEFAULT_ORG_VISIBILITY = public
|
|
;;
|
|
;; No-reply mail address
|
|
;NO_REPLY_ADDRESS = noreply.localhost
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
[log]
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
;; Log root path
|
|
ROOT_PATH = log
|
|
;;
|
|
;; Log mode: "console", "file" or "conn" (comma-separated for multiple)
|
|
MODE = console
|
|
;;
|
|
;; Log level: "Trace", "Debug", "Info", "Warn", "Error", "None"
|
|
LEVEL = Info
|
|
;;
|
|
;; Enable SSH request logging
|
|
;ENABLE_SSH_LOG = false
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
[mailer]
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
;; Enable mail sending
|
|
ENABLED = false
|
|
;;
|
|
;; Mail protocol: "smtp", "smtps", "smtp+starttls", "smtp+unix", "sendmail", "dummy"
|
|
;PROTOCOL = smtp
|
|
;;
|
|
;; SMTP server address (hostname only, without port)
|
|
;SMTP_ADDR = localhost
|
|
;;
|
|
;; SMTP server port (25, 465, 587)
|
|
;SMTP_PORT = 25
|
|
;;
|
|
;; Mail from address
|
|
;FROM = gitea@localhost
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
[cache]
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
;; Cache adapter: "memory", "redis", "redis-cluster", "twoqueue", "memcache"
|
|
;ADAPTER = memory
|
|
;;
|
|
;; Cache interval (seconds), for memory cache only
|
|
;INTERVAL = 60
|
|
;;
|
|
;; Cache connection string (for redis/memcache)
|
|
;HOST =
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
[session]
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
;; Session provider: "memory", "file", "redis", "redis-cluster", "db", "mysql", "couchbase", "memcache", "postgres"
|
|
PROVIDER = file
|
|
;;
|
|
;; Provider config (file path for "file", connection string for redis/db)
|
|
;PROVIDER_CONFIG = data/sessions
|
|
;;
|
|
;; Session cookie name
|
|
;COOKIE_NAME = i_like_gitea
|
|
;;
|
|
;; Session GC interval (seconds)
|
|
;GC_INTERVAL_TIME = 86400
|
|
;;
|
|
;; Session life time (seconds)
|
|
;SESSION_LIFE_TIME = 86400
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
[picture]
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
;; Path for uploaded avatars
|
|
;AVATAR_UPLOAD_PATH = data/avatars
|
|
;;
|
|
;; Path for repository avatars
|
|
;REPOSITORY_AVATAR_UPLOAD_PATH = data/repo-avatars
|
|
;;
|
|
;; Gravatar source: gravatar, libravatar or a custom URL
|
|
;GRAVATAR_SOURCE = gravatar
|
|
;;
|
|
;; Disable Gravatar/Libravatar
|
|
;DISABLE_GRAVATAR = true
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
[attachment]
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
;; Enable attachments
|
|
;ENABLED = true
|
|
;;
|
|
;; Path for attachments
|
|
;PATH = data/attachments
|
|
;;
|
|
;; Max attachment size (MB)
|
|
;MAX_SIZE = 256
|
|
;;
|
|
;; Max number of attachments per upload
|
|
;MAX_FILES = 10
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
[indexer]
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
;; Issue indexer type: "bleve", "db", "elasticsearch", "meilisearch"
|
|
;ISSUE_INDEXER_TYPE = bleve
|
|
;;
|
|
;; Code indexer enabled
|
|
;REPO_INDEXER_ENABLED = false
|
|
;;
|
|
;; Code indexer type: "bleve", "elasticsearch"
|
|
;REPO_INDEXER_TYPE = bleve
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
[repository]
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
;; Root path for storing repositories
|
|
ROOT = data/git/repositories
|
|
;;
|
|
;; Default branch name for new repos
|
|
;DEFAULT_BRANCH = main
|
|
;;
|
|
;; Default private when creating a new repository
|
|
;DEFAULT_PRIVATE = last
|
|
;;
|
|
;; Max creation limit per user (-1 = unlimited)
|
|
;MAX_CREATION_LIMIT = -1
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
[repository.local]
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
;; Local repository copy path for temporary operations
|
|
;LOCAL_COPY_PATH = tmp/local-repo
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
[repository.upload]
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
;; Temp path for uploads
|
|
;TEMP_PATH = data/tmp/uploads
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
[repository.pull-request]
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
;; Default merge style: "merge", "rebase", "rebase-merge", "squash", "fast-forward-only"
|
|
;DEFAULT_MERGE_STYLE = merge
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
[repository.signing]
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
;; Default trust model: "collaborator", "committer", "collaboratorcommitter"
|
|
;DEFAULT_TRUST_MODEL = committer
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
[lfs]
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
;; LFS storage path
|
|
PATH = data/git/lfs
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
[webhook]
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
;; Allowed hosts for webhooks (CIDR list, empty = allow all)
|
|
;ALLOWED_HOST_LIST = external
|
|
;;
|
|
;; Queue length
|
|
;QUEUE_LENGTH = 1000
|
|
;;
|
|
;; Deliver timeout (seconds)
|
|
;DELIVER_TIMEOUT = 5
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
[api]
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
;; Enable Swagger UI
|
|
;ENABLE_SWAGGER = true
|
|
;;
|
|
;; Max items per page in API responses
|
|
;MAX_RESPONSE_ITEMS = 50
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
[openid]
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
;; Enable OpenID sign-in
|
|
ENABLE_OPENID_SIGNIN = false
|
|
;;
|
|
;; Enable OpenID sign-up
|
|
ENABLE_OPENID_SIGNUP = false
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
[actions]
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
;; Enable Gitea Actions (CI/CD)
|
|
;ENABLED = true
|
|
;;
|
|
;; Default platform for action plugins: "github" for https://github.com, "self" for current Gitea instance
|
|
DEFAULT_ACTIONS_URL = github
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
[packages]
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
;; Enable package registry
|
|
;ENABLED = true
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
[mirror]
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
;; Enable repository mirroring
|
|
;ENABLED = true
|
|
;;
|
|
;; Minimum mirror interval (e.g. "1h", "10m")
|
|
;MIN_INTERVAL = 10m
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
[metrics]
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
;; Enable Prometheus metrics endpoint (/metrics)
|
|
;ENABLED = false
|
|
;;
|
|
;; Require token for metrics endpoint
|
|
;TOKEN =
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
[cron]
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
;; Enable cron tasks
|
|
;ENABLED = true
|
|
;;
|
|
;; Run cron tasks at start
|
|
;RUN_AT_START = false
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
[cron.update_checker]
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
;; Enable update checker
|
|
;ENABLED = false
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
[git]
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
;; The HOME directory for Git, contains .gitconfig and possible .gnupg directories
|
|
;HOME_PATH = home
|
|
;;
|
|
;; Max lines in diff view
|
|
;MAX_GIT_DIFF_LINES = 1000
|
|
;;
|
|
;; Max files in diff view
|
|
;MAX_GIT_DIFF_FILES = 100
|
|
;;
|
|
;; Default commits range size
|
|
;COMMITS_RANGE_SIZE = 50
|