What is a Server Port?
A port is a network endpoint that allows connections to your server. Minecraft's default port is 25565, but you can change it to any available port.
Changing the Server Port
Step 1: Access Server Properties
- Log in to your panel
- Navigate to your Minecraft server
- Open the File Manager
- Locate and open
server.properties
Step 2: Modify the Port
- Find the
server-port=line - Change the port number:
server-port=25565
Change to your desired port, for example:
server-port=25566
- Save the file
Note
If you change the port, players must connect using your-server-ip:port. If using the default port (25565), players can connect without specifying the port.
Step 3: Restart Server
- Restart your server for changes to take effect
- The server will now listen on the new port
Important Notes
Port Range
- Valid ports: 1-65535
- Avoid well-known ports (below 1024)
- Recommended range: 25565-25600 for Minecraft
Make sure the port you choose is not already in use by another service, or your server won't start.
Make sure the port you choose is not already in use by another service, or your server won't start.
Player Connection
After changing the port, players must connect using:
your-server-ip:new-port
For example, if you changed to port 25566:
yourserver.com:25566
If using the default port (25565), players can connect without specifying the port.
Port Forwarding
When Port Forwarding is Needed
Port forwarding is typically handled by your hosting provider, but you may need to configure it if:
- Running a server on your own network
- Using a VPS with firewall restrictions
- Hosting from home
Configuring Port Forwarding
- Access Router: Log into your router's admin panel
- Find Port Forwarding: Locate port forwarding settings
- Add Rule: Create a new port forwarding rule:
- External Port: The port players will use
- Internal Port: Your server's port (usually same)
- Protocol: TCP (and UDP if needed)
- Internal IP: Your server's local IP address
- Save: Save the port forwarding rule
- Test: Test the connection
Panel Port Configuration
Some panels allow port configuration through the interface:
- Navigate to server settings
- Find Network or Port settings
- Change the port number
- Save changes
- Panel may handle port forwarding automatically
Firewall Configuration
Allowing Port Through Firewall
If you have firewall restrictions:
- Access Firewall Settings: In your panel or server settings
- Add Rule: Create firewall rule for your port
- Allow TCP: Allow TCP connections on your port
- Save: Apply firewall rules
Common Firewall Locations
- Panel firewall settings
- Server operating system firewall
- Network firewall
- Cloud provider security groups
Testing Port Configuration
Check if Port is Open
- Use online port checker tools
- Enter your server IP and port
- Check if port is accessible
- Verify from different networks
Test Connection
- Try connecting from Minecraft client
- Use the format:
server-ip:port - Verify connection succeeds
- Check server console for connection logs
Troubleshooting
Port Already in Use
If you get a "port already in use" error:
- Check Other Servers: Another server may be using the port
- Change Port: Use a different port number
- Stop Conflicting Service: Stop the service using the port
- Check Panel: Panel may have port restrictions
Players Can't Connect
- Verify Port: Check that port is correct in
server.properties - Check Firewall: Ensure firewall allows the port
- Verify Port Forwarding: Check port forwarding configuration
- Test Port: Use port checker to verify accessibility
- Check IP: Ensure players are using correct IP and port
Port Not Saving
- Verify Format: Ensure no extra spaces or characters
- Check Permissions: Verify file write permissions
- Restart Server: Changes require server restart
- Check Panel: Some panels override
server.properties
Multiple Servers on Same IP
If hosting multiple servers:
- Use Different Ports: Assign unique port to each server
- SRV Records: Use DNS SRV records for easier connection
- Proxy: Use a proxy server to route connections
- Document Ports: Keep track of which server uses which port
Best Practices
- Use Default When Possible: Default port (25565) is easiest for players
- Document Changes: Note any port changes
- Test After Changes: Always test connectivity after port changes
- Keep Ports Consistent: Don't change ports unnecessarily
- Secure Configuration: Ensure firewall is properly configured