# Ports for gitea and gitlfs?

**URL:** <https://forum.gitea.com/t/ports-for-gitea-and-gitlfs/11707>\
**Category:** Install/Maintain/Configure\
**Created:** [September 23, 2025, 7:47pm UTC](https://forum.gitea.com/t/ports-for-gitea-and-gitlfs/11707 "2025-09-23T19:47:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![talmage](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/talmage/32/7106_2.png) [@talmage](https://forum.gitea.com/u/talmage)\
**Post date:** [September 23, 2025, 7:47pm UTC](https://forum.gitea.com/t/ports-for-gitea-and-gitlfs/11707/1 "2025-09-23T19:47:56Z")

</div>

I’m working on my ufw firewall rules and I want to be sure that ufw permits the traffic I want and denies the rest. Please advise me.

My gitea instance runs on a server in my DMZ. It listens on port 3000. Is that enough? I have an old firewall rule that forwards traffic on ports in the range 3000-5997 to the gitea server. Is that necessary?

---

<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:** [September 23, 2025, 8:00pm UTC](https://forum.gitea.com/t/ports-for-gitea-and-gitlfs/11707/2 "2025-09-23T20:00:37Z")

</div>

> [@talmage](#):
>
> It listens on port 3000

That is most unusual. Normally that port stays closed to the internet and you allow proxied access using HTTPS on TCP port 443.

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

---

<div class="post-metadata">

**Author:** ![talmage](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/talmage/32/7106_2.png) [@talmage](https://forum.gitea.com/u/talmage)\
**Post date:** [September 24, 2025, 1:01pm UTC](https://forum.gitea.com/t/ports-for-gitea-and-gitlfs/11707/3 "2025-09-24T13:01:00Z")

</div>

Thanks. I’ll look into the reverse proxy. I set up gitea on port 3000 because I didn’t know about reverse proxying for gitea.

I still don’t know why my firewall has that range of ports open for 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:** [September 24, 2025, 2:56pm UTC](https://forum.gitea.com/t/ports-for-gitea-and-gitlfs/11707/4 "2025-09-24T14:56:46Z")

</div>

Gitea listens on port 3000, but you normally don’t want to expose that port to the internet, hence the standard practice of proxying HTTPS to it.

> [@talmage](#):
>
> I still don’t know why my firewall has that range of ports open for gitea.

Wouldn’t you have had to open those ports?

---

<div class="post-metadata">

**Author:** ![talmage](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/talmage/32/7106_2.png) [@talmage](https://forum.gitea.com/u/talmage)\
**Post date:** [September 24, 2025, 10:05pm UTC](https://forum.gitea.com/t/ports-for-gitea-and-gitlfs/11707/5 "2025-09-24T22:05:23Z")

</div>

Yes, certainly port 3000. I’m not sure why I opened ports 3001 through 5997. I can’t find any documentation on that.
