---
title: "How to Make a Minecraft Server Public: Port Forwarding Guide"
description: "Make your Minecraft server public: forward port 25565, set a static IP, fix CGNAT and firewall problems, add a domain and keep it secure."
url: "https://www.zcraftstudios.com/blog/make-minecraft-server-public-port-forwarding"
updated: "2026-10-29T08:05:38.407341+00:00"
source: "ZCraft Studios"
---

> Site index for AI agents: https://www.zcraftstudios.com/llms.txt (full reference: https://www.zcraftstudios.com/llms-full.txt). Every page is available as Markdown by adding `.md` to its URL or sending `Accept: text/markdown`.

1. [Home](https://www.zcraftstudios.com/)
2. [Blog](https://www.zcraftstudios.com/blog)
3. How to Make a Minecraft Server Public: Port Forwarding Guide

[ All posts](https://www.zcraftstudios.com/blog)

# How to Make a Minecraft Server Public: Port Forwarding Guide

ZCraft StudiosOct 29, 2026

Make your Minecraft server public: forward port 25565, set a static IP, fix CGNAT and firewall problems, add a domain and keep it secure.

## In this guide

- [Before you start](#before-you-start)
- [Step 1: give the server PC a fixed local IP](#step-1-give-the-server-pc-a-fixed-local-ip)
- [Step 2: forward the port](#step-2-forward-the-port)
- [Step 3: allow the port in the firewall](#step-3-allow-the-port-in-the-firewall)
- [Step 4: test from outside](#step-4-test-from-outside)
- [Check for CGNAT](#check-for-cgnat)
- [Dynamic IP addresses](#dynamic-ip-addresses)
- [Add a domain](#add-a-domain)
- [Keep a public server safe](#keep-a-public-server-safe)
- [Troubleshooting](#troubleshooting)
- [Frequently asked questions](#frequently-asked-questions)
- [Related reading](#related-reading)

## How to Make a Minecraft Server Public: Port Forwarding Guide

**Quick answer:** to make a Minecraft Java server public from your own computer, give the server PC a fixed local IP, **forward TCP port 25565** on your router to that IP, allow the port in your firewall, then share your public IP address or a domain. If you are behind CGNAT or cannot change your router, use a hosting provider or a tunneling service instead.

## Before you start

| Check                          | Why                                                                                                             |
| ------------------------------ | --------------------------------------------------------------------------------------------------------------- |
| The server works at localhost  | Fix start-up problems first. See [How to Start a Minecraft Server](https://www.zcraftstudios.com/blog/start-minecraft-server)                |
| You can log into your router   | You need admin access to forward ports                                                                          |
| Your ISP gives you a public IP | CGNAT blocks port forwarding. See below                                                                         |
| You understand the risk        | A public server is exposed to the internet. See [Firewall Hardening](https://www.zcraftstudios.com/blog/minecraft-server-firewall-hardening) |

## Step 1: give the server PC a fixed local IP

Your router assigns local addresses that can change. If the server PC's address changes, your port forward points at the wrong machine.

1. Find the PC's local IP, for example in the network settings or with `ipconfig` on Windows or `ip a` on Linux.
2. In your router, create a **DHCP reservation** (also called static lease) for that PC's MAC address, or set a static IP on the PC outside the router's DHCP range.

## Step 2: forward the port

1. Open your router's admin page, usually the gateway address such as `192.168.0.1` or `192.168.1.1`.
2. Find **Port Forwarding**, **Virtual Server** or **NAT**.
3. Create a rule with these values:

| Field         | Value                           |
| ------------- | ------------------------------- |
| Protocol      | TCP for Java Edition            |
| External port | 25565                           |
| Internal port | 25565                           |
| Internal IP   | Your server PC's fixed local IP |

Bedrock Edition uses UDP, commonly port 19132\. See [Bedrock Crossplay Setup](https://www.zcraftstudios.com/blog/geyser-floodgate-bedrock-crossplay-setup).

If you changed `server-port` in `server.properties`, use that number. See [server.properties Explained](https://www.zcraftstudios.com/blog/minecraft-server-properties-explained).

## Step 3: allow the port in the firewall

Allow inbound TCP 25565 in the operating system firewall. On Linux with `ufw`:

```
sudo ufw allow 25565/tcp
```

On Windows, add an inbound rule for the port or for the Java program. Keep other ports closed.

## Step 4: test from outside

1. Find your public IP using a "what is my IP" site.
2. Ask a friend on another network to join with `<public-ip>:25565`, or use an online port checker while the server is running.
3. Testing from your own network may fail even if everything is right, because some routers do not support loopback (NAT hairpinning). Test with a phone on mobile data instead.

## Check for CGNAT

Compare the WAN IP shown in your router with the public IP from the website. If they differ, or the router shows an address starting with `100.64` to `100.127`, or a private range, your ISP uses **CGNAT** and you cannot receive inbound connections. Options:

| Option                       | Notes                                                                                                                                                        |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Ask your ISP for a public IP | Some offer it free or for a fee                                                                                                                              |
| Host with a provider         | See [Best Minecraft Server Hosting](https://www.zcraftstudios.com/blog/best-minecraft-server-hosting-2026) and [Free Minecraft Server Hosting](https://www.zcraftstudios.com/blog/free-minecraft-server-hosting-guide) |
| Use a VPS                    | See [Minecraft VPS Hosting Guide](https://www.zcraftstudios.com/blog/minecraft-vps-hosting-guide)                                                                                         |
| Use a tunneling service      | Services such as playit.gg forward traffic without router access. Review their terms and security                                                            |

## Dynamic IP addresses

Most home IPs change occasionally. Use a dynamic DNS service, or a domain that you update, so players do not need a new address each time.

## Add a domain

A domain is easier to share than an IP. Create an **A record** pointing to your IP. If you use a port other than 25565, add an **SRV record**. See [Custom Domain and SRV Records](https://www.zcraftstudios.com/blog/minecraft-server-dns-srv-record-guide).

## Keep a public server safe

1. Turn on the whitelist while you test. See [Whitelist Not Working?](https://www.zcraftstudios.com/blog/minecraft-server-whitelist-not-working).
2. Keep `online-mode=true` unless you run a secure login setup. See [Authentication Models](https://www.zcraftstudios.com/blog/minecraft-server-authentication-methods).
3. Do not forward RCON or database ports. See [RCON Security](https://www.zcraftstudios.com/blog/minecraft-server-rcon-security-guide).
4. Back up regularly. See [Backup Strategy](https://www.zcraftstudios.com/blog/minecraft-server-backup-strategy).
5. Prepare for bots. See [Join Spam Defense](https://www.zcraftstudios.com/blog/minecraft-server-antibot-join-spam-defense).
6. Install permissions and logging. See [Best Plugins by Category](https://www.zcraftstudios.com/blog/best-minecraft-plugins-by-category).

## Troubleshooting

| Symptom                        | Likely cause                                                                                               |
| ------------------------------ | ---------------------------------------------------------------------------------------------------------- |
| Works on LAN, not from outside | Port forward points to the wrong IP, or CGNAT                                                              |
| "Connection timed out"         | Firewall or router rule missing                                                                            |
| "Connection refused"           | Server not running, or wrong port. See [Connection Refused](https://www.zcraftstudios.com/blog/minecraft-server-connection-refused-fix) |
| Works for you, not friends     | Test from outside your network                                                                             |
| IP keeps changing              | Use dynamic DNS or a domain                                                                                |

More in [Port 25565 Not Working](https://www.zcraftstudios.com/blog/minecraft-server-port-25565-not-working).

## Frequently asked questions

**How do I make my Minecraft server public?** Forward port 25565 on your router to the server PC, allow it in the firewall and share your public IP or domain.

**Is port forwarding safe?** It exposes one port to the internet. Keep the server updated, use a whitelist or protections, and close other ports.

**Do I need to forward UDP?** Not for Java Edition. Bedrock uses UDP.

**Can I host without port forwarding?** Yes, with a hosting provider, a VPS or a tunneling service.

**Can I make a Minecraft server public for free?** Yes, from your own PC if your ISP allows port forwarding. Free hosts also exist.

## Related reading

- [Minecraft Server Won't Start: Errors and Fixes](https://www.zcraftstudios.com/blog/minecraft-server-wont-start-errors-fixes)
- [Minecraft Server Commands List](https://www.zcraftstudios.com/blog/minecraft-server-commands-list)
- [Choosing a Minecraft Server Host](https://www.zcraftstudios.com/blog/choosing-minecraft-server-host)

## Continue reading

- [How to Make a Modded Minecraft Server: Fabric and NeoForge](https://www.zcraftstudios.com/blog/how-to-make-a-modded-minecraft-server)
- [How to Make a Lifesteal SMP Server: Plugins, Setup, Rules](https://www.zcraftstudios.com/blog/how-to-make-a-lifesteal-smp-server)
- [Velocity Modern Forwarding Setup and Security Checklist](https://www.zcraftstudios.com/blog/velocity-modern-forwarding-setup-checklist)
- [Minecraft Port 25565 Not Working: Router and Firewall](https://www.zcraftstudios.com/blog/minecraft-server-port-25565-not-working)

[ Previous guide Minecraft Server Won't Start: Errors and Fixes (Java, EULA)](https://www.zcraftstudios.com/blog/minecraft-server-wont-start-errors-fixes)[ Next guide Protect Spawners From Theft, Dupes and Abuse](https://www.zcraftstudios.com/blog/protect-spawners-theft-duplication-abuse)

<script type="application/ld+json">{"@context":"https://schema.org","@type":"Organization","@id":"https://www.zcraftstudios.com/#organization","name":"ZCraft Studios","alternateName":["ZCS","ZCraft","ZCraftStudios"],"logo":{"@type":"ImageObject","url":"https://www.zcraftstudios.com/favicon-192.png","width":192,"height":192},"image":{"@type":"ImageObject","url":"https://www.zcraftstudios.com/favicon-192.png","width":192,"height":192},"url":"https://www.zcraftstudios.com","description":"ZCraft Studios (ZCS) creates Minecraft plugins, server configs and tools. Browse resources, compatibility details and setup guides.","email":"Support@zcraftstudios.com","slogan":"Minecraft resources, configurations and custom server development.","knowsAbout":["Minecraft plugins","Minecraft server configuration","Java plugin development","Minecraft server optimization"],"sameAs":["https://dsc.gg/zcraftstudios","https://x.com/ZCraftNetwork","https://www.youtube.com/@zcraft_studios","https://www.instagram.com/ZCraftStudios"],"contactPoint":[{"@type":"ContactPoint","contactType":"customer support","email":"Support@zcraftstudios.com","availableLanguage":["English"],"areaServed":"Worldwide"}]}</script>
<script type="application/ld+json">{"@context":"https://schema.org","@type":"WebSite","@id":"https://www.zcraftstudios.com/#website","url":"https://www.zcraftstudios.com","name":"ZCraft Studios","alternateName":["ZCS","ZCraft"],"description":"ZCraft Studios (ZCS) creates Minecraft plugins, server configs and tools. Browse resources, compatibility details and setup guides.","inLanguage":"en","publisher":{"@type":"Organization","@id":"https://www.zcraftstudios.com/#organization","name":"ZCraft Studios","url":"https://www.zcraftstudios.com"}}</script>
<script type="application/ld+json">{"@context":"https://schema.org","@type":"BlogPosting","@id":"https://www.zcraftstudios.com/blog/make-minecraft-server-public-port-forwarding#article","headline":"How to Make a Minecraft Server Public: Port Forwarding Guide","url":"https://www.zcraftstudios.com/blog/make-minecraft-server-public-port-forwarding","mainEntityOfPage":"https://www.zcraftstudios.com/blog/make-minecraft-server-public-port-forwarding","isPartOf":{"@type":"WebSite","@id":"https://www.zcraftstudios.com/#website","name":"ZCraft Studios","url":"https://www.zcraftstudios.com"},"speakable":{"@type":"SpeakableSpecification","cssSelector":["h1","main"]},"description":"Make your Minecraft server public: forward port 25565, set a static IP, fix CGNAT and firewall problems, add a domain and keep it secure.","datePublished":"2026-10-29T08:05:38.407341+00:00","dateModified":"2026-10-29T08:05:38.407341+00:00","author":{"@type":"Organization","@id":"https://www.zcraftstudios.com/#organization","name":"ZCraft Studios","url":"https://www.zcraftstudios.com/about"},"publisher":{"@type":"Organization","@id":"https://www.zcraftstudios.com/#organization","name":"ZCraft Studios","url":"https://www.zcraftstudios.com","logo":{"@type":"ImageObject","url":"https://www.zcraftstudios.com/favicon-192.png","width":192,"height":192}},"inLanguage":"en","image":"https://www.zcraftstudios.com/api/og/blog/make-minecraft-server-public-port-forwarding?v=1uiylei"}</script>
<script type="application/ld+json">{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://www.zcraftstudios.com/"},{"@type":"ListItem","position":2,"name":"Blog","item":"https://www.zcraftstudios.com/blog"},{"@type":"ListItem","position":3,"name":"How to Make a Minecraft Server Public: Port Forwarding Guide","item":"https://www.zcraftstudios.com/blog/make-minecraft-server-public-port-forwarding"}]}</script>
