# How to apply ssl to Gitea.

**URL:** <https://forum.gitea.com/t/how-to-apply-ssl-to-gitea/9535>\
**Category:** General\
**Created:** [August 2, 2024, 1:51am UTC](https://forum.gitea.com/t/how-to-apply-ssl-to-gitea/9535 "2024-08-02T01:51:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![shripad.aier](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/shripad.aier/32/6144_2.png) [@shripad.aier](https://forum.gitea.com/u/shripad.aier)\
**Post date:** [August 2, 2024, 1:51am UTC](https://forum.gitea.com/t/how-to-apply-ssl-to-gitea/9535/1 "2024-08-02T01:51:57Z")

</div>

How to apply ssl to Gitea.  
We have a Gitea Server running on the Windows platform. We have renewed our SSL certificate from GoDaddy and need information on how to apply it to Gitea.

---

<div class="post-metadata">

**Author:** ![linkp](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/linkp/32/4833_2.png) [@linkp](https://forum.gitea.com/u/linkp)\
**Post date:** [August 2, 2024, 5:34am UTC](https://forum.gitea.com/t/how-to-apply-ssl-to-gitea/9535/2 "2024-08-02T05:34:59Z")

</div>

The best method is to use a reverse proxy.

> **[Reverse Proxies | Gitea Documentation](https://docs.gitea.com/administration/reverse-proxies)**
>
> General configuration

---

<div class="post-metadata">

**Author:** ![davvvidmilller](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/davvvidmilller/32/6135_2.png) [@davvvidmilller](https://forum.gitea.com/u/davvvidmilller)\
**Post date:** [August 2, 2024, 5:36am UTC](https://forum.gitea.com/t/how-to-apply-ssl-to-gitea/9535/3 "2024-08-02T05:36:48Z")

</div>

Hi @shripad.aier

To apply an SSL certificate to your Gitea server on Windows, follow these steps:

**Convert your SSL certificate to PEM format** ::- if it isn’t already. You can use tools like OpenSSL for this conversion.  
**Edit your Gitea configuration file** (usually `app.ini`) and set the `[server]` section with the paths to your SSL certificate and key :-

```auto
[server]
PROTOCOL = https
CERT_FILE = /path/to/your/certificate.pem
KEY_FILE = /path/to/your/private.key

```

**Restart your Gitea server** to apply the changes.

Ensure your Gitea instance has the correct permissions to access the certificate files.

Thanks 😀

---

<div class="post-metadata">

**Author:** ![shripad.aier](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/shripad.aier/32/6144_2.png) [@shripad.aier](https://forum.gitea.com/u/shripad.aier)\
**Post date:** [August 2, 2024, 6:40am UTC](https://forum.gitea.com/t/how-to-apply-ssl-to-gitea/9535/4 "2024-08-02T06:40:13Z")

</div>

Thanks for the update.

Can you tell me where to generate CSR in the Gitea server so that I can get a private key?  
Gitea is an AWS Windows Server.

---

<div class="post-metadata">

**Author:** ![shripad.aier](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/shripad.aier/32/6144_2.png) [@shripad.aier](https://forum.gitea.com/u/shripad.aier)\
**Post date:** [August 3, 2024, 6:08am UTC](https://forum.gitea.com/t/how-to-apply-ssl-to-gitea/9535/5 "2024-08-03T06:08:04Z")

</div>

> [@shripad.aier](#):
>
> Can you tell me where to generate CSR in the Gitea server so that I can get a private key?  
> Gitea is an AWS Windows Server.

Can you tell me where to generate CSR in the Gitea server so that I can get a private key?  
Gitea is an AWS Windows Server.
