forgejo-federation/docs/content/doc/usage/https-support.md
Jonas Franz fb1daad13d Add how-to for enabling HTTPS (#4101)
Signed-off-by: Jonas Franz <info@jonasfranz.de>
2018-06-03 09:55:23 +08:00

1.4 KiB

date title slug weight toc draft menu
2018-06-02T11:00:00+02:00 Usage: HTTPS setup https-setup 12 true false
sidebar
parent name weight identifier
usage HTTPS setup 12 https-setup

HTTPS setup to encrypt connections to Gitea

Using built-in server

Before you enable HTTPS make sure that you have valid SSL/TLS certificates. You could use self-generated certificates for evaluation and testing. Please run gitea cert --host [HOST] to generate a self signed certificate.

To use Gitea's built-in HTTPS support you must change your app.ini file:

[server]
PROTOCOL=https
ROOT_URL = `https://git.example.com:3000/`
HTTP_PORT = 3000
CERT_FILE = cert.pem
KEY_FILE = key.pem

To learn more about the config values, please checkout the Config Cheat Sheet.

Using reverse proxy

Setup up your reverse proxy like shown in the reverse proxy guide.

After that, enable HTTPS by following one of these guides:

Note: You connection between your reverse proxy and gitea might be unencrypted. To encrypt it too follow the built-in server guide and change the proxy url to https://[URL].