October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
VGSources
Blog

Valheim Server Ports: What to Open and How to Forward Them

A practical guide to Valheim dedicated-server networking: forward UDP 2456 and 2457 for the default Steam backend, match custom -port values, configure the host firewall, and understand the Crossplay relay exception.
Length9 min Posted Quest giverVGSources Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a standard Steam-backend Valheim dedicated server, forward UDP ports 2456 and 2457 from your router to the computer running the server, then allow the server through that computer’s firewall. Valheim uses the port set with -port and the immediately following port. If you start the server with -crossplay, its relay backend removes the need for inbound router forwarding for players connecting from outside your local network.

The ports Valheim uses

Valheim’s dedicated server does not use one isolated port. Iron Gate’s server guide states that the server uses the configured port and Port+1. With the default setting, -port 2456, that means the range is:

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Setting Port Protocol What to do
Configured server port 2456 by default UDP Forward it to the server computer
Following port 2457 by default UDP Forward it to the same computer

These are inbound rules on your home router. They are separate from the operating-system firewall on the server computer, which must also permit the Valheim server executable or the same UDP traffic.

Why two UDP ports are required

The server’s command-line port is the first value in the range; Valheim also uses the next port. Forwarding only 2456 leaves part of the server’s network traffic unavailable and can produce a server that appears online locally but cannot be joined reliably from the internet. A correct default rule therefore forwards both UDP 2456 and UDP 2457 to the same local address.

#1 Best Overall
Sale
Gaoye Blue Light Blocking Glasses
  • BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
  • EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
  • COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
  • LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
  • WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.

When the numbers are different

If you change the command-line value, the router rules must change with it. For example, a server started with -port 3000 uses UDP 3000 and UDP 3001. Do not forward the default pair while the server is listening on another pair; the router configuration and the server command must match exactly.

Steam backend versus Crossplay

The forwarding requirement depends on the backend selected when the server starts.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Setup External network path Router forwarding Typical join method
Steam backend Direct inbound connection to the host network Forward the configured UDP port and the next port; allow the server through the host firewall Server list or the host’s public address and configured port
Crossplay backend Relay server carries traffic between players and the host No inbound port forwarding is required for access from outside the local network Supported server-list or join-code flow

Iron Gate describes the Crossplay exception explicitly: when -crossplay is enabled, the server transmits data through a relay server and therefore does not require port forwarding to be accessible from outside the local network. The server still has a configured port internally, and the host operating system still has to let the server run. Crossplay also enables participation by players on other supported platforms when it is configured appropriately.

Do not apply the Steam-backend forwarding instructions automatically to a Crossplay server. First check the startup arguments and identify which backend you intend to use.

Rank #2
Windex Gaming Cleaning Wipes, Pre-Moistened Wipes to Instantly Clean all Gaming Gear and Electronics, Resealable Packaging for a Freshness Lock, 25 count (Pack of 1)
  • WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
  • AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
  • PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
  • ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
  • COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed

What to prepare before changing the router

1. Confirm the startup arguments

Find the launch script, shortcut, or service definition that starts the dedicated server. Record the value after -port, or confirm that it is using the default 2456. Also note whether -crossplay is present. This prevents a common mismatch in which a router rule is built for 2456–2457 while the server is listening on a custom pair.

2. Give the server computer a stable local address

Port forwarding points to a private address such as 192.168.1.50. If the router later gives that computer a different address through DHCP, the forwarding rule continues to point at the old device and outside players cannot connect. Create a DHCP reservation in the router, or otherwise assign a stable local address using the router and operating-system documentation. The exact menu name varies by router and firmware.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

3. Keep the server machine available

Forwarding does not start the game server or wake a sleeping computer. The dedicated server process must be running, and the machine must remain connected to the local network. If the computer is shut down, disconnected, or moved to another network, the forwarding rule has no active destination.

4. Identify the router that owns the public connection

The forwarding rule must be created on the device performing NAT for the internet connection. In a simple home network this is usually the only router. If you have an ISP gateway plus a second personal router, both devices may be routing; that arrangement can require forwarding through each NAT layer or switching one device to bridge/access-point mode. Router interfaces differ, so use the manual for the exact model rather than assuming that labels or screens are identical.

Rank #3
Sale
LISEN Cell Phone Stand Phone Holder for Desk, Office Decor Gadgets for Men
  • Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
  • Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
  • Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
  • ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
  • Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)

How to forward the default Steam ports

The labels differ among router vendors, but the network logic is the same. Look for a page named Port Forwarding, NAT, Virtual Server, or a similar term.

  1. Start the dedicated server with the intended port. For the default Steam setup, use -port 2456. Decide at this point whether -crossplay should be enabled.
  2. Open the router’s forwarding page. Sign in to the router administration interface and open its port-forwarding or NAT section. If the router offers an application preset, verify that it creates UDP rules; a generic game preset is not proof that the correct ports were selected.
  3. Create a UDP rule for 2456. Set the external or public port to 2456, the internal or private port to 2456, choose UDP, and set the destination to the server computer’s reserved local IP address.
  4. Create a second UDP rule for 2457. Use the same destination IP address and UDP protocol, with 2457 as both the external and internal port unless your router specifically separates those fields.
  5. Save and apply the configuration. Some routers apply immediately; others require an explicit save, apply, or reboot. Do not change the destination address after saving unless you also update the forwarding rules.
  6. Allow the server through the host firewall. Accept the operating-system prompt for the dedicated server executable, or create equivalent inbound UDP allowances for 2456 and 2457. The router can deliver a packet to the computer, but the host firewall can still reject it.
  7. Restart or reload the server if needed. If you changed the command-line port, restart the process so it actually binds to the new value. Then confirm that the startup output or server configuration reflects the same pair you entered in the router.

Operating-system firewall rules

Windows

When Windows asks whether to allow the Valheim dedicated server through the firewall, permit it on the network profile used by the server. If the prompt was dismissed, open Windows Defender Firewall with Advanced Security and add an inbound rule for the server executable, or for UDP ports 2456 and 2457. Keep the rule limited to the required executable, protocol, and ports rather than disabling the firewall entirely.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Linux

Linux distributions and firewall tools differ. Add equivalent inbound UDP allowances for the configured port and the following port in the firewall framework used by that installation, then reload the rules. The exact command depends on whether the system uses a distribution firewall frontend, nftables, or another ruleset, so follow that system’s documentation. The important values remain the same: UDP -port and UDP -port+1.

How players connect

Steam backend

Steam-backend players can look for the server in the appropriate server list or use the host’s public address together with the configured port when the join interface supports direct addressing. They must not use the server computer’s private address, such as a 192.168.x.x or 10.x.x.x address, when they are outside the home network; those addresses are local-only.

Rank #4
Ledagic IC+RGBW USB Powered Led Light Bar with App & Remote Control, 2 Pack
  • Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
  • Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
  • 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
  • Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
  • USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC

Players on the same home network may be able to connect using a local address even when internet access is misconfigured. That is not proof that forwarding works. Test the actual path your friends will use, from outside the local network, after the server is running.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Crossplay backend

For a server started with -crossplay, use the supported server-list or join-code workflow. The relay design is intended to provide outside access without an inbound router rule. A local or loopback address is not the outside-access method described by Iron Gate’s guide.

Custom ports: a reliable rule for any value

Changing the port is acceptable when another service already uses 2456 or when your network plan calls for a different value. Apply the same formula every time:

  • Read the value after -port.
  • Forward UDP on that value.
  • Forward UDP on the next integer.
  • Point both rules to the server computer’s stable local IP.
  • Allow the same pair through the host firewall.

For example, -port 4000 requires UDP 4000 and UDP 4001. If the router rule says 4000–4001 but the launch script still says 2456, the server and router are not describing the same service. Keep a written record of the chosen value if several people administer the network.

