· 5 years ago · Mar 19, 2020, 08:56 PM
1; this file is the configuration of your local gitea instance
2; Ansible managed
3;
4; This file overwrites the default values from gitea.
5; undefined variables will use the default value from gitea.
6; Cheat Sheet: https://docs.gitea.io/en-us/config-cheat-sheet/
7;
8; App name that shows on every page title
9APP_NAME = Gitea
10; Change it if you run locally
11RUN_USER = gitea
12; Either "dev", "prod" or "test", default is "dev"
13RUN_MODE = prod
14
15[repository]
16ROOT = /var/lib/gitea
17; Force every new repository to be private
18FORCE_PRIVATE = False
19; Global limit of repositories per user, applied at creation time. -1 means no limit
20MAX_CREATION_LIMIT = -1
21; Mirror sync queue length, increase if mirror syncing starts hanging
22MIRROR_QUEUE_LENGTH = 1000
23; Disable the ability to interact with repositories using the HTTP protocol
24DISABLE_HTTP_GIT = False
25
26[ui]
27; Whether the email of the user should be shown in the Explore Users page
28SHOW_USER_EMAIL = False
29
30[server]
31; The protocol the server listens on. One of 'http', 'https', 'unix' or 'fcgi'.
32PROTOCOL = http
33DOMAIN = localhost
34ROOT_URL = http://localhost:9000
35; The address to listen on. Either a IPv4/IPv6 address or the path to a unix socket.
36HTTP_ADDR = 127.0.0.1
37HTTP_PORT = 9000
38; Disable SSH feature when not available
39DISABLE_SSH = false
40; Whether to use the builtin SSH server or not.
41START_SSH_SERVER = True
42; Domain name to be exposed in clone URL
43SSH_DOMAIN = localhost
44; The network interface the builtin SSH server should listen on
45SSH_LISTEN_HOST = 0.0.0.0
46; Port number to be exposed in clone URL
47SSH_PORT = 2222
48; The port number the builtin SSH server should listen on
49SSH_LISTEN_PORT = %(SSH_PORT)s
50; Disable CDN even in "prod" mode
51OFFLINE_MODE = True
52; Default path for App data
53APP_DATA_PATH = /var/lib/gitea/data
54
55[database]
56; Either "mysql", "postgres", "mssql" or "sqlite3", it's your choice
57DB_TYPE = sqlite3
58HOST = 127.0.0.0:3306
59NAME = root
60USER = gitea
61; Use PASSWD = `your password` for quoting if you use special characters in the password.
62PASSWD = lel
63; For Postgres, either "disable" (default), "require", or "verify-full"
64; For MySQL, either "false" (default), "true", or "skip-verify"
65SSL_MODE = disable
66; For "sqlite3" and "tidb", use an absolute path when you start gitea as service
67PATH = /var/lib/gitea/data/gitea.db
68
69[indexer]
70; Issue indexer storage path, available when ISSUE_INDEXER_TYPE is bleve
71ISSUE_INDEXER_PATH = /var/lib/gitea/indexers/issues.bleve
72; Issue indexer queue, currently support: channel or levelqueue, default is levelqueue
73ISSUE_INDEXER_QUEUE_TYPE = levelqueue
74; When ISSUE_INDEXER_QUEUE_TYPE is levelqueue, this will be the queue will be saved path,
75; default is indexers/issues.queue
76ISSUE_INDEXER_QUEUE_DIR = /var/lib/gitea/indexers/issues.queue
77; repo indexer by default disabled, since it uses a lot of disk space
78REPO_INDEXER_ENABLED = false
79REPO_INDEXER_PATH = /var/lib/gitea/indexers/repos.bleve
80
81[security]
82; Whether the installer is disabled
83INSTALL_LOCK = true
84; !!CHANGE THIS TO KEEP YOUR USER DATA SAFE!!
85SECRET_KEY = T0pS3cr31
86INTERNAL_TOKEN = SomethingVeryLong
87; How long to remember that an user is logged in before requiring relogin (in days)
88LOGIN_REMEMBER_DAYS = 7
89
90[service]
91; Disallow registration, only allow admins to create accounts.
92DISABLE_REGISTRATION = False
93; User must sign in to view anything.
94REQUIRE_SIGNIN_VIEW = True
95; Enable captcha validation for registration
96ENABLE_CAPTCHA = True
97; Type of captcha you want to use. Options: image, recaptcha
98CAPTCHA_TYPE = image
99; Enable recaptcha to use Google's recaptcha service
100; Go to https://www.google.com/recaptcha/admin to sign up for a key
101RECAPTCHA_SECRET =
102RECAPTCHA_SITEKEY =
103; Show Registration button
104SHOW_REGISTRATION_BUTTON = True
105
106[mailer]
107ENABLED = False
108; Mail server
109; Gmail: smtp.gmail.com:587
110; QQ: smtp.qq.com:465
111; 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.
112HOST = localhost:25
113; Disable HELO operation when hostnames are different.
114DISABLE_HELO =
115; Custom hostname for HELO operation, if no value is provided, one is retrieved from system.
116HELO_HOSTNAME =
117; Do not verify the certificate of the server. Only use this for self-signed certificates
118SKIP_VERIFY = False
119; Use client certificate
120USE_CERTIFICATE = false
121CERT_FILE = /var/lib/gitea/custom/mailer/cert.pem
122KEY_FILE = /var/lib/gitea/custom/mailer/key.pem
123; Should SMTP connection use TLS
124IS_TLS_ENABLED = True
125; Mail from address, RFC 5322. This can be just an email address, or the `"Name" <email@example.com>` format
126FROM = noreply@your.domain
127; Mailer user name and password
128USER =
129; Use PASSWD = `your password` for quoting if you use special characters in the password.
130PASSWD =
131; Send mails as plain text
132SEND_AS_PLAIN_TEXT = false
133; Set Mailer Type (either SMTP, sendmail or dummy to just send to the log)
134MAILER_TYPE = smtp
135; Specify an alternative sendmail binary
136SENDMAIL_PATH = sendmail
137; Specify any extra sendmail arguments
138SENDMAIL_ARGS =
139
140[session]
141; Either "memory", "file", or "redis", default is "memory"
142PROVIDER = file
143; Provider config options
144; memory: doesn't have any config yet
145; file: session file path, e.g. `data/sessions`
146; redis: network=tcp,addr=:6379,password=macaron,db=0,pool_size=100,idle_timeout=180
147; mysql: go-sql-driver/mysql dsn config string, e.g. `root:password@/session_table`
148PROVIDER_CONFIG = /var/lib/gitea/data/sessions
149
150[picture]
151AVATAR_UPLOAD_PATH = /var/lib/gitea/data/avatars
152; This value will always be true in offline mode.
153DISABLE_GRAVATAR = True
154
155[attachment]
156; Whether attachments are enabled. Defaults to `true`
157ENABLED = true
158; Path for attachments. Defaults to `data/attachments`
159PATH = /var/lib/gitea/data/attachments
160
161[log]
162ROOT_PATH = /var/lib/gitea/log
163; Either "console", "file", "conn", "smtp" or "database", default is "console"
164; Use comma to separate multiple modes, e.g. "console, file"
165MODE = file
166; Buffer length of the channel, keep it as it is if you don't know what it is.
167BUFFER_LEN = 10000
168; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace"
169LEVEL = Info
170REDIRECT_MACARON_LOG = false
171
172[oauth2]
173ENABLE = True
174JWT_SECRET = bt-TsGMCwhFwumXmQfpUPC2wVf11pO9XVNOt9nS_qTA
175
176[metrics]
177ENABLED = False
178TOKEN =