Skip to content

Commit cd58378

Browse files
committed
Improved documentation
Signed-off-by: Cristian Le <[email protected]>
1 parent f96f206 commit cd58378

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

custom/conf/app.example.ini

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,9 @@ RUN_MODE = ; prod
187187
;; Leave empty to default to LetsEncrypt's (production) URL
188188
;ACME_URL =
189189
;;
190-
;; If using LetsEncrypt please read their TOS and manually change this setting to true
191-
;LETSENCRYPT_ACCEPTTOS = false
190+
;; Explicitly accept the ACME's TOS. The specific TOS cannot be retrieved at the moment.
191+
;; TODO: waiting on caddyserver/certmagic#165, after which this option should only be used if interactive setup is unavailable
192+
;ACME_ACCEPTTOS = false
192193
;;
193194
;; If the ACME CA is not in your system's CA trust chain, it can be manually added here
194195
;ACME_CA_ROOT =

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ The following configuration set `Content-Type: application/vnd.android.package-a
348348
- "ecdhe_ecdsa_with_chacha20_poly1305" is alias for "ecdhe_ecdsa_with_chacha20_poly1305_sha256"
349349
- `ENABLE_ACME`: **false**: Flag to enable automatic certificate management via an ACME capable Certificate Authority (CA) server (default: Lets Encrypt). If enabled, `CERT_FILE` and `KEY_FILE` are ignored, and the CA must resolve `DOMAIN` to this gitea server. Ensure that DNS records are set and either port `80` or port `443` are accessible by the CA server (the public internet by default), and redirected to the appropriate ports `PORT_TO_REDIRECT` or `HTTP_PORT` respectively.
350350
- `ACME_URL`: **\<empty\>**: The CA's ACME directory URL, e.g. for a self-hosted [smallstep CA server](https://github.com/smallstep/certificates), it can look like `https://ca.example.com/acme/acme/directory`. If left empty, it defaults to using Let's Encerypt's production CA (check `LETSENCRYPT_ACCEPTTOS` as well).
351-
- `LETSENCRYPT_ACCEPTTOS`: **false**: This is an explicit check that you accept the terms of service for Let's Encrypt. By using Lets Encrypt **you must consent** to their [terms of service](https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf).
351+
- `ACME_ACCEPTTOS`: **false**: This is an explicit check that you accept the terms of service of the ACME provider. The default is Lets Encrypt [terms of service](https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf).
352352
- `ACME_DIRECTORY`: **https**: Directory that the certificate manager will use to cache information such as certs and private keys.
353353
- `ACME_EMAIL`: **\<empty\>**: Email used for the ACME registration. Usually it is to notify about problems with issued certificates.
354354
- `ACME_CA_ROOT`: **\<empty\>**: The CA's root certificate. If left empty, it defaults to using the system's trust chain.

docs/content/doc/usage/https-support.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,26 +57,27 @@ If you are using Docker, make sure that this port is configured in your `docker-
5757

5858
## Using ACME (Default: Let's Encrypt)
5959

60-
[ACME](https://tools.ietf.org/html/rfc8555) is a Certificate Authority standard protocol that allows you to automatically request and renew SSL/TLS certificates. [Let's Encrypt](https://letsencrypt.org/) is a free publicly trusted Certificate Authority server using this standard. Only `HTTP-01` and `TLS-ALPN-01` challenges are implemented. In order for ACME challenges to pass and verify your domain ownership, external traffic to the gitea domain on port `80` (`HTTP-01`) or port `443` (`TLS-ALPN-01`) has to be served by the gitea instance. Setting up [HTTP redirection](#setting-up-http-redirection) and port-forwards might be needed for external traffic to route correctly. Normal traffic to port `80` will otherwise be automatically redirected to HTTPS.
60+
[ACME](https://tools.ietf.org/html/rfc8555) is a Certificate Authority standard protocol that allows you to automatically request and renew SSL/TLS certificates. [Let's Encrypt](https://letsencrypt.org/) is a free publicly trusted Certificate Authority server using this standard. Only `HTTP-01` and `TLS-ALPN-01` challenges are implemented. In order for ACME challenges to pass and verify your domain ownership, external traffic to the gitea domain on port `80` (`HTTP-01`) or port `443` (`TLS-ALPN-01`) has to be served by the gitea instance. Setting up [HTTP redirection](#setting-up-http-redirection) and port-forwards might be needed for external traffic to route correctly. Normal traffic to port `80` will otherwise be automatically redirected to HTTPS. **You must consent** to the ACME provider's terms of service (default Let's Encrypt's [terms of service](https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf)).
6161

62-
If you are using the default Let's Encrypt **you must consent** to their [terms of service](https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf). Refer to the following configuration for the minimum setup:
62+
Minimum setup using the default Let's Encrypt:
6363
```ini
6464
[server]
6565
PROTOCOL=https
6666
DOMAIN=git.example.com
6767
ENABLE_ACME=true
68-
LETSENCRYPT_ACCEPTTOS=true
68+
ACME_ACCEPTTOS=true
6969
ACME_DIRECTORY=https
7070
;; Email can be omitted here and provided manually at first run, after which it is cached
7171
7272
```
7373

74-
For generic ACME setup, you are responsible to adhere to the terms of service of the ACME server you are configuring for. The following is an example configuration using [smallstep CA](https://github.com/smallstep/certificates), refer to [their tutorial](https://smallstep.com/docs/tutorials/acme-challenge) for more information.
74+
Minimumg setup using a [smallstep CA](https://github.com/smallstep/certificates), refer to [their tutorial](https://smallstep.com/docs/tutorials/acme-challenge) for more information.
7575
```ini
7676
[server]
7777
PROTOCOL=https
7878
DOMAIN=git.example.com
7979
ENABLE_ACME=true
80+
ACME_ACCEPTTOS=true
8081
ACME_URL=https://ca.example.com/acme/acme/directory
8182
;; Can be omitted if using the system's trust is preferred
8283
;ACME_CA_ROOT=/path/to/root_ca.crt

0 commit comments

Comments
 (0)