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.ini 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444
  1. ; App name that shows on every page title
  2. APP_NAME = Gitea: Git with a cup of tea
  3. ; Change it if you run locally
  4. RUN_USER = git
  5. ; Either "dev", "prod" or "test", default is "dev"
  6. RUN_MODE = dev
  7. [repository]
  8. ROOT =
  9. SCRIPT_TYPE = bash
  10. ; Default ANSI charset
  11. ANSI_CHARSET =
  12. ; Force every new repository to be private
  13. FORCE_PRIVATE = false
  14. ; Global maximum creation limit of repository per user, -1 means no limit
  15. MAX_CREATION_LIMIT = -1
  16. ; Mirror sync queue length, increase if mirror syncing starts hanging
  17. MIRROR_QUEUE_LENGTH = 1000
  18. ; Patch test queue length, increase if pull request patch testing starts hanging
  19. PULL_REQUEST_QUEUE_LENGTH = 1000
  20. ; Preferred Licenses to place at the top of the List
  21. ; Name must match file name in conf/license or custom/conf/license
  22. PREFERRED_LICENSES = Apache License 2.0,MIT License
  23. ; Disable ability to interact with repositories by HTTP protocol
  24. DISABLE_HTTP_GIT = false
  25. [repository.editor]
  26. ; List of file extensions that should have line wraps in the CodeMirror editor
  27. ; Separate extensions with a comma. To line wrap files w/o extension, just put a comma
  28. LINE_WRAP_EXTENSIONS = .txt,.md,.markdown,.mdown,.mkd,
  29. ; Valid file modes that have a preview API associated with them, such as api/v1/markdown
  30. ; Separate values by commas. Preview tab in edit mode won't show if the file extension doesn't match
  31. PREVIEWABLE_FILE_MODES = markdown
  32. [repository.upload]
  33. ; Whether repository file uploads are enabled. Defaults to `true`
  34. ENABLED = true
  35. ; Path for uploads. Defaults to `data/tmp/uploads` (tmp gets deleted on gitea restart)
  36. TEMP_PATH = data/tmp/uploads
  37. ; One or more allowed types, e.g. image/jpeg|image/png. Nothing means any file type
  38. ALLOWED_TYPES =
  39. ; Max size of each file in MB. Defaults to 3MB
  40. FILE_MAX_SIZE = 3
  41. ; Max number of files per upload. Defaults to 5
  42. MAX_FILES = 5
  43. [ui]
  44. ; Number of repositories that are showed in one explore page
  45. EXPLORE_PAGING_NUM = 20
  46. ; Number of issues that are showed in one page
  47. ISSUE_PAGING_NUM = 10
  48. ; Number of maximum commits showed in one activity feed
  49. FEED_MAX_COMMIT_NUM = 5
  50. ; Value of `theme-color` meta tag, used by Android >= 5.0
  51. ; An invalid color like "none" or "disable" will have the default style
  52. ; More info: https://developers.google.com/web/updates/2014/11/Support-for-theme-color-in-Chrome-39-for-Android
  53. THEME_COLOR_META_TAG = `#6cc644`
  54. ; Max size of files to be displayed (defaults is 8MiB)
  55. MAX_DISPLAY_FILE_SIZE = 8388608
  56. [ui.admin]
  57. ; Number of users that are showed in one page
  58. USER_PAGING_NUM = 50
  59. ; Number of repos that are showed in one page
  60. REPO_PAGING_NUM = 50
  61. ; Number of notices that are showed in one page
  62. NOTICE_PAGING_NUM = 25
  63. ; Number of organization that are showed in one page
  64. ORG_PAGING_NUM = 50
  65. [ui.user]
  66. ; Number of repos that are showed in one page
  67. REPO_PAGING_NUM = 15
  68. [markdown]
  69. ; Enable hard line break extension
  70. ENABLE_HARD_LINE_BREAK = false
  71. ; List of custom URL-Schemes that are allowed as links when rendering Markdown
  72. ; for example git,magnet
  73. CUSTOM_URL_SCHEMES =
  74. ; List of file extensions that should be rendered/edited as Markdown
  75. ; Separate extensions with a comma. To render files w/o extension as markdown, just put a comma
  76. FILE_EXTENSIONS = .md,.markdown,.mdown,.mkd
  77. [server]
  78. PROTOCOL = http
  79. DOMAIN = localhost
  80. ROOT_URL = %(PROTOCOL)s://%(DOMAIN)s:%(HTTP_PORT)s/
  81. HTTP_ADDR = 0.0.0.0
  82. HTTP_PORT = 3000
  83. ; Permission for unix socket
  84. UNIX_SOCKET_PERMISSION = 666
  85. ; Local (DMZ) URL for Gitea workers (such as SSH update) accessing web service.
  86. ; In most cases you do not need to change the default value.
  87. ; Alter it only if your SSH server node is not the same as HTTP node.
  88. LOCAL_ROOT_URL = %(PROTOCOL)s://%(HTTP_ADDR)s:%(HTTP_PORT)s/
  89. ; Disable SSH feature when not available
  90. DISABLE_SSH = false
  91. ; Whether use builtin SSH server or not.
  92. START_SSH_SERVER = false
  93. ; Domain name to be exposed in clone URL
  94. SSH_DOMAIN = %(DOMAIN)s
  95. ; Network interface builtin SSH server listens on
  96. SSH_LISTEN_HOST =
  97. ; Port number to be exposed in clone URL
  98. SSH_PORT = 22
  99. ; Port number builtin SSH server listens on
  100. SSH_LISTEN_PORT = %(SSH_PORT)s
  101. ; Root path of SSH directory, default is '~/.ssh', but you have to use '/home/git/.ssh'.
  102. SSH_ROOT_PATH =
  103. ; Directory to create temporary files when test publick key using ssh-keygen,
  104. ; default is system temporary directory.
  105. SSH_KEY_TEST_PATH =
  106. ; Path to ssh-keygen, default is 'ssh-keygen' and let shell find out which one to call.
  107. SSH_KEYGEN_PATH = ssh-keygen
  108. ; Indicate whether to check minimum key size with corresponding type
  109. MINIMUM_KEY_SIZE_CHECK = false
  110. ; Disable CDN even in "prod" mode
  111. OFFLINE_MODE = false
  112. DISABLE_ROUTER_LOG = false
  113. ; Generate steps:
  114. ; $ ./gitea cert -ca=true -duration=8760h0m0s -host=myhost.example.com
  115. ;
  116. ; Or from a .pfx file exported from the Windows certificate store (do
  117. ; not forget to export the private key):
  118. ; $ openssl pkcs12 -in cert.pfx -out cert.pem -nokeys
  119. ; $ openssl pkcs12 -in cert.pfx -out key.pem -nocerts -nodes
  120. CERT_FILE = custom/https/cert.pem
  121. KEY_FILE = custom/https/key.pem
  122. ; Upper level of template and static file path
  123. ; default is the path where Gitea is executed
  124. STATIC_ROOT_PATH =
  125. ; Default path for App data
  126. APP_DATA_PATH = data
  127. ; Application level GZIP support
  128. ENABLE_GZIP = false
  129. ; Landing page for non-logged users, can be "home" or "explore"
  130. LANDING_PAGE = home
  131. ; Define allowed algorithms and their minimum key length (use -1 to disable a type)
  132. [ssh.minimum_key_sizes]
  133. ED25519 = 256
  134. ECDSA = 256
  135. RSA = 2048
  136. DSA = 1024
  137. [database]
  138. ; Either "mysql", "postgres" or "sqlite3", it's your choice
  139. DB_TYPE = mysql
  140. HOST = 127.0.0.1:3306
  141. NAME = gitea
  142. USER = root
  143. PASSWD =
  144. ; For "postgres" only, either "disable", "require" or "verify-full"
  145. SSL_MODE = disable
  146. ; For "sqlite3" and "tidb", use absolute path when you start as service
  147. PATH = data/gitea.db
  148. [admin]
  149. [security]
  150. INSTALL_LOCK = false
  151. ; !!CHANGE THIS TO KEEP YOUR USER DATA SAFE!!
  152. SECRET_KEY = !#@FDEWREWR&*(
  153. ; Auto-login remember days
  154. LOGIN_REMEMBER_DAYS = 7
  155. COOKIE_USERNAME = gitea_awesome
  156. COOKIE_REMEMBER_NAME = gitea_incredible
  157. ; Reverse proxy authentication header name of user name
  158. REVERSE_PROXY_AUTHENTICATION_USER = X-WEBAUTH-USER
  159. ; Sets the minimum password length for new Users
  160. MIN_PASSWORD_LENGTH = 6
  161. [service]
  162. ACTIVE_CODE_LIVE_MINUTES = 180
  163. RESET_PASSWD_CODE_LIVE_MINUTES = 180
  164. ; User need to confirm e-mail for registration
  165. REGISTER_EMAIL_CONFIRM = false
  166. ; Does not allow register and admin create account only
  167. DISABLE_REGISTRATION = false
  168. ; User must sign in to view anything.
  169. REQUIRE_SIGNIN_VIEW = false
  170. ; Mail notification
  171. ENABLE_NOTIFY_MAIL = false
  172. ; More detail: https://github.com/go-gitea/gitea/issues/165
  173. ENABLE_REVERSE_PROXY_AUTHENTICATION = false
  174. ENABLE_REVERSE_PROXY_AUTO_REGISTRATION = false
  175. ; Enable captcha validation for registration
  176. ENABLE_CAPTCHA = true
  177. [webhook]
  178. ; Hook task queue length, increase if webhook shooting starts hanging
  179. QUEUE_LENGTH = 1000
  180. ; Deliver timeout in seconds
  181. DELIVER_TIMEOUT = 5
  182. ; Allow insecure certification
  183. SKIP_TLS_VERIFY = false
  184. ; Number of history information in each page
  185. PAGING_NUM = 10
  186. [mailer]
  187. ENABLED = false
  188. ; Buffer length of channel, keep it as it is if you don't know what it is.
  189. SEND_BUFFER_LEN = 100
  190. ; Name displayed in mail title
  191. SUBJECT = %(APP_NAME)s
  192. ; Mail server
  193. ; Gmail: smtp.gmail.com:587
  194. ; QQ: smtp.qq.com:465
  195. ; Note, if the port ends with "465", SMTPS will be used. Using STARTTLS on port 587 is recommended per RFC 6409. If the server supports STARTTLS it will always be used.
  196. HOST =
  197. ; Disable HELO operation when hostname are different.
  198. DISABLE_HELO =
  199. ; Custom hostname for HELO operation, default is from system.
  200. HELO_HOSTNAME =
  201. ; Do not verify the certificate of the server. Only use this for self-signed certificates
  202. SKIP_VERIFY =
  203. ; Use client certificate
  204. USE_CERTIFICATE = false
  205. CERT_FILE = custom/mailer/cert.pem
  206. KEY_FILE = custom/mailer/key.pem
  207. ; Mail from address, RFC 5322. This can be just an email address, or the `"Name" <email@example.com>` format
  208. FROM =
  209. ; Mailer user name and password
  210. USER =
  211. PASSWD =
  212. ; Use text/html as alternative format of content
  213. ENABLE_HTML_ALTERNATIVE = false
  214. ; Enable sendmail (override SMTP)
  215. USE_SENDMAIL = false
  216. ; Specifiy an alternative sendmail binary
  217. SENDMAIL_PATH = sendmail
  218. [cache]
  219. ; Either "memory", "redis", or "memcache", default is "memory"
  220. ADAPTER = memory
  221. ; For "memory" only, GC interval in seconds, default is 60
  222. INTERVAL = 60
  223. ; For "redis" and "memcache", connection host address
  224. ; redis: network=tcp,addr=:6379,password=macaron,db=0,pool_size=100,idle_timeout=180
  225. ; memcache: `127.0.0.1:11211`
  226. HOST =
  227. [session]
  228. ; Either "memory", "file", or "redis", default is "memory"
  229. PROVIDER = memory
  230. ; Provider config options
  231. ; memory: not have any config yet
  232. ; file: session file path, e.g. `data/sessions`
  233. ; redis: network=tcp,addr=:6379,password=macaron,db=0,pool_size=100,idle_timeout=180
  234. ; mysql: go-sql-driver/mysql dsn config string, e.g. `root:password@/session_table`
  235. PROVIDER_CONFIG = data/sessions
  236. ; Session cookie name
  237. COOKIE_NAME = i_like_gitea
  238. ; If you use session in https only, default is false
  239. COOKIE_SECURE = false
  240. ; Enable set cookie, default is true
  241. ENABLE_SET_COOKIE = true
  242. ; Session GC time interval, default is 86400
  243. GC_INTERVAL_TIME = 86400
  244. ; Session life time, default is 86400
  245. SESSION_LIFE_TIME = 86400
  246. [picture]
  247. AVATAR_UPLOAD_PATH = data/avatars
  248. ; Chinese users can choose "duoshuo"
  249. ; or a custom avatar source, like: http://cn.gravatar.com/avatar/
  250. GRAVATAR_SOURCE = gravatar
  251. ; This value will be forced to be true in offline mode.
  252. DISABLE_GRAVATAR = false
  253. ; Federated avatar lookup uses DNS to discover avatar associated
  254. ; with emails, see https://www.libravatar.org
  255. ; This value will be forced to be false in offline mode or Gravatar is disbaled.
  256. ENABLE_FEDERATED_AVATAR = false
  257. [attachment]
  258. ; Whether attachments are enabled. Defaults to `true`
  259. ENABLE = true
  260. ; Path for attachments. Defaults to `data/attachments`
  261. PATH = data/attachments
  262. ; One or more allowed types, e.g. image/jpeg|image/png
  263. ALLOWED_TYPES = image/jpeg|image/png
  264. ; Max size of each file. Defaults to 32MB
  265. MAX_SIZE = 4
  266. ; Max number of files per upload. Defaults to 10
  267. MAX_FILES = 5
  268. [time]
  269. ; Specifies the format for fully outputed dates. Defaults to RFC1123
  270. ; Special supported values are ANSIC, UnixDate, RubyDate, RFC822, RFC822Z, RFC850, RFC1123, RFC1123Z, RFC3339, RFC3339Nano, Kitchen, Stamp, StampMilli, StampMicro and StampNano
  271. ; For more information about the format see http://golang.org/pkg/time/#pkg-constants
  272. FORMAT =
  273. [log]
  274. ROOT_PATH =
  275. ; Either "console", "file", "conn", "smtp" or "database", default is "console"
  276. ; Use comma to separate multiple modes, e.g. "console, file"
  277. MODE = console
  278. ; Buffer length of channel, keep it as it is if you don't know what it is.
  279. BUFFER_LEN = 10000
  280. ; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace"
  281. LEVEL = Trace
  282. ; For "console" mode only
  283. [log.console]
  284. LEVEL =
  285. ; For "file" mode only
  286. [log.file]
  287. LEVEL =
  288. ; This enables automated log rotate(switch of following options), default is true
  289. LOG_ROTATE = true
  290. ; Max line number of single file, default is 1000000
  291. MAX_LINES = 1000000
  292. ; Max size shift of single file, default is 28 means 1 << 28, 256MB
  293. MAX_SIZE_SHIFT = 28
  294. ; Segment log daily, default is true
  295. DAILY_ROTATE = true
  296. ; Expired days of log file(delete after max days), default is 7
  297. MAX_DAYS = 7
  298. ; For "conn" mode only
  299. [log.conn]
  300. LEVEL =
  301. ; Reconnect host for every single message, default is false
  302. RECONNECT_ON_MSG = false
  303. ; Try to reconnect when connection is lost, default is false
  304. RECONNECT = false
  305. ; Either "tcp", "unix" or "udp", default is "tcp"
  306. PROTOCOL = tcp
  307. ; Host address
  308. ADDR =
  309. ; For "smtp" mode only
  310. [log.smtp]
  311. LEVEL =
  312. ; Name displayed in mail title, default is "Diagnostic message from server"
  313. SUBJECT = Diagnostic message from server
  314. ; Mail server
  315. HOST =
  316. ; Mailer user name and password
  317. USER =
  318. PASSWD =
  319. ; Receivers, can be one or more, e.g. 1@example.com,2@example.com
  320. RECEIVERS =
  321. ; For "database" mode only
  322. [log.database]
  323. LEVEL =
  324. ; Either "mysql" or "postgres"
  325. DRIVER =
  326. ; Based on xorm, e.g.: root:root@localhost/gitea?charset=utf8
  327. CONN =
  328. [cron]
  329. ; Enable running cron tasks periodically.
  330. ENABLED = true
  331. ; Run cron tasks when Gitea starts.
  332. RUN_AT_START = false
  333. ; Update mirrors
  334. [cron.update_mirrors]
  335. SCHEDULE = @every 10m
  336. ; Repository health check
  337. [cron.repo_health_check]
  338. SCHEDULE = @every 24h
  339. TIMEOUT = 60s
  340. ; Arguments for command 'git fsck', e.g. "--unreachable --tags"
  341. ; see more on http://git-scm.com/docs/git-fsck/1.7.5
  342. ARGS =
  343. ; Check repository statistics
  344. [cron.check_repo_stats]
  345. RUN_AT_START = true
  346. SCHEDULE = @every 24h
  347. [git]
  348. ; Disables highlight of added and removed changes
  349. DISABLE_DIFF_HIGHLIGHT = false
  350. ; Max number of lines allowed of a single file in diff view
  351. MAX_GIT_DIFF_LINES = 1000
  352. ; Max number of characters of a line allowed in diff view
  353. MAX_GIT_DIFF_LINE_CHARACTERS = 500
  354. ; Max number of files shown in diff view
  355. MAX_GIT_DIFF_FILES = 100
  356. ; Arguments for command 'git gc', e.g. "--aggressive --auto"
  357. ; see more on http://git-scm.com/docs/git-gc/1.7.5
  358. GC_ARGS =
  359. ; Operation timeout in seconds
  360. [git.timeout]
  361. MIGRATE = 600
  362. MIRROR = 300
  363. CLONE = 300
  364. PULL = 300
  365. GC = 60
  366. [mirror]
  367. ; Default interval in hours between each check
  368. DEFAULT_INTERVAL = 8
  369. [api]
  370. ; Max number of items will response in a page
  371. MAX_RESPONSE_ITEMS = 50
  372. [i18n]
  373. LANGS = en-US,zh-CN,zh-HK,zh-TW,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,ja-JP,es-ES,pt-BR,pl-PL,bg-BG,it-IT,fi-FI,tr-TR,cs-CZ,sr-SP,sv-SE,ko-KR
  374. NAMES = English,简体中文,繁體中文(香港),繁體中文(台湾),Deutsch,Français,Nederlands,Latviešu,Русский,日本語,Español,Português do Brasil,Polski,български,Italiano,Suomalainen,Türkçe,čeština,Српски,Svenska,한국어
  375. ; Used for datetimepicker
  376. [i18n.datelang]
  377. en-US = en
  378. zh-CN = zh
  379. zh-HK = zh-TW
  380. zh-TW = zh-TW
  381. de-DE = de
  382. fr-FR = fr
  383. nl-NL = nl
  384. lv-LV = lv
  385. ru-RU = ru
  386. ja-JP = ja
  387. es-ES = es
  388. pt-BR = pt-BR
  389. pl-PL = pl
  390. bg-BG = bg
  391. it-IT = it
  392. fi-FI = fi
  393. tr-TR = tr
  394. cs-CZ = cs-CZ
  395. sr-SP = sr
  396. sv-SE = sv
  397. ko-KR = ko
  398. ; Extension mapping to highlight class
  399. ; e.g. .toml=ini
  400. [highlight.mapping]
  401. [other]
  402. SHOW_FOOTER_BRANDING = false
  403. ; Show version information about Gitea and Go in the footer
  404. SHOW_FOOTER_VERSION = true
  405. ; Show time of template execution in the footer
  406. SHOW_FOOTER_TEMPLATE_LOAD_TIME = true