# Help with Gitea Deployment – Reverse Proxy + HTTPS Issues

**URL:** <https://forum.gitea.com/t/help-with-gitea-deployment-reverse-proxy-https-issues/11446>\
**Category:** General\
**Created:** [June 25, 2025, 7:10am UTC](https://forum.gitea.com/t/help-with-gitea-deployment-reverse-proxy-https-issues/11446 "2025-06-25T07:10:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Romie](https://avatars.discourse-cdn.com/v4/letter/r/c5a1d2/32.png) [@Romie](https://forum.gitea.com/u/Romie)\
**Post date:** [June 25, 2025, 7:10am UTC](https://forum.gitea.com/t/help-with-gitea-deployment-reverse-proxy-https-issues/11446/1 "2025-06-25T07:10:40Z")

</div>

**moderator edit: This comment is possibly AI or spam due to how it needed to be modified**

Hi everyone,

I’ve been working on deploying Gitea (self-hosted) on a private VPS and running into some roadblocks with the reverse proxy and HTTPS setup. I’ve followed the official documentation and a few community guides, but I still can’t get things working quite right.

> [@TLS v1.3 HAProxy error TLS handshake error from : tls: client offered only unsupported versions: \[304\]](https://forum.gitea.com/t/tls-v1-3-haproxy-error-tls-handshake-error-from-tls-client-offered-only-unsupported-versions-304/11427):
>
> Hey, I was just trying to set up the reverse proxy with my haproxy on the pfsense and it immediately gave TLS errors. HAProxy is set to “Modern” which means it operates only on TLS v1.3 and AEAD ciphers. I have not played with ciphers config on my Gitea instance yet. Is it not possible to use TLSv1.3 with HAProxy without downgrading the reverse proxy to TLSv1.2? The docs say \* TLS 1.3 cipher suites \* "aes\_128\_gcm\_sha256" \* "aes\_256\_gcm\_sha384" \* "chacha20\_poly1305\_sha256" \* Aliased na…

Here’s a quick overview of my setup:

- Gitea version: 1.21.11
- Server: Ubuntu 22.04
- Reverse proxy: Nginx
- SSL: Let’s Encrypt (via Certbot)
- Installed Gitea as a service using the Linux binary

I’ve configured my domain and DNS correctly (A record pointing to server IP), and HTTPS certificates were successfully generated via Certbot. However, when I try to access Gitea via `https://mydomain.com`, I either get a 502 Bad Gateway error or the Gitea UI doesn’t load properly (CSS/js issues). The instance works fine on localhost via port 3000.

Here’s a snippet of my Nginx config:

nginx

CopyEdit

```auto
location / {
    proxy_pass http://localhost:3000;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
}

```

And in my `app.ini`, I’ve set:

ini

CopyEdit

```auto
ROOT_URL = https://mydomain.com/
PROTOCOL = http

```

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Salvora](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/salvora/32/6962_2.png) [@Salvora](https://forum.gitea.com/u/Salvora)\
**Post date:** [June 27, 2025, 10:59pm UTC](https://forum.gitea.com/t/help-with-gitea-deployment-reverse-proxy-https-issues/11446/2 "2025-06-27T22:59:06Z")

</div>

dunno why you pinged me but are you sure nothing else is using port 3000. Maybe try changing the HTTP\_PORT in app.ini and adjust nginx accordingly. And post your gitea logs