Best Value
Sale
HUANUO FlowLift™ Dual Monitor Stand, Fully Adjustable Gaming Monitor Desk Mount for 13–32″ Computer Screens, Full Motion VESA 75x75/100x100 with C-Clamp & Grommet Base, Each Arm Holds 4.4 to 19.8 lbs
  • Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
  • Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
  • Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
  • Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
  • Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshooting connection failures

The server is visible locally but not to friends

  • Confirm that the friends are testing from outside the home network. A local test can succeed without proving internet forwarding.
  • Check the startup arguments and compare the actual -port value with every router rule.
  • Verify that both ports are UDP, not TCP-only.
  • Check that both rules target the current local IP of the server computer.
  • Confirm that the dedicated server process is still running and has not stopped after an error.
  • Review the operating-system firewall and allow the executable or the required UDP pair.

It worked until the computer or router restarted

The most likely cause is a changed private IP address. Recheck the computer’s current local address and create or repair a DHCP reservation. Also verify that the router retained the rules after applying or rebooting.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Only one port was forwarded

Valheim uses the configured port and the next port. Add the missing UDP rule to the same destination. Forwarding 2456 alone is incomplete for the default configuration.

The server uses a custom port

Do not assume that 2456–2457 still apply. Read the command line, calculate the next port, and update both router and firewall rules. Restart the server after changing the command line.

Crossplay players still cannot join

Check that -crossplay is actually present in the running server’s launch configuration and that players are using the supported server-list or join-code path. The relay removes the need for inbound router forwarding, but it does not compensate for a stopped server, a blocked host process, or an incorrectly configured join method.

Nothing works despite correct local settings

Some internet connections do not provide a directly reachable public IPv4 address. Carrier-grade NAT (CGNAT) at the ISP can prevent unsolicited inbound connections even when the home router rules are correct. Iron Gate’s guide does not provide a universal workaround for ISP-level NAT. Ask the ISP whether inbound connections or a public address are available, or use a hosted server that supplies the required external connectivity.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Home hosting versus rented hosting

Consideration Home-hosted server Rented or managed Valheim server
Router access Requires control of NAT and, for Steam backend, UDP forwarding Usually avoids changes to your home router
Machine availability Your computer and network must stay online Provider keeps the server infrastructure online according to its service terms
Maintenance You handle the OS, firewall, updates, and network troubleshooting Some operational work is handled by the provider; exact responsibility varies
Connectivity limitation CGNAT or restrictive ISP policies can block inbound access A hosted service can be an alternative when the home connection cannot accept inbound traffic

Rented or managed hosting is practical when you cannot configure the router, share the network with someone who controls it, or keep a home machine online. Check the provider’s current platform support, backup policy, access controls, and port configuration before signing up; those details are service-specific and are not established by Valheim’s port documentation.

Security and maintenance checklist

  • Forward only the required UDP pair for the configured port.
  • Keep the destination on a reserved local IP so the rule cannot silently point at another device.
  • Allow the server executable or required UDP ports through the host firewall instead of disabling the firewall.
  • Record whether the server uses Steam or Crossplay, because the external network path is different.
  • After changing -port or adding -crossplay, restart the server and recheck the matching settings.
  • Remove obsolete forwarding rules when you stop using a custom port or retire the server.
  • If the ISP uses CGNAT, treat that as an upstream connectivity limitation rather than repeatedly rebuilding the same local rules.

Quick reference

Question Answer
What are the default Valheim server ports? UDP 2456 and UDP 2457 for the default Steam backend.
What if I use -port N? Forward UDP N and UDP N+1 to the server computer.
Do I need port forwarding with -crossplay? Not for outside access through the Crossplay relay backend.
Is forwarding enough? No. The server must be running, the destination IP must be correct, and the host firewall must permit the server.
Why can’t friends connect although local players can? Check the public path, both UDP rules, the current local IP, the firewall, and possible ISP CGNAT.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.