You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

app.example.ini 51KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214
  1. ; This file lists the default values used by Gitea
  2. ; Copy required sections to your own app.ini (default is custom/conf/app.ini)
  3. ; and modify as needed.
  4. ; see https://docs.gitea.io/en-us/config-cheat-sheet/ for additional documentation.
  5. ; App name that shows in every page title
  6. APP_NAME = Gitea: Git with a cup of tea
  7. ; Change it if you run locally
  8. RUN_USER = git
  9. ; Either "dev", "prod" or "test", default is "dev"
  10. RUN_MODE = dev
  11. [project]
  12. ; Default templates for project boards
  13. PROJECT_BOARD_BASIC_KANBAN_TYPE = To Do, In Progress, Done
  14. PROJECT_BOARD_BUG_TRIAGE_TYPE = Needs Triage, High Priority, Low Priority, Closed
  15. [repository]
  16. ROOT =
  17. SCRIPT_TYPE = bash
  18. ; DETECTED_CHARSETS_ORDER tie-break order for detected charsets.
  19. ; If the charsets have equal confidence, tie-breaking will be done by order in this list
  20. ; with charsets earlier in the list chosen in preference to those later.
  21. ; Adding "defaults" will place the unused charsets at that position.
  22. DETECTED_CHARSETS_ORDER=UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, UTF-32LE, ISO-8859, windows-1252, ISO-8859, windows-1250, ISO-8859, ISO-8859, ISO-8859, windows-1253, ISO-8859, windows-1255, ISO-8859, windows-1251, windows-1256, KOI8-R, ISO-8859, windows-1254, Shift_JIS, GB18030, EUC-JP, EUC-KR, Big5, ISO-2022, ISO-2022, ISO-2022, IBM424_rtl, IBM424_ltr, IBM420_rtl, IBM420_ltr
  23. ; Default ANSI charset to override non-UTF-8 charsets to
  24. ANSI_CHARSET =
  25. ; Force every new repository to be private
  26. FORCE_PRIVATE = false
  27. ; Default privacy setting when creating a new repository, allowed values: last, private, public. Default is last which means the last setting used.
  28. DEFAULT_PRIVATE = last
  29. ; Default private when using push-to-create
  30. DEFAULT_PUSH_CREATE_PRIVATE = true
  31. ; Global limit of repositories per user, applied at creation time. -1 means no limit
  32. MAX_CREATION_LIMIT = -1
  33. ; Mirror sync queue length, increase if mirror syncing starts hanging
  34. MIRROR_QUEUE_LENGTH = 1000
  35. ; Patch test queue length, increase if pull request patch testing starts hanging
  36. PULL_REQUEST_QUEUE_LENGTH = 1000
  37. ; Preferred Licenses to place at the top of the List
  38. ; The name here must match the filename in conf/license or custom/conf/license
  39. PREFERRED_LICENSES = Apache License 2.0,MIT License
  40. ; Disable the ability to interact with repositories using the HTTP protocol
  41. DISABLE_HTTP_GIT = false
  42. ; Value for Access-Control-Allow-Origin header, default is not to present
  43. ; WARNING: This maybe harmful to you website if you do not give it a right value.
  44. ACCESS_CONTROL_ALLOW_ORIGIN =
  45. ; Force ssh:// clone url instead of scp-style uri when default SSH port is used
  46. USE_COMPAT_SSH_URI = false
  47. ; Close issues as long as a commit on any branch marks it as fixed
  48. DEFAULT_CLOSE_ISSUES_VIA_COMMITS_IN_ANY_BRANCH = false
  49. ; Allow users to push local repositories to Gitea and have them automatically created for a user or an org
  50. ENABLE_PUSH_CREATE_USER = false
  51. ENABLE_PUSH_CREATE_ORG = false
  52. ; Comma separated list of globally disabled repo units. Allowed values: repo.issues, repo.ext_issues, repo.pulls, repo.wiki, repo.ext_wiki
  53. DISABLED_REPO_UNITS =
  54. ; Comma separated list of default repo units. Allowed values: repo.code, repo.releases, repo.issues, repo.pulls, repo.wiki, repo.projects.
  55. ; Note: Code and Releases can currently not be deactivated. If you specify default repo units you should still list them for future compatibility.
  56. ; External wiki and issue tracker can't be enabled by default as it requires additional settings.
  57. ; Disabled repo units will not be added to new repositories regardless if it is in the default list.
  58. DEFAULT_REPO_UNITS = repo.code,repo.releases,repo.issues,repo.pulls,repo.wiki,repo.projects
  59. ; Prefix archive files by placing them in a directory named after the repository
  60. PREFIX_ARCHIVE_FILES = true
  61. ; Disable the creation of new mirrors. Pre-existing mirrors remain valid.
  62. DISABLE_MIRRORS = false
  63. ; The default branch name of new repositories
  64. DEFAULT_BRANCH=master
  65. ; Allow adoption of unadopted repositories
  66. ALLOW_ADOPTION_OF_UNADOPTED_REPOSITORIES=false
  67. ; Allow deletion of unadopted repositories
  68. ALLOW_DELETION_OF_UNADOPTED_REPOSITORIES=false
  69. [repository.editor]
  70. ; List of file extensions for which lines should be wrapped in the Monaco editor
  71. ; Separate extensions with a comma. To line wrap files without an extension, just put a comma
  72. LINE_WRAP_EXTENSIONS = .txt,.md,.markdown,.mdown,.mkd,
  73. ; Valid file modes that have a preview API associated with them, such as api/v1/markdown
  74. ; Separate the values by commas. The preview tab in edit mode won't be displayed if the file extension doesn't match
  75. PREVIEWABLE_FILE_MODES = markdown
  76. [repository.local]
  77. ; Path for local repository copy. Defaults to `tmp/local-repo`
  78. LOCAL_COPY_PATH = tmp/local-repo
  79. [repository.upload]
  80. ; Whether repository file uploads are enabled. Defaults to `true`
  81. ENABLED = true
  82. ; Path for uploads. Defaults to `data/tmp/uploads` (tmp gets deleted on gitea restart)
  83. TEMP_PATH = data/tmp/uploads
  84. ; Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types.
  85. ALLOWED_TYPES =
  86. ; Max size of each file in megabytes. Defaults to 3MB
  87. FILE_MAX_SIZE = 3
  88. ; Max number of files per upload. Defaults to 5
  89. MAX_FILES = 5
  90. [repository.pull-request]
  91. ; List of prefixes used in Pull Request title to mark them as Work In Progress
  92. WORK_IN_PROGRESS_PREFIXES=WIP:,[WIP]
  93. ; List of keywords used in Pull Request comments to automatically close a related issue
  94. CLOSE_KEYWORDS=close,closes,closed,fix,fixes,fixed,resolve,resolves,resolved
  95. ; List of keywords used in Pull Request comments to automatically reopen a related issue
  96. REOPEN_KEYWORDS=reopen,reopens,reopened
  97. ; In the default merge message for squash commits include at most this many commits
  98. DEFAULT_MERGE_MESSAGE_COMMITS_LIMIT=50
  99. ; In the default merge message for squash commits limit the size of the commit messages to this
  100. DEFAULT_MERGE_MESSAGE_SIZE=5120
  101. ; In the default merge message for squash commits walk all commits to include all authors in the Co-authored-by otherwise just use those in the limited list
  102. DEFAULT_MERGE_MESSAGE_ALL_AUTHORS=false
  103. ; In default merge messages limit the number of approvers listed as Reviewed-by: to this many
  104. DEFAULT_MERGE_MESSAGE_MAX_APPROVERS=10
  105. ; In default merge messages only include approvers who are official
  106. DEFAULT_MERGE_MESSAGE_OFFICIAL_APPROVERS_ONLY=true
  107. [repository.issue]
  108. ; List of reasons why a Pull Request or Issue can be locked
  109. LOCK_REASONS=Too heated,Off-topic,Resolved,Spam
  110. [repository.release]
  111. ; Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types.
  112. ALLOWED_TYPES =
  113. [repository.signing]
  114. ; GPG key to use to sign commits, Defaults to the default - that is the value of git config --get user.signingkey
  115. ; run in the context of the RUN_USER
  116. ; Switch to none to stop signing completely
  117. SIGNING_KEY = default
  118. ; If a SIGNING_KEY ID is provided and is not set to default, use the provided Name and Email address as the signer.
  119. ; These should match a publicized name and email address for the key. (When SIGNING_KEY is default these are set to
  120. ; the results of git config --get user.name and git config --get user.email respectively and can only be overrided
  121. ; by setting the SIGNING_KEY ID to the correct ID.)
  122. SIGNING_NAME =
  123. SIGNING_EMAIL =
  124. ; Sets the default trust model for repositories. Options are: collaborator, committer, collaboratorcommitter
  125. DEFAULT_TRUST_MODEL=collaborator
  126. ; Determines when gitea should sign the initial commit when creating a repository
  127. ; Either:
  128. ; - never
  129. ; - pubkey: only sign if the user has a pubkey
  130. ; - twofa: only sign if the user has logged in with twofa
  131. ; - always
  132. ; options other than none and always can be combined as comma separated list
  133. INITIAL_COMMIT = always
  134. ; Determines when to sign for CRUD actions
  135. ; - as above
  136. ; - parentsigned: requires that the parent commit is signed.
  137. CRUD_ACTIONS = pubkey, twofa, parentsigned
  138. ; Determines when to sign Wiki commits
  139. ; - as above
  140. WIKI = never
  141. ; Determines when to sign on merges
  142. ; - basesigned: require that the parent of commit on the base repo is signed.
  143. ; - commitssigned: require that all the commits in the head branch are signed.
  144. ; - approved: only sign when merging an approved pr to a protected branch
  145. MERGES = pubkey, twofa, basesigned, commitssigned
  146. [cors]
  147. ; More information about CORS can be found here: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#The_HTTP_response_headers
  148. ; enable cors headers (disabled by default)
  149. ENABLED=false
  150. ; scheme of allowed requests
  151. SCHEME=http
  152. ; list of requesting domains that are allowed
  153. ALLOW_DOMAIN=*
  154. ; allow subdomains of headers listed above to request
  155. ALLOW_SUBDOMAIN=false
  156. ; list of methods allowed to request
  157. METHODS=GET,HEAD,POST,PUT,PATCH,DELETE,OPTIONS
  158. ; max time to cache response
  159. MAX_AGE=10m
  160. ; allow request with credentials
  161. ALLOW_CREDENTIALS=false
  162. [ui]
  163. ; Number of repositories that are displayed on one explore page
  164. EXPLORE_PAGING_NUM = 20
  165. ; Number of issues that are displayed on one page
  166. ISSUE_PAGING_NUM = 10
  167. ; Number of maximum commits displayed in one activity feed
  168. FEED_MAX_COMMIT_NUM = 5
  169. ; Number of items that are displayed in home feed
  170. FEED_PAGING_NUM = 20
  171. ; Number of maximum commits displayed in commit graph.
  172. GRAPH_MAX_COMMIT_NUM = 100
  173. ; Number of line of codes shown for a code comment
  174. CODE_COMMENT_LINES = 4
  175. ; Value of `theme-color` meta tag, used by Android >= 5.0
  176. ; An invalid color like "none" or "disable" will have the default style
  177. ; More info: https://developers.google.com/web/updates/2014/11/Support-for-theme-color-in-Chrome-39-for-Android
  178. THEME_COLOR_META_TAG = `#6cc644`
  179. ; Max size of files to be displayed (default is 8MiB)
  180. MAX_DISPLAY_FILE_SIZE = 8388608
  181. ; Whether the email of the user should be shown in the Explore Users page
  182. SHOW_USER_EMAIL = true
  183. ; Set the default theme for the Gitea install
  184. DEFAULT_THEME = gitea
  185. ; All available themes. Allow users select personalized themes regardless of the value of `DEFAULT_THEME`.
  186. THEMES = gitea,arc-green
  187. ;All available reactions users can choose on issues/prs and comments.
  188. ;Values can be emoji alias (:smile:) or a unicode emoji.
  189. ;For custom reactions, add a tightly cropped square image to public/emoji/img/reaction_name.png
  190. REACTIONS = +1, -1, laugh, hooray, confused, heart, rocket, eyes
  191. ; Whether the full name of the users should be shown where possible. If the full name isn't set, the username will be used.
  192. DEFAULT_SHOW_FULL_NAME = false
  193. ; Whether to search within description at repository search on explore page.
  194. SEARCH_REPO_DESCRIPTION = true
  195. ; Whether to enable a Service Worker to cache frontend assets
  196. USE_SERVICE_WORKER = true
  197. [ui.admin]
  198. ; Number of users that are displayed on one page
  199. USER_PAGING_NUM = 50
  200. ; Number of repos that are displayed on one page
  201. REPO_PAGING_NUM = 50
  202. ; Number of notices that are displayed on one page
  203. NOTICE_PAGING_NUM = 25
  204. ; Number of organizations that are displayed on one page
  205. ORG_PAGING_NUM = 50
  206. [ui.user]
  207. ; Number of repos that are displayed on one page
  208. REPO_PAGING_NUM = 15
  209. [ui.meta]
  210. AUTHOR = Gitea - Git with a cup of tea
  211. DESCRIPTION = Gitea (Git with a cup of tea) is a painless self-hosted Git service written in Go
  212. KEYWORDS = go,git,self-hosted,gitea
  213. [ui.notification]
  214. ; Control how often the notification endpoint is polled to update the notification
  215. ; The timeout will increase to MAX_TIMEOUT in TIMEOUT_STEPs if the notification count is unchanged
  216. ; Set MIN_TIMEOUT to 0 to turn off
  217. MIN_TIMEOUT = 10s
  218. MAX_TIMEOUT = 60s
  219. TIMEOUT_STEP = 10s
  220. ; This setting determines how often the db is queried to get the latest notification counts.
  221. ; If the browser client supports EventSource and SharedWorker, a SharedWorker will be used in preference to polling notification. Set to -1 to disable the EventSource
  222. EVENT_SOURCE_UPDATE_TIME = 10s
  223. [markdown]
  224. ; Render soft line breaks as hard line breaks, which means a single newline character between
  225. ; paragraphs will cause a line break and adding trailing whitespace to paragraphs is not
  226. ; necessary to force a line break.
  227. ; Render soft line breaks as hard line breaks for comments
  228. ENABLE_HARD_LINE_BREAK_IN_COMMENTS = true
  229. ; Render soft line breaks as hard line breaks for markdown documents
  230. ENABLE_HARD_LINE_BREAK_IN_DOCUMENTS = false
  231. ; Comma separated list of custom URL-Schemes that are allowed as links when rendering Markdown
  232. ; for example git,magnet,ftp (more at https://en.wikipedia.org/wiki/List_of_URI_schemes)
  233. ; URLs starting with http and https are always displayed, whatever is put in this entry.
  234. CUSTOM_URL_SCHEMES =
  235. ; List of file extensions that should be rendered/edited as Markdown
  236. ; Separate the extensions with a comma. To render files without any extension as markdown, just put a comma
  237. FILE_EXTENSIONS = .md,.markdown,.mdown,.mkd
  238. [server]
  239. ; The protocol the server listens on. One of 'http', 'https', 'unix' or 'fcgi'.
  240. PROTOCOL = http
  241. DOMAIN = localhost
  242. ROOT_URL = %(PROTOCOL)s://%(DOMAIN)s:%(HTTP_PORT)s/
  243. ; when STATIC_URL_PREFIX is empty it will follow ROOT_URL
  244. STATIC_URL_PREFIX =
  245. ; The address to listen on. Either a IPv4/IPv6 address or the path to a unix socket.
  246. HTTP_ADDR = 0.0.0.0
  247. ; The port to listen on. Leave empty when using a unix socket.
  248. HTTP_PORT = 3000
  249. ; If REDIRECT_OTHER_PORT is true, and PROTOCOL is set to https an http server
  250. ; will be started on PORT_TO_REDIRECT and it will redirect plain, non-secure http requests to the main
  251. ; ROOT_URL. Defaults are false for REDIRECT_OTHER_PORT and 80 for
  252. ; PORT_TO_REDIRECT.
  253. REDIRECT_OTHER_PORT = false
  254. PORT_TO_REDIRECT = 80
  255. ; Permission for unix socket
  256. UNIX_SOCKET_PERMISSION = 666
  257. ; Local (DMZ) URL for Gitea workers (such as SSH update) accessing web service.
  258. ; In most cases you do not need to change the default value.
  259. ; Alter it only if your SSH server node is not the same as HTTP node.
  260. ; Do not set this variable if PROTOCOL is set to 'unix'.
  261. LOCAL_ROOT_URL = %(PROTOCOL)s://%(HTTP_ADDR)s:%(HTTP_PORT)s/
  262. ; Disable SSH feature when not available
  263. DISABLE_SSH = false
  264. ; Whether to use the builtin SSH server or not.
  265. START_SSH_SERVER = false
  266. ; Username to use for the builtin SSH server. If blank, then it is the value of RUN_USER.
  267. BUILTIN_SSH_SERVER_USER =
  268. ; Domain name to be exposed in clone URL
  269. SSH_DOMAIN = %(DOMAIN)s
  270. ; The network interface the builtin SSH server should listen on
  271. SSH_LISTEN_HOST =
  272. ; Port number to be exposed in clone URL
  273. SSH_PORT = 22
  274. ; The port number the builtin SSH server should listen on
  275. SSH_LISTEN_PORT = %(SSH_PORT)s
  276. ; Root path of SSH directory, default is '~/.ssh', but you have to use '/home/git/.ssh'.
  277. SSH_ROOT_PATH =
  278. ; Gitea will create a authorized_keys file by default when it is not using the internal ssh server
  279. ; If you intend to use the AuthorizedKeysCommand functionality then you should turn this off.
  280. SSH_CREATE_AUTHORIZED_KEYS_FILE = true
  281. ; Gitea will create a authorized_principals file by default when it is not using the internal ssh server
  282. ; If you intend to use the AuthorizedPrincipalsCommand functionality then you should turn this off.
  283. SSH_CREATE_AUTHORIZED_PRINCIPALS_FILE = true
  284. ; For the built-in SSH server, choose the ciphers to support for SSH connections,
  285. ; for system SSH this setting has no effect
  286. SSH_SERVER_CIPHERS = aes128-ctr, aes192-ctr, aes256-ctr, aes128-gcm@openssh.com, arcfour256, arcfour128
  287. ; For the built-in SSH server, choose the key exchange algorithms to support for SSH connections,
  288. ; for system SSH this setting has no effect
  289. SSH_SERVER_KEY_EXCHANGES = diffie-hellman-group1-sha1, diffie-hellman-group14-sha1, ecdh-sha2-nistp256, ecdh-sha2-nistp384, ecdh-sha2-nistp521, curve25519-sha256@libssh.org
  290. ; For the built-in SSH server, choose the MACs to support for SSH connections,
  291. ; for system SSH this setting has no effect
  292. SSH_SERVER_MACS = hmac-sha2-256-etm@openssh.com, hmac-sha2-256, hmac-sha1, hmac-sha1-96
  293. ; Directory to create temporary files in when testing public keys using ssh-keygen,
  294. ; default is the system temporary directory.
  295. SSH_KEY_TEST_PATH =
  296. ; Path to ssh-keygen, default is 'ssh-keygen' which means the shell is responsible for finding out which one to call.
  297. SSH_KEYGEN_PATH = ssh-keygen
  298. ; Enable SSH Authorized Key Backup when rewriting all keys, default is true
  299. SSH_AUTHORIZED_KEYS_BACKUP = true
  300. ; Determines which principals to allow
  301. ; - empty: if SSH_TRUSTED_USER_CA_KEYS is empty this will default to off, otherwise will default to email, username.
  302. ; - off: Do not allow authorized principals
  303. ; - email: the principal must match the user's email
  304. ; - username: the principal must match the user's username
  305. ; - anything: there will be no checking on the content of the principal
  306. SSH_AUTHORIZED_PRINCIPALS_ALLOW = email, username
  307. ; Enable SSH Authorized Principals Backup when rewriting all keys, default is true
  308. SSH_AUTHORIZED_PRINCIPALS_BACKUP = true
  309. ; Specifies the public keys of certificate authorities that are trusted to sign user certificates for authentication.
  310. ; Multiple keys should be comma separated.
  311. ; E.g."ssh-<algorithm> <key>". or "ssh-<algorithm> <key1>, ssh-<algorithm> <key2>".
  312. ; For more information see "TrustedUserCAKeys" in the sshd config manpages.
  313. SSH_TRUSTED_USER_CA_KEYS =
  314. ; Absolute path of the `TrustedUserCaKeys` file gitea will manage.
  315. ; Default this `RUN_USER`/.ssh/gitea-trusted-user-ca-keys.pem
  316. ; If you're running your own ssh server and you want to use the gitea managed file you'll also need to modify your
  317. ; sshd_config to point to this file. The official docker image will automatically work without further configuration.
  318. SSH_TRUSTED_USER_CA_KEYS_FILENAME =
  319. ; Enable exposure of SSH clone URL to anonymous visitors, default is false
  320. SSH_EXPOSE_ANONYMOUS = false
  321. ; Indicate whether to check minimum key size with corresponding type
  322. MINIMUM_KEY_SIZE_CHECK = false
  323. ; Disable CDN even in "prod" mode
  324. OFFLINE_MODE = false
  325. DISABLE_ROUTER_LOG = false
  326. ; Generate steps:
  327. ; $ ./gitea cert -ca=true -duration=8760h0m0s -host=myhost.example.com
  328. ;
  329. ; Or from a .pfx file exported from the Windows certificate store (do
  330. ; not forget to export the private key):
  331. ; $ openssl pkcs12 -in cert.pfx -out cert.pem -nokeys
  332. ; $ openssl pkcs12 -in cert.pfx -out key.pem -nocerts -nodes
  333. ; Paths are relative to CUSTOM_PATH
  334. CERT_FILE = https/cert.pem
  335. KEY_FILE = https/key.pem
  336. ; Root directory containing templates and static files.
  337. ; default is the path where Gitea is executed
  338. STATIC_ROOT_PATH =
  339. ; Default path for App data
  340. APP_DATA_PATH = data
  341. ; Application level GZIP support
  342. ENABLE_GZIP = false
  343. ; Application profiling (memory and cpu)
  344. ; For "web" command it listens on localhost:6060
  345. ; For "serve" command it dumps to disk at PPROF_DATA_PATH as (cpuprofile|memprofile)_<username>_<temporary id>
  346. ENABLE_PPROF = false
  347. ; PPROF_DATA_PATH, use an absolute path when you start gitea as service
  348. PPROF_DATA_PATH = data/tmp/pprof
  349. ; Landing page, can be "home", "explore", "organizations" or "login"
  350. ; The "login" choice is not a security measure but just a UI flow change, use REQUIRE_SIGNIN_VIEW to force users to log in.
  351. LANDING_PAGE = home
  352. ; Enables git-lfs support. true or false, default is false.
  353. LFS_START_SERVER = false
  354. ; Where your lfs files reside, default is data/lfs.
  355. LFS_CONTENT_PATH = data/lfs
  356. ; LFS authentication secret, change this yourself
  357. LFS_JWT_SECRET =
  358. ; LFS authentication validity period (in time.Duration), pushes taking longer than this may fail.
  359. LFS_HTTP_AUTH_EXPIRY = 20m
  360. ; Maximum allowed LFS file size in bytes (Set to 0 for no limit).
  361. LFS_MAX_FILE_SIZE = 0
  362. ; Maximum number of locks returned per page
  363. LFS_LOCKS_PAGING_NUM = 50
  364. ; Allow graceful restarts using SIGHUP to fork
  365. ALLOW_GRACEFUL_RESTARTS = true
  366. ; After a restart the parent will finish ongoing requests before
  367. ; shutting down. Force shutdown if this process takes longer than this delay.
  368. ; set to a negative value to disable
  369. GRACEFUL_HAMMER_TIME = 60s
  370. ; Allows the setting of a startup timeout and waithint for Windows as SVC service
  371. ; 0 disables this.
  372. STARTUP_TIMEOUT = 0
  373. ; Static resources, includes resources on custom/, public/ and all uploaded avatars web browser cache time, default is 6h
  374. STATIC_CACHE_TIME = 6h
  375. ; Define allowed algorithms and their minimum key length (use -1 to disable a type)
  376. [ssh.minimum_key_sizes]
  377. ED25519 = 256
  378. ECDSA = 256
  379. RSA = 2048
  380. DSA = -1 ; set to 1024 to switch on
  381. [database]
  382. ; Database to use. Either "mysql", "postgres", "mssql" or "sqlite3".
  383. DB_TYPE = mysql
  384. HOST = 127.0.0.1:3306
  385. NAME = gitea
  386. USER = root
  387. ; Use PASSWD = `your password` for quoting if you use special characters in the password.
  388. PASSWD =
  389. ; For Postgres, schema to use if different from "public". The schema must exist beforehand,
  390. ; the user must have creation privileges on it, and the user search path must be set
  391. ; to the look into the schema first. e.g.:ALTER USER user SET SEARCH_PATH = schema_name,"$user",public;
  392. SCHEMA =
  393. ; For Postgres, either "disable" (default), "require", or "verify-full"
  394. ; For MySQL, either "false" (default), "true", or "skip-verify"
  395. SSL_MODE = disable
  396. ; For MySQL only, either "utf8" or "utf8mb4", default is "utf8mb4".
  397. ; NOTICE: for "utf8mb4" you must use MySQL InnoDB > 5.6. Gitea is unable to check this.
  398. CHARSET = utf8mb4
  399. ; For "sqlite3" and "tidb", use an absolute path when you start gitea as service
  400. PATH = data/gitea.db
  401. ; For "sqlite3" only. Query timeout
  402. SQLITE_TIMEOUT = 500
  403. ; For iterate buffer, default is 50
  404. ITERATE_BUFFER_SIZE = 50
  405. ; Show the database generated SQL
  406. LOG_SQL = true
  407. ; Maximum number of DB Connect retries
  408. DB_RETRIES = 10
  409. ; Backoff time per DB retry (time.Duration)
  410. DB_RETRY_BACKOFF = 3s
  411. ; Max idle database connections on connnection pool, default is 2
  412. MAX_IDLE_CONNS = 2
  413. ; Database connection max life time, default is 0 or 3s mysql (See #6804 & #7071 for reasoning)
  414. CONN_MAX_LIFETIME = 3s
  415. ; Database maximum number of open connections, default is 0 meaning no maximum
  416. MAX_OPEN_CONNS = 0
  417. [indexer]
  418. ; Issue indexer type, currently support: bleve, db or elasticsearch, default is bleve
  419. ISSUE_INDEXER_TYPE = bleve
  420. ; Issue indexer connection string, available when ISSUE_INDEXER_TYPE is elasticsearch
  421. ISSUE_INDEXER_CONN_STR = http://elastic:changeme@localhost:9200
  422. ; Issue indexer name, available when ISSUE_INDEXER_TYPE is elasticsearch
  423. ISSUE_INDEXER_NAME = gitea_issues
  424. ; Issue indexer storage path, available when ISSUE_INDEXER_TYPE is bleve
  425. ISSUE_INDEXER_PATH = indexers/issues.bleve
  426. ; Issue indexer queue, currently support: channel, levelqueue or redis, default is levelqueue
  427. ISSUE_INDEXER_QUEUE_TYPE = levelqueue
  428. ; When ISSUE_INDEXER_QUEUE_TYPE is levelqueue, this will be the queue will be saved path,
  429. ; default is indexers/issues.queue
  430. ISSUE_INDEXER_QUEUE_DIR = indexers/issues.queue
  431. ; When `ISSUE_INDEXER_QUEUE_TYPE` is `redis`, this will store the redis connection string.
  432. ISSUE_INDEXER_QUEUE_CONN_STR = "addrs=127.0.0.1:6379 db=0"
  433. ; Batch queue number, default is 20
  434. ISSUE_INDEXER_QUEUE_BATCH_NUMBER = 20
  435. ; Timeout the indexer if it takes longer than this to start.
  436. ; Set to zero to disable timeout.
  437. STARTUP_TIMEOUT=30s
  438. ; repo indexer by default disabled, since it uses a lot of disk space
  439. REPO_INDEXER_ENABLED = false
  440. ; Code search engine type, could be `bleve` or `elasticsearch`.
  441. REPO_INDEXER_TYPE = bleve
  442. ; Index file used for code search.
  443. REPO_INDEXER_PATH = indexers/repos.bleve
  444. ; Code indexer connection string, available when `REPO_INDEXER_TYPE` is elasticsearch. i.e. http://elastic:changeme@localhost:9200
  445. REPO_INDEXER_CONN_STR =
  446. ; Code indexer name, available when `REPO_INDEXER_TYPE` is elasticsearch
  447. REPO_INDEXER_NAME = gitea_codes
  448. UPDATE_BUFFER_LEN = 20
  449. MAX_FILE_SIZE = 1048576
  450. ; A comma separated list of glob patterns (see https://github.com/gobwas/glob) to include
  451. ; in the index; default is empty
  452. REPO_INDEXER_INCLUDE =
  453. ; A comma separated list of glob patterns to exclude from the index; ; default is empty
  454. REPO_INDEXER_EXCLUDE =
  455. [queue]
  456. ; Specific queues can be individually configured with [queue.name]. [queue] provides defaults
  457. ;
  458. ; General queue queue type, currently support: persistable-channel, channel, level, redis, dummy
  459. ; default to persistable-channel
  460. TYPE = persistable-channel
  461. ; data-dir for storing persistable queues and level queues, individual queues will be named by their type
  462. DATADIR = queues/
  463. ; Default queue length before a channel queue will block
  464. LENGTH = 20
  465. ; Batch size to send for batched queues
  466. BATCH_LENGTH = 20
  467. ; Connection string for redis queues this will store the redis connection string.
  468. CONN_STR = "addrs=127.0.0.1:6379 db=0"
  469. ; Provides the suffix of the default redis/disk queue name - specific queues can be overriden within in their [queue.name] sections.
  470. QUEUE_NAME = "_queue"
  471. ; Provides the suffix of the default redis/disk unique queue set name - specific queues can be overriden within in their [queue.name] sections.
  472. SET_NAME = "_unique"
  473. ; If the queue cannot be created at startup - level queues may need a timeout at startup - wrap the queue:
  474. WRAP_IF_NECESSARY = true
  475. ; Attempt to create the wrapped queue at max
  476. MAX_ATTEMPTS = 10
  477. ; Timeout queue creation
  478. TIMEOUT = 15m30s
  479. ; Create a pool with this many workers
  480. WORKERS = 1
  481. ; Dynamically scale the worker pool to at this many workers
  482. MAX_WORKERS = 10
  483. ; Add boost workers when the queue blocks for BLOCK_TIMEOUT
  484. BLOCK_TIMEOUT = 1s
  485. ; Remove the boost workers after BOOST_TIMEOUT
  486. BOOST_TIMEOUT = 5m
  487. ; During a boost add BOOST_WORKERS
  488. BOOST_WORKERS = 5
  489. [admin]
  490. ; Disallow regular (non-admin) users from creating organizations.
  491. DISABLE_REGULAR_ORG_CREATION = false
  492. ; Default configuration for email notifications for users (user configurable). Options: enabled, onmention, disabled
  493. DEFAULT_EMAIL_NOTIFICATIONS = enabled
  494. [security]
  495. ; Whether the installer is disabled
  496. INSTALL_LOCK = false
  497. ; !!CHANGE THIS TO KEEP YOUR USER DATA SAFE!!
  498. SECRET_KEY = !#@FDEWREWR&*(
  499. ; How long to remember that a user is logged in before requiring relogin (in days)
  500. LOGIN_REMEMBER_DAYS = 7
  501. COOKIE_USERNAME = gitea_awesome
  502. COOKIE_REMEMBER_NAME = gitea_incredible
  503. ; Reverse proxy authentication header name of user name
  504. REVERSE_PROXY_AUTHENTICATION_USER = X-WEBAUTH-USER
  505. REVERSE_PROXY_AUTHENTICATION_EMAIL = X-WEBAUTH-EMAIL
  506. ; The minimum password length for new Users
  507. MIN_PASSWORD_LENGTH = 6
  508. ; Set to true to allow users to import local server paths
  509. IMPORT_LOCAL_PATHS = false
  510. ; Set to false to allow users with git hook privileges to create custom git hooks.
  511. ; Custom git hooks can be used to perform arbitrary code execution on the host operating system.
  512. ; This enables the users to access and modify this config file and the Gitea database and interrupt the Gitea service.
  513. ; By modifying the Gitea database, users can gain Gitea administrator privileges.
  514. ; It also enables them to access other resources available to the user on the operating system that is running the Gitea instance and perform arbitrary actions in the name of the Gitea OS user.
  515. ; WARNING: This maybe harmful to you website or your operating system.
  516. DISABLE_GIT_HOOKS = true
  517. ; Set to false to allow pushes to gitea repositories despite having an incomplete environment - NOT RECOMMENDED
  518. ONLY_ALLOW_PUSH_IF_GITEA_ENVIRONMENT_SET = true
  519. ;Comma separated list of character classes required to pass minimum complexity.
  520. ;If left empty or no valid values are specified, the default is off (no checking)
  521. ;Classes include "lower,upper,digit,spec"
  522. PASSWORD_COMPLEXITY = off
  523. ; Password Hash algorithm, either "argon2", "pbkdf2", "scrypt" or "bcrypt"
  524. PASSWORD_HASH_ALGO = argon2
  525. ; Set false to allow JavaScript to read CSRF cookie
  526. CSRF_COOKIE_HTTP_ONLY = true
  527. ; Validate against https://haveibeenpwned.com/Passwords to see if a password has been exposed
  528. PASSWORD_CHECK_PWN = false
  529. [openid]
  530. ;
  531. ; OpenID is an open, standard and decentralized authentication protocol.
  532. ; Your identity is the address of a webpage you provide, which describes
  533. ; how to prove you are in control of that page.
  534. ;
  535. ; For more info: https://en.wikipedia.org/wiki/OpenID
  536. ;
  537. ; Current implementation supports OpenID-2.0
  538. ;
  539. ; Tested to work providers at the time of writing:
  540. ; - Any GNUSocial node (your.hostname.tld/username)
  541. ; - Any SimpleID provider (http://simpleid.koinic.net)
  542. ; - http://openid.org.cn/
  543. ; - openid.stackexchange.com
  544. ; - login.launchpad.net
  545. ; - <username>.livejournal.com
  546. ;
  547. ; Whether to allow signin in via OpenID
  548. ENABLE_OPENID_SIGNIN = true
  549. ; Whether to allow registering via OpenID
  550. ; Do not include to rely on rhw DISABLE_REGISTRATION setting
  551. ;ENABLE_OPENID_SIGNUP = true
  552. ; Allowed URI patterns (POSIX regexp).
  553. ; Space separated.
  554. ; Only these would be allowed if non-blank.
  555. ; Example value: trusted.domain.org trusted.domain.net
  556. WHITELISTED_URIS =
  557. ; Forbidden URI patterns (POSIX regexp).
  558. ; Space separated.
  559. ; Only used if WHITELISTED_URIS is blank.
  560. ; Example value: loadaverage.org/badguy stackexchange.com/.*spammer
  561. BLACKLISTED_URIS =
  562. [service]
  563. ; Time limit to confirm account/email registration
  564. ACTIVE_CODE_LIVE_MINUTES = 180
  565. ; Time limit to perform the reset of a forgotten password
  566. RESET_PASSWD_CODE_LIVE_MINUTES = 180
  567. ; Whether a new user needs to confirm their email when registering.
  568. REGISTER_EMAIL_CONFIRM = false
  569. ; List of domain names that are allowed to be used to register on a Gitea instance
  570. ; gitea.io,example.com
  571. EMAIL_DOMAIN_WHITELIST=
  572. ; Disallow registration, only allow admins to create accounts.
  573. DISABLE_REGISTRATION = false
  574. ; Allow registration only using third-party services, it works only when DISABLE_REGISTRATION is false
  575. ALLOW_ONLY_EXTERNAL_REGISTRATION = false
  576. ; User must sign in to view anything.
  577. REQUIRE_SIGNIN_VIEW = false
  578. ; Mail notification
  579. ENABLE_NOTIFY_MAIL = false
  580. ; This setting enables gitea to be signed in with HTTP BASIC Authentication using the user's password
  581. ; If you set this to false you will not be able to access the tokens endpoints on the API with your password
  582. ; Please note that setting this to false will not disable OAuth Basic or Basic authentication using a token
  583. ENABLE_BASIC_AUTHENTICATION = true
  584. ; More detail: https://github.com/gogits/gogs/issues/165
  585. ENABLE_REVERSE_PROXY_AUTHENTICATION = false
  586. ENABLE_REVERSE_PROXY_AUTO_REGISTRATION = false
  587. ENABLE_REVERSE_PROXY_EMAIL = false
  588. ; Enable captcha validation for registration
  589. ENABLE_CAPTCHA = false
  590. ; Type of captcha you want to use. Options: image, recaptcha, hcaptcha
  591. CAPTCHA_TYPE = image
  592. ; Enable recaptcha to use Google's recaptcha service
  593. ; Go to https://www.google.com/recaptcha/admin to sign up for a key
  594. RECAPTCHA_SECRET =
  595. RECAPTCHA_SITEKEY =
  596. ; For hCaptcha, create an account at https://accounts.hcaptcha.com/login to get your keys
  597. HCAPTCHA_SECRET =
  598. HCAPTCHA_SITEKEY =
  599. ; Change this to use recaptcha.net or other recaptcha service
  600. RECAPTCHA_URL = https://www.google.com/recaptcha/
  601. ; Default value for KeepEmailPrivate
  602. ; Each new user will get the value of this setting copied into their profile
  603. DEFAULT_KEEP_EMAIL_PRIVATE = false
  604. ; Default value for AllowCreateOrganization
  605. ; Every new user will have rights set to create organizations depending on this setting
  606. DEFAULT_ALLOW_CREATE_ORGANIZATION = true
  607. ; Either "public", "limited" or "private", default is "public"
  608. ; Limited is for signed user only
  609. ; Private is only for member of the organization
  610. ; Public is for everyone
  611. DEFAULT_ORG_VISIBILITY = public
  612. ; Default value for DefaultOrgMemberVisible
  613. ; True will make the membership of the users visible when added to the organisation
  614. DEFAULT_ORG_MEMBER_VISIBLE = false
  615. ; Default value for EnableDependencies
  616. ; Repositories will use dependencies by default depending on this setting
  617. DEFAULT_ENABLE_DEPENDENCIES = true
  618. ; Dependencies can be added from any repository where the user is granted access or only from the current repository depending on this setting.
  619. ALLOW_CROSS_REPOSITORY_DEPENDENCIES = true
  620. ; Enable heatmap on users profiles.
  621. ENABLE_USER_HEATMAP = true
  622. ; Enable Timetracking
  623. ENABLE_TIMETRACKING = true
  624. ; Default value for EnableTimetracking
  625. ; Repositories will use timetracking by default depending on this setting
  626. DEFAULT_ENABLE_TIMETRACKING = true
  627. ; Default value for AllowOnlyContributorsToTrackTime
  628. ; Only users with write permissions can track time if this is true
  629. DEFAULT_ALLOW_ONLY_CONTRIBUTORS_TO_TRACK_TIME = true
  630. ; Default value for the domain part of the user's email address in the git log
  631. ; if he has set KeepEmailPrivate to true. The user's email will be replaced with a
  632. ; concatenation of the user name in lower case, "@" and NO_REPLY_ADDRESS.
  633. NO_REPLY_ADDRESS = noreply.%(DOMAIN)s
  634. ; Show Registration button
  635. SHOW_REGISTRATION_BUTTON = true
  636. ; Show milestones dashboard page - a view of all the user's milestones
  637. SHOW_MILESTONES_DASHBOARD_PAGE = true
  638. ; Default value for AutoWatchNewRepos
  639. ; When adding a repo to a team or creating a new repo all team members will watch the
  640. ; repo automatically if enabled
  641. AUTO_WATCH_NEW_REPOS = true
  642. ; Default value for AutoWatchOnChanges
  643. ; Make the user watch a repository When they commit for the first time
  644. AUTO_WATCH_ON_CHANGES = false
  645. [webhook]
  646. ; Hook task queue length, increase if webhook shooting starts hanging
  647. QUEUE_LENGTH = 1000
  648. ; Deliver timeout in seconds
  649. DELIVER_TIMEOUT = 5
  650. ; Allow insecure certification
  651. SKIP_TLS_VERIFY = false
  652. ; Number of history information in each page
  653. PAGING_NUM = 10
  654. ; Proxy server URL, support http://, https//, socks://, blank will follow environment http_proxy/https_proxy
  655. PROXY_URL =
  656. ; Comma separated list of host names requiring proxy. Glob patterns (*) are accepted; use ** to match all hosts.
  657. PROXY_HOSTS =
  658. [mailer]
  659. ENABLED = false
  660. ; Buffer length of channel, keep it as it is if you don't know what it is.
  661. SEND_BUFFER_LEN = 100
  662. ; Prefix displayed before subject in mail
  663. SUBJECT_PREFIX =
  664. ; Mail server
  665. ; Gmail: smtp.gmail.com:587
  666. ; QQ: smtp.qq.com:465
  667. ; Using STARTTLS on port 587 is recommended per RFC 6409.
  668. ; Note, if the port ends with "465", SMTPS will be used.
  669. HOST =
  670. ; Disable HELO operation when hostnames are different.
  671. DISABLE_HELO =
  672. ; Custom hostname for HELO operation, if no value is provided, one is retrieved from system.
  673. HELO_HOSTNAME =
  674. ; Whether or not to skip verification of certificates; `true` to disable verification. This option is unsafe. Consider adding the certificate to the system trust store instead.
  675. SKIP_VERIFY = false
  676. ; Use client certificate
  677. USE_CERTIFICATE = false
  678. CERT_FILE = custom/mailer/cert.pem
  679. KEY_FILE = custom/mailer/key.pem
  680. ; Should SMTP connect with TLS, (if port ends with 465 TLS will always be used.)
  681. ; If this is false but STARTTLS is supported the connection will be upgraded to TLS opportunistically.
  682. IS_TLS_ENABLED = false
  683. ; Mail from address, RFC 5322. This can be just an email address, or the `"Name" <email@example.com>` format
  684. FROM =
  685. ; Mailer user name and password
  686. ; Please Note: Authentication is only supported when the SMTP server communication is encrypted with TLS (this can be via STARTTLS) or `HOST=localhost`.
  687. USER =
  688. ; Use PASSWD = `your password` for quoting if you use special characters in the password.
  689. PASSWD =
  690. ; Send mails as plain text
  691. SEND_AS_PLAIN_TEXT = false
  692. ; Set Mailer Type (either SMTP, sendmail or dummy to just send to the log)
  693. MAILER_TYPE = smtp
  694. ; Specify an alternative sendmail binary
  695. SENDMAIL_PATH = sendmail
  696. ; Specify any extra sendmail arguments
  697. SENDMAIL_ARGS =
  698. ; Timeout for Sendmail
  699. SENDMAIL_TIMEOUT = 5m
  700. [cache]
  701. ; if the cache enabled
  702. ENABLED = true
  703. ; Either "memory", "redis", or "memcache", default is "memory"
  704. ADAPTER = memory
  705. ; For "memory" only, GC interval in seconds, default is 60
  706. INTERVAL = 60
  707. ; For "redis" and "memcache", connection host address
  708. ; redis: network=tcp,addr=:6379,password=macaron,db=0,pool_size=100,idle_timeout=180
  709. ; memcache: `127.0.0.1:11211`
  710. HOST =
  711. ; Time to keep items in cache if not used, default is 16 hours.
  712. ; Setting it to 0 disables caching
  713. ITEM_TTL = 16h
  714. ; Last commit cache
  715. [cache.last_commit]
  716. ; if the cache enabled
  717. ENABLED = true
  718. ; Time to keep items in cache if not used, default is 8760 hours.
  719. ; Setting it to 0 disables caching
  720. ITEM_TTL = 8760h
  721. ; Only enable the cache when repository's commits count great than
  722. COMMITS_COUNT = 1000
  723. [session]
  724. ; Either "memory", "file", or "redis", default is "memory"
  725. PROVIDER = memory
  726. ; Provider config options
  727. ; memory: doesn't have any config yet
  728. ; file: session file path, e.g. `data/sessions`
  729. ; redis: network=tcp,addr=:6379,password=macaron,db=0,pool_size=100,idle_timeout=180
  730. ; mysql: go-sql-driver/mysql dsn config string, e.g. `root:password@/session_table`
  731. PROVIDER_CONFIG = data/sessions
  732. ; Session cookie name
  733. COOKIE_NAME = i_like_gitea
  734. ; If you use session in https only, default is false
  735. COOKIE_SECURE = false
  736. ; Session GC time interval in seconds, default is 86400 (1 day)
  737. GC_INTERVAL_TIME = 86400
  738. ; Session life time in seconds, default is 86400 (1 day)
  739. SESSION_LIFE_TIME = 86400
  740. [picture]
  741. AVATAR_UPLOAD_PATH = data/avatars
  742. REPOSITORY_AVATAR_UPLOAD_PATH = data/repo-avatars
  743. ; How Gitea deals with missing repository avatars
  744. ; none = no avatar will be displayed; random = random avatar will be displayed; image = default image will be used
  745. REPOSITORY_AVATAR_FALLBACK = none
  746. REPOSITORY_AVATAR_FALLBACK_IMAGE = /img/repo_default.png
  747. ; Max Width and Height of uploaded avatars.
  748. ; This is to limit the amount of RAM used when resizing the image.
  749. AVATAR_MAX_WIDTH = 4096
  750. AVATAR_MAX_HEIGHT = 3072
  751. ; Maximum alloved file size for uploaded avatars.
  752. ; This is to limit the amount of RAM used when resizing the image.
  753. AVATAR_MAX_FILE_SIZE = 1048576
  754. ; Chinese users can choose "duoshuo"
  755. ; or a custom avatar source, like: http://cn.gravatar.com/avatar/
  756. GRAVATAR_SOURCE = gravatar
  757. ; This value will always be true in offline mode.
  758. DISABLE_GRAVATAR = false
  759. ; Federated avatar lookup uses DNS to discover avatar associated
  760. ; with emails, see https://www.libravatar.org
  761. ; This value will always be false in offline mode or when Gravatar is disabled.
  762. ENABLE_FEDERATED_AVATAR = false
  763. [attachment]
  764. ; Whether issue and pull request attachments are enabled. Defaults to `true`
  765. ENABLED = true
  766. ; Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types.
  767. ALLOWED_TYPES = .docx,.gif,.gz,.jpeg,.jpg,.log,.pdf,.png,.pptx,.txt,.xlsx,.zip
  768. ; Max size of each file. Defaults to 4MB
  769. MAX_SIZE = 4
  770. ; Max number of files per upload. Defaults to 5
  771. MAX_FILES = 5
  772. ; Storage type for attachments, `local` for local disk or `minio` for s3 compatible
  773. ; object storage service, default is `local`.
  774. STORAGE_TYPE = local
  775. ; Allows the storage driver to redirect to authenticated URLs to serve files directly
  776. ; Currently, only `minio` is supported.
  777. SERVE_DIRECT = false
  778. ; Path for attachments. Defaults to `data/attachments` only available when STORAGE_TYPE is `local`
  779. PATH = data/attachments
  780. ; Minio endpoint to connect only available when STORAGE_TYPE is `minio`
  781. MINIO_ENDPOINT = localhost:9000
  782. ; Minio accessKeyID to connect only available when STORAGE_TYPE is `minio`
  783. MINIO_ACCESS_KEY_ID =
  784. ; Minio secretAccessKey to connect only available when STORAGE_TYPE is `minio`
  785. MINIO_SECRET_ACCESS_KEY =
  786. ; Minio bucket to store the attachments only available when STORAGE_TYPE is `minio`
  787. MINIO_BUCKET = gitea
  788. ; Minio location to create bucket only available when STORAGE_TYPE is `minio`
  789. MINIO_LOCATION = us-east-1
  790. ; Minio base path on the bucket only available when STORAGE_TYPE is `minio`
  791. MINIO_BASE_PATH = attachments/
  792. ; Minio enabled ssl only available when STORAGE_TYPE is `minio`
  793. MINIO_USE_SSL = false
  794. [time]
  795. ; Specifies the format for fully outputted dates. Defaults to RFC1123
  796. ; Special supported values are ANSIC, UnixDate, RubyDate, RFC822, RFC822Z, RFC850, RFC1123, RFC1123Z, RFC3339, RFC3339Nano, Kitchen, Stamp, StampMilli, StampMicro and StampNano
  797. ; For more information about the format see http://golang.org/pkg/time/#pkg-constants
  798. FORMAT =
  799. ; Location the UI time display i.e. Asia/Shanghai
  800. ; Empty means server's location setting
  801. DEFAULT_UI_LOCATION =
  802. [log]
  803. ROOT_PATH =
  804. ; Either "console", "file", "conn", "smtp" or "database", default is "console"
  805. ; Use comma to separate multiple modes, e.g. "console, file"
  806. MODE = console
  807. ; Buffer length of the channel, keep it as it is if you don't know what it is.
  808. BUFFER_LEN = 10000
  809. REDIRECT_MACARON_LOG = false
  810. MACARON = file
  811. ; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Info"
  812. ROUTER_LOG_LEVEL = Info
  813. ROUTER = console
  814. ENABLE_ACCESS_LOG = false
  815. ACCESS_LOG_TEMPLATE = {{.Ctx.RemoteAddr}} - {{.Identity}} {{.Start.Format "[02/Jan/2006:15:04:05 -0700]" }} "{{.Ctx.Req.Method}} {{.Ctx.Req.RequestURI}} {{.Ctx.Req.Proto}}" {{.ResponseWriter.Status}} {{.ResponseWriter.Size}} "{{.Ctx.Req.Referer}}\" \"{{.Ctx.Req.UserAgent}}"
  816. ACCESS = file
  817. ; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace"
  818. LEVEL = Info
  819. ; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "None"
  820. STACKTRACE_LEVEL = None
  821. ; Generic log modes
  822. [log.x]
  823. FLAGS = stdflags
  824. EXPRESSION =
  825. PREFIX =
  826. COLORIZE = false
  827. ; For "console" mode only
  828. [log.console]
  829. LEVEL =
  830. STDERR = false
  831. ; For "file" mode only
  832. [log.file]
  833. LEVEL =
  834. ; Set the file_name for the logger. If this is a relative path this
  835. ; will be relative to ROOT_PATH
  836. FILE_NAME =
  837. ; This enables automated log rotate(switch of following options), default is true
  838. LOG_ROTATE = true
  839. ; Max size shift of a single file, default is 28 means 1 << 28, 256MB
  840. MAX_SIZE_SHIFT = 28
  841. ; Segment log daily, default is true
  842. DAILY_ROTATE = true
  843. ; delete the log file after n days, default is 7
  844. MAX_DAYS = 7
  845. ; compress logs with gzip
  846. COMPRESS = true
  847. ; compression level see godoc for compress/gzip
  848. COMPRESSION_LEVEL = -1
  849. ; For "conn" mode only
  850. [log.conn]
  851. LEVEL =
  852. ; Reconnect host for every single message, default is false
  853. RECONNECT_ON_MSG = false
  854. ; Try to reconnect when connection is lost, default is false
  855. RECONNECT = false
  856. ; Either "tcp", "unix" or "udp", default is "tcp"
  857. PROTOCOL = tcp
  858. ; Host address
  859. ADDR =
  860. ; For "smtp" mode only
  861. [log.smtp]
  862. LEVEL =
  863. ; Name displayed in mail title, default is "Diagnostic message from server"
  864. SUBJECT = Diagnostic message from server
  865. ; Mail server
  866. HOST =
  867. ; Mailer user name and password
  868. USER =
  869. ; Use PASSWD = `your password` for quoting if you use special characters in the password.
  870. PASSWD =
  871. ; Receivers, can be one or more, e.g. 1@example.com,2@example.com
  872. RECEIVERS =
  873. [cron]
  874. ; Enable running all cron tasks periodically with default settings.
  875. ENABLED = false
  876. ; Run cron tasks when Gitea starts.
  877. RUN_AT_START = false
  878. ; Basic cron tasks - enabled by default
  879. ; Clean up old repository archives
  880. [cron.archive_cleanup]
  881. ; Whether to enable the job
  882. ENABLED = true
  883. ; Whether to always run at least once at start up time (if ENABLED)
  884. RUN_AT_START = true
  885. ; Notice if not success
  886. NO_SUCCESS_NOTICE = false
  887. ; Time interval for job to run
  888. SCHEDULE = @every 24h
  889. ; Archives created more than OLDER_THAN ago are subject to deletion
  890. OLDER_THAN = 24h
  891. ; Update mirrors
  892. [cron.update_mirrors]
  893. SCHEDULE = @every 10m
  894. ; Enable running Update mirrors task periodically.
  895. ENABLED = true
  896. ; Run Update mirrors task when Gitea starts.
  897. RUN_AT_START = false
  898. ; Notice if not success
  899. NO_SUCCESS_NOTICE = true
  900. ; Repository health check
  901. [cron.repo_health_check]
  902. SCHEDULE = @every 24h
  903. ; Enable running Repository health check task periodically.
  904. ENABLED = true
  905. ; Run Repository health check task when Gitea starts.
  906. RUN_AT_START = false
  907. ; Notice if not success
  908. NO_SUCCESS_NOTICE = false
  909. TIMEOUT = 60s
  910. ; Arguments for command 'git fsck', e.g. "--unreachable --tags"
  911. ; see more on http://git-scm.com/docs/git-fsck
  912. ARGS =
  913. ; Check repository statistics
  914. [cron.check_repo_stats]
  915. ; Enable running check repository statistics task periodically.
  916. ENABLED = true
  917. ; Run check repository statistics task when Gitea starts.
  918. RUN_AT_START = true
  919. ; Notice if not success
  920. NO_SUCCESS_NOTICE = false
  921. SCHEDULE = @every 24h
  922. [cron.update_migration_poster_id]
  923. ; Update migrated repositories' issues and comments' posterid, it will always attempt synchronization when the instance starts.
  924. ENABLED = true
  925. ; Update migrated repositories' issues and comments' posterid when starting server (default true)
  926. RUN_AT_START = true
  927. ; Notice if not success
  928. NO_SUCCESS_NOTICE = false
  929. ; Interval as a duration between each synchronization. (default every 24h)
  930. SCHEDULE = @every 24h
  931. ; Synchronize external user data (only LDAP user synchronization is supported)
  932. [cron.sync_external_users]
  933. ENABLED = true
  934. ; Synchronize external user data when starting server (default false)
  935. RUN_AT_START = false
  936. ; Notice if not success
  937. NO_SUCCESS_NOTICE = false
  938. ; Interval as a duration between each synchronization (default every 24h)
  939. SCHEDULE = @every 24h
  940. ; Create new users, update existing user data and disable users that are not in external source anymore (default)
  941. ; or only create new users if UPDATE_EXISTING is set to false
  942. UPDATE_EXISTING = true
  943. ; Clean-up deleted branches
  944. [cron.deleted_branches_cleanup]
  945. ENABLED = true
  946. ; Clean-up deleted branches when starting server (default true)
  947. RUN_AT_START = true
  948. ; Notice if not success
  949. NO_SUCCESS_NOTICE = false
  950. ; Interval as a duration between each synchronization (default every 24h)
  951. SCHEDULE = @every 24h
  952. ; deleted branches than OLDER_THAN ago are subject to deletion
  953. OLDER_THAN = 24h
  954. ; Extended cron task - not enabled by default
  955. ; Delete all unactivated accounts
  956. [cron.delete_inactive_accounts]
  957. ENABLED = false
  958. RUN_AT_START = false
  959. NO_SUCCESS_NOTICE = false
  960. SCHEDULE = @annually
  961. OLDER_THAN = 168h
  962. ; Delete all repository archives
  963. [cron.delete_repo_archives]
  964. ENABLED = false
  965. RUN_AT_START = false
  966. NO_SUCCESS_NOTICE = false
  967. SCHEDULE = @annually
  968. ; Garbage collect all repositories
  969. [cron.git_gc_repos]
  970. ENABLED = false
  971. RUN_AT_START = false
  972. NO_SUCCESS_NOTICE = false
  973. SCHEDULE = @every 72h
  974. TIMEOUT = 60s
  975. ; Arguments for command 'git gc'
  976. ; The default value is same with [git] -> GC_ARGS
  977. ARGS =
  978. ; Update the '.ssh/authorized_keys' file with Gitea SSH keys
  979. [cron.resync_all_sshkeys]
  980. ENABLED = false
  981. RUN_AT_START = false
  982. NO_SUCCESS_NOTICE = false
  983. SCHEDULE = @every 72h
  984. ; Resynchronize pre-receive, update and post-receive hooks of all repositories.
  985. [cron.resync_all_hooks]
  986. ENABLED = false
  987. RUN_AT_START = false
  988. NO_SUCCESS_NOTICE = false
  989. SCHEDULE = @every 72h
  990. ; Reinitialize all missing Git repositories for which records exist
  991. [cron.reinit_missing_repos]
  992. ENABLED = false
  993. RUN_AT_START = false
  994. NO_SUCCESS_NOTICE = false
  995. SCHEDULE = @every 72h
  996. ; Delete all repositories missing their Git files
  997. [cron.delete_missing_repos]
  998. ENABLED = false
  999. RUN_AT_START = false
  1000. NO_SUCCESS_NOTICE = false
  1001. SCHEDULE = @every 72h
  1002. ; Delete generated repository avatars
  1003. [cron.delete_generated_repository_avatars]
  1004. ENABLED = false
  1005. RUN_AT_START = false
  1006. NO_SUCCESS_NOTICE = false
  1007. SCHEDULE = @every 72h
  1008. [git]
  1009. ; The path of git executable. If empty, Gitea searches through the PATH environment.
  1010. PATH =
  1011. ; Disables highlight of added and removed changes
  1012. DISABLE_DIFF_HIGHLIGHT = false
  1013. ; Max number of lines allowed in a single file in diff view
  1014. MAX_GIT_DIFF_LINES = 1000
  1015. ; Max number of allowed characters in a line in diff view
  1016. MAX_GIT_DIFF_LINE_CHARACTERS = 5000
  1017. ; Max number of files shown in diff view
  1018. MAX_GIT_DIFF_FILES = 100
  1019. ; Arguments for command 'git gc', e.g. "--aggressive --auto"
  1020. ; see more on http://git-scm.com/docs/git-gc/
  1021. GC_ARGS =
  1022. ; If use git wire protocol version 2 when git version >= 2.18, default is true, set to false when you always want git wire protocol version 1
  1023. ENABLE_AUTO_GIT_WIRE_PROTOCOL = true
  1024. ; Respond to pushes to a non-default branch with a URL for creating a Pull Request (if the repository has them enabled)
  1025. PULL_REQUEST_PUSH_MESSAGE = true
  1026. ; Operation timeout in seconds
  1027. [git.timeout]
  1028. DEFAULT = 360
  1029. MIGRATE = 600
  1030. MIRROR = 300
  1031. CLONE = 300
  1032. PULL = 300
  1033. GC = 60
  1034. [mirror]
  1035. ; Default interval as a duration between each check
  1036. DEFAULT_INTERVAL = 8h
  1037. ; Min interval as a duration must be > 1m
  1038. MIN_INTERVAL = 10m
  1039. [api]
  1040. ; Enables Swagger. True or false; default is true.
  1041. ENABLE_SWAGGER = true
  1042. ; Max number of items in a page
  1043. MAX_RESPONSE_ITEMS = 50
  1044. ; Default paging number of api
  1045. DEFAULT_PAGING_NUM = 30
  1046. ; Default and maximum number of items per page for git trees api
  1047. DEFAULT_GIT_TREES_PER_PAGE = 1000
  1048. ; Default size of a blob returned by the blobs API (default is 10MiB)
  1049. DEFAULT_MAX_BLOB_SIZE = 10485760
  1050. [oauth2]
  1051. ; Enables OAuth2 provider
  1052. ENABLE = true
  1053. ; Lifetime of an OAuth2 access token in seconds
  1054. ACCESS_TOKEN_EXPIRATION_TIME=3600
  1055. ; Lifetime of an OAuth2 refresh token in hours
  1056. REFRESH_TOKEN_EXPIRATION_TIME=730
  1057. ; Check if refresh token got already used
  1058. INVALIDATE_REFRESH_TOKENS=false
  1059. ; OAuth2 authentication secret for access and refresh tokens, change this yourself to a unique string. CLI generate option is helpful in this case. https://docs.gitea.io/en-us/command-line/#generate
  1060. JWT_SECRET=
  1061. ; Maximum length of oauth2 token/cookie stored on server
  1062. MAX_TOKEN_LENGTH=32767
  1063. [i18n]
  1064. LANGS = en-US,zh-CN,zh-HK,zh-TW,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,uk-UA,ja-JP,es-ES,pt-BR,pt-PT,pl-PL,bg-BG,it-IT,fi-FI,tr-TR,cs-CZ,sr-SP,sv-SE,ko-KR
  1065. NAMES = English,简体中文,繁體中文(香港),繁體中文(台灣),Deutsch,français,Nederlands,latviešu,русский,Українська,日本語,español,português do Brasil,Português de Portugal,polski,български,italiano,suomi,Türkçe,čeština,српски,svenska,한국어
  1066. [U2F]
  1067. ; NOTE: THE DEFAULT VALUES HERE WILL NEED TO BE CHANGED
  1068. ; Two Factor authentication with security keys
  1069. ; https://developers.yubico.com/U2F/App_ID.html
  1070. ;APP_ID = http://localhost:3000/
  1071. ; Comma separated list of trusted facets
  1072. ;TRUSTED_FACETS = http://localhost:3000/
  1073. ; Extension mapping to highlight class
  1074. ; e.g. .toml=ini
  1075. [highlight.mapping]
  1076. [other]
  1077. SHOW_FOOTER_BRANDING = false
  1078. ; Show version information about Gitea and Go in the footer
  1079. SHOW_FOOTER_VERSION = true
  1080. ; Show template execution time in the footer
  1081. SHOW_FOOTER_TEMPLATE_LOAD_TIME = true
  1082. [markup.sanitizer.1]
  1083. ; The following keys can appear once to define a sanitation policy rule.
  1084. ; This section can appear multiple times by adding a unique alphanumeric suffix to define multiple rules.
  1085. ; e.g., [markup.sanitizer.1] -> [markup.sanitizer.2] -> [markup.sanitizer.TeX]
  1086. ;ELEMENT = span
  1087. ;ALLOW_ATTR = class
  1088. ;REGEXP = ^(info|warning|error)$
  1089. [markup.asciidoc]
  1090. ENABLED = false
  1091. ; List of file extensions that should be rendered by an external command
  1092. FILE_EXTENSIONS = .adoc,.asciidoc
  1093. ; External command to render all matching extensions
  1094. RENDER_COMMAND = "asciidoc --out-file=- -"
  1095. ; Don't pass the file on STDIN, pass the filename as argument instead.
  1096. IS_INPUT_FILE = false
  1097. [metrics]
  1098. ; Enables metrics endpoint. True or false; default is false.
  1099. ENABLED = false
  1100. ; If you want to add authorization, specify a token here
  1101. TOKEN =
  1102. [task]
  1103. ; Task queue type, could be `channel` or `redis`.
  1104. QUEUE_TYPE = channel
  1105. ; Task queue length, available only when `QUEUE_TYPE` is `channel`.
  1106. QUEUE_LENGTH = 1000
  1107. ; Task queue connection string, available only when `QUEUE_TYPE` is `redis`.
  1108. ; If there is a password of redis, use `addrs=127.0.0.1:6379 password=123 db=0`.
  1109. QUEUE_CONN_STR = "addrs=127.0.0.1:6379 db=0"
  1110. [migrations]
  1111. ; Max attempts per http/https request on migrations.
  1112. MAX_ATTEMPTS = 3
  1113. ; Backoff time per http/https request retry (seconds)
  1114. RETRY_BACKOFF = 3
  1115. ; default storage for attachments, lfs and avatars
  1116. [storage]
  1117. ; storage type
  1118. STORAGE_TYPE = local
  1119. ; lfs storage will override storage
  1120. [lfs]
  1121. STORAGE_TYPE = local
  1122. ; customize storage
  1123. ;[storage.my_minio]
  1124. ;STORAGE_TYPE = minio
  1125. ; Minio endpoint to connect only available when STORAGE_TYPE is `minio`
  1126. ;MINIO_ENDPOINT = localhost:9000
  1127. ; Minio accessKeyID to connect only available when STORAGE_TYPE is `minio`
  1128. ;MINIO_ACCESS_KEY_ID =
  1129. ; Minio secretAccessKey to connect only available when STORAGE_TYPE is `minio`
  1130. ;MINIO_SECRET_ACCESS_KEY =
  1131. ; Minio bucket to store the attachments only available when STORAGE_TYPE is `minio`
  1132. ;MINIO_BUCKET = gitea
  1133. ; Minio location to create bucket only available when STORAGE_TYPE is `minio`
  1134. ;MINIO_LOCATION = us-east-1
  1135. ; Minio enabled ssl only available when STORAGE_TYPE is `minio`
  1136. ;MINIO_USE_SSL = false