Stardew Valley Co-op Won't Connect? Here's the Fix
Most Stardew Valley co-op failures come down to three things: the players are on different game versions, they have mismatched mods (SMAPI), or the connection is being blocked so the invite code never resolves. The fastest fix: make sure both players are on the same version and same mods, then have the host open the farm to invitations (co-op menu) and share the invite code — joining by invite code over Steam avoids IP and port problems entirely. Steps below, in order.
Stardew Valley co-op — ports and invite fixes
- Ports
TCP+UDP 24642 (forward range 24642-24648 to be thorough)- No invite-code option
Means the game can't reach your Steam/GOG account — ensure the launcher is open and logged in- Fresh-invite fix
After 5 min of trouble, everyone leaves, reopen the host save via Co-op, send a new invite- Odd gotcha
Profanity in a Steam username has blocked some players from connecting
Last verified: September 2026
Error codes
Failed to connect to server / invite code not working
The client couldn't establish the co-op session with the host
Cause: Version mismatch, mismatched SMAPI mods, or the host's connection blocking the peer-to-peer session.
- Both players update to the same Stardew Valley version on the same platform.
- If either uses mods, both must run SMAPI with the SAME multiplayer-compatible mods installed.
- Host opens the farm: load save > co-op menu inside the game, choose to accept new players, copy the invite code.
- Join with the invite code (not IP) so the connection is brokered through the platform.
Connection lost after loading
The session dropped during or right after the farm loaded
Cause: Firewall/antivirus killing the connection, or an unstable NAT between the two players.
- Allow Stardew Valley (and StardewModdingAPI.exe if using SMAPI) through Windows Firewall.
- For LAN, both players must be on the same network; use the local IP shown in the co-op menu.
- For a dedicated setup, forward UDP port 24642 to the host machine.
Fixes that work for most Stardew Valley errors
- Match versions AND mods: same Stardew Valley build, and identical SMAPI mod lists if any mods are used.
- Use invite codes: host opens the farm to co-op and shares the invite code; the guest enters it under Co-op > Join.
- Allow the game and StardewModdingAPI.exe through the host's firewall and antivirus.
- Verify game files on both PCs: Steam > Properties > Installed Files > Verify integrity of game files.
- For LAN play, use the local IP from the co-op screen and confirm both machines are on the same router.
- If hosting a dedicated server, forward UDP port 24642 to the host and allow it through the firewall.
- Restart both Stardew Valley clients after any update so both are on the same synced build before retrying.
FAQ
Why can't I join my friend's Stardew Valley farm?
Usually you're on different game versions or you have mismatched mods. Confirm both are on the same version, and if either uses SMAPI mods the mod lists must match exactly, then join with the invite code.
Do mods break Stardew Valley co-op?
Only if the players' mods differ. Both players must run SMAPI with the same set of multiplayer-compatible mods; a single mismatched or host-only mod can block the join.
What port does Stardew Valley multiplayer use?
UDP port 24642. You only need to forward it for a dedicated server or if invite codes fail; normal invite-code co-op is brokered through the platform and needs no port forwarding.
The invite code isn't working — what next?
Have the host re-open the farm to co-op to generate a fresh code, confirm both versions match, and allow the game through the firewall. Then join under Co-op > Enter Invite Code.
Other games
- AION 2 Error Codes — Login Server, PURPLE Launcher, Queue & Connection Fixes (Launch 2026)
- WARDOGS ошибка WD-L014 — как исправить (ранний доступ 2026)
- Diablo 4 ошибка 300008 — коды входа Сезона 15 и как исправить
- NBA 2K27 Error Codes — 727E66AC, EFEAB30C & Server Connection Fixes
- BattlEye Error Codes — Failed to Update, Query Timed Out, 'Client Not Responding' & Launch Fixes
- Warzone Error Codes — Diver, Vivacious, Marlin, Fuego, BLZBNTBGS & Dev Error Fixes
- Discord Error Codes — Update Failed Loop, JavaScript Error, Installation Has Failed, RTC Connecting Fixes
- Easy Anti-Cheat Error Codes — 20006, 30005, 10011, 'Untrusted System File' & Launch Fixes