Skip to content

Commit c2f0a01

Browse files
committed
fix document
1 parent 7b5140c commit c2f0a01

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

custom/conf/app.example.ini

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -379,15 +379,17 @@ LOG_SQL = false ; if unset defaults to true
379379
;; Whether the installer is disabled (set to true to disable the installer)
380380
INSTALL_LOCK = false
381381
;;
382-
;; Global secret key that will be used - if blank will be regenerated.
382+
;; Global secret key that will be used
383+
;; This key is VERY IMPORTANT. If you lose it, the data encrypted by it (like 2FA secret) can't be decrypted anymore.
383384
SECRET_KEY =
384385
;;
385-
;; Secret used to validate communication within Gitea binary.
386-
INTERNAL_TOKEN=
387-
;;
388386
;; Alternative location to specify secret key, instead of this file; you cannot specify both this and SECRET_KEY, and must pick one
387+
;; This key is VERY IMPORTANT. If you lose it, the data encrypted by it (like 2FA secret) can't be decrypted anymore.
389388
;SECRET_KEY_URI = file:/etc/gitea/secret_key
390389
;;
390+
;; Secret used to validate communication within Gitea binary.
391+
INTERNAL_TOKEN=
392+
;;
391393
;; Alternative location to specify internal token, instead of this file; you cannot specify both this and INTERNAL_TOKEN, and must pick one
392394
;INTERNAL_TOKEN_URI = file:/etc/gitea/internal_token
393395
;;

docs/content/doc/advanced/config-cheat-sheet.en-us.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,8 @@ Certain queues have defaults that override the defaults set in `[queue]` (this o
494494
## Security (`security`)
495495

496496
- `INSTALL_LOCK`: **false**: Controls access to the installation page. When set to "true", the installation page is not accessible.
497-
- `SECRET_KEY`: **\<random at every install\>**: Global secret key. This should be changed.
497+
- `SECRET_KEY`: **\<random at every install\>**: Global secret key. This key is VERY IMPORTANT, if you lost it, the data encrypted by it (like 2FA secret) can't be decrypted anymore.
498+
- `SECRET_KEY_URI`: **<empty>**: Instead of defining SECRET_KEY, this option can be used to use the key stored in a file (example value: `file:/etc/gitea/secret_token`). It shouldn't be lost like SECRET_KEY.
498499
- `LOGIN_REMEMBER_DAYS`: **7**: Cookie lifetime, in days.
499500
- `COOKIE_USERNAME`: **gitea\_awesome**: Name of the cookie used to store the current username.
500501
- `COOKIE_REMEMBER_NAME`: **gitea\_incredible**: Name of cookie used to store authentication
@@ -520,7 +521,7 @@ Certain queues have defaults that override the defaults set in `[queue]` (this o
520521
- `ONLY_ALLOW_PUSH_IF_GITEA_ENVIRONMENT_SET`: **true**: Set to `false` to allow local users to push to gitea-repositories without setting up the Gitea environment. This is not recommended and if you want local users to push to Gitea repositories you should set the environment appropriately.
521522
- `IMPORT_LOCAL_PATHS`: **false**: Set to `false` to prevent all users (including admin) from importing local path on server.
522523
- `INTERNAL_TOKEN`: **\<random at every install if no uri set\>**: Secret used to validate communication within Gitea binary.
523-
- `INTERNAL_TOKEN_URI`: **<empty>**: Instead of defining internal token in the configuration, this configuration option can be used to give Gitea a path to a file that contains the internal token (example value: `file:/etc/gitea/internal_token`)
524+
- `INTERNAL_TOKEN_URI`: **<empty>**: Instead of defining INTERNAL_TOKEN in the configuration, this configuration option can be used to give Gitea a path to a file that contains the internal token (example value: `file:/etc/gitea/internal_token`)
524525
- `PASSWORD_HASH_ALGO`: **pbkdf2**: The hash algorithm to use \[argon2, pbkdf2, scrypt, bcrypt\], argon2 will spend more memory than others.
525526
- `CSRF_COOKIE_HTTP_ONLY`: **true**: Set false to allow JavaScript to read CSRF cookie.
526527
- `MIN_PASSWORD_LENGTH`: **6**: Minimum password length for new users.

0 commit comments

Comments
 (0)