Port Configuration
Checked on 14 October 2026 against the Vintage Story 1.22.7 server.
Proper port configuration is essential for players to connect to your Vintage Story server. This guide covers port settings, firewall configuration, and troubleshooting connectivity issues.
Port Requirements
Vintage Story server requires the following port configuration:
- Default Port: 42420, the same number for TCP and UDP
- TCP: always required; it carries the connection itself
- UDP (version 1.20+): carries movement updates. If no UDP packets get through, the server moves that player's position updates to TCP (the server log says UDP: Server did not receive any UDP packets), so the game still works, but open UDP too for smoother movement
- Versions before 1.20: TCP only
On a Supercraft server the port is assigned and opened for you: connect with the address and port shown in the server panel, and skip the router and firewall steps below.
Changing the Default Port
To use a different port:
- Open
serverconfig.json - Find the Port setting:
{
"Port": 42420
}
- Change to your desired port number
- Save and restart the server
- Update firewall and router rules accordingly
A --port argument when you start the server overrides the file, and --ip (or the Ip setting) binds it to a single address; by default it listens on all of them.
Firewall Configuration
Windows Firewall
- Open Windows Defender Firewall with Advanced Security
- Click "Inbound Rules" in the left panel
- Click "New Rule" in the right panel
- Select "Port" and click Next
- Select "TCP" and enter port 42420
- Select "Allow the connection"
- Apply to all profiles (Domain, Private, Public)
- Name the rule "Vintage Story Server TCP"
- Repeat steps 3-8 for UDP protocol
Linux Firewall (UFW)
For Ubuntu/Debian systems:
sudo ufw allow 42420/tcp
sudo ufw allow 42420/udp
sudo ufw reload
sudo ufw status
Linux Firewall (firewalld)
For CentOS/RHEL systems:
sudo firewall-cmd --permanent --add-port=42420/tcp
sudo firewall-cmd --permanent --add-port=42420/udp
sudo firewall-cmd --reload
sudo firewall-cmd --list-all
Router Port Forwarding
If hosting from behind a router, configure port forwarding:
Finding Your Local IP
Windows:
ipconfig
Look for "IPv4 Address" under your active connection
Linux/Mac:
ifconfig
Look for "inet" address under your active interface
Configuring Port Forwarding
- Access your router admin panel (usually 192.168.1.1 or 192.168.0.1)
- Find "Port Forwarding" or "Virtual Server" section
- Create a new port forwarding rule:
- Service Name: Vintage Story Server
- External Port: 42420
- Internal Port: 42420
- Internal IP: Your server's local IP address
- Protocol: TCP and UDP (or Both)
- Save and apply the configuration
- Restart router if required
Routers with UPnP or NAT-PMP can open the port for you. /serverconfig upnp true makes the server ask for the port forward every time it runs, and /upnp on does it for the current session only. Since 1.22, /serverconfig upnpinfinitelifetime true asks for a mapping that does not expire; otherwise the server renews it every 10 minutes. Not every router honors these requests.
Testing Port Accessibility
Internal Testing
- Start your Vintage Story server
- On the same network, try connecting with:
localhost:42420
or your local IP:
192.168.1.x:42420
External Testing
- Find your public IP at whatismyipaddress.com
- Use an online port checker tool
- Test with both TCP and UDP protocols
- Have a friend try connecting from outside your network
Troubleshooting Connection Issues
Server Not Visible in Browser
If your server doesn't appear in the server list:
- Turn on advertising: a new server is not listed publicly. Use
/serverconfig advertise true, or set"AdvertiseServer": trueinserverconfig.json - Verify port forwarding is configured correctly
- Check firewall allows both TCP and UDP
- Ensure server is actually running
- Try direct connect with IP:Port instead
- Check if your ISP blocks incoming connections
Connection Timeout
If connections time out:
- Confirm the TCP port is open; a blocked UDP port alone does not stop players connecting
- Verify router port forwarding settings
- Check if server is overloaded (high CPU/RAM)
- Try temporarily disabling firewall to test
- Ensure no VPN is interfering
Players on Same Network Can't Connect
For local network connections:
- Use local IP address (192.168.x.x) not public IP
- Verify local firewall allows connections
- Check if server is bound to correct network interface
- Try using
localhost:42420if on same machine
Multiple Servers on Same Machine
To run multiple Vintage Story servers:
- Configure each server with a different port:
Server 1: Port 42420
Server 2: Port 42421
Server 3: Port 42422
- Forward each port separately in your router
- Create separate firewall rules for each port
- Use different data directories for each server, by starting each one with its own
--dataPath
Dynamic DNS Setup
If your ISP provides a dynamic IP address:
- Sign up for a free Dynamic DNS service (e.g., No-IP, DuckDNS)
- Create a hostname (e.g., myserver.ddns.net)
- Install the DDNS client on your server
- Configure it to update your IP automatically
- Share the hostname instead of IP address
Security Considerations
- Password Protection: Set a server password for public servers
- Whitelist: Consider using a whitelist for private servers
- Regular Updates: Keep server software updated
- Monitor Logs: Watch for suspicious connection attempts
- Limit Exposure: Only forward necessary ports
Version-Specific Changes
Version 1.20 and Later
Starting with version 1.20, Vintage Story uses UDP as well as TCP on the same port, falling back to TCP when UDP is blocked:
- Update firewall rules to include UDP
- Add UDP port forwarding in router
- Test both protocols after upgrade
Pre-1.20 Versions
Older versions only needed TCP:
- TCP port 42420 is sufficient
- UDP configuration optional
Looking for managed Vintage Story server hosting? Supercraft runs Vintage Story dedicated servers with daily backups, instant setup, and 4 region options.
Build it the easy way: our free Vintage Story World Configuration Generator turns presets plus a simple form into a ready-to-paste WorldConfiguration for serverconfig.json, plus the matching live /worldconfig commands. Paste an existing config to see how it differs from a preset.