Comprehensive Guide To Stardew Valley Invite Codes: How To Host And Join Multiplayer Farms
To generate an invite code in Stardew Valley, the host must launch a multiplayer session through the Co-op menu and ensure the farm contains at least one vacant cabin for each guest. Once the world is loaded, the invite code is retrieved via the Options tab under the Multiplayer section, appearing as a unique alphanumeric string that allows players on Steam and GOG to connect regardless of their friend list status.
Technical Infrastructure and Multiplayer Requirements
Before attempting to generate an invite code, it is essential to understand the underlying architecture of Stardew Valley’s multiplayer system. Unlike many modern titles that utilize centralized dedicated servers, Stardew Valley operates on a listener-client model. This means the host player’s machine acts as the server. If the host disconnects or experiences a hardware failure, all guest players are immediately disconnected.
The invite code system was specifically designed to facilitate cross-platform play between the Steam and GOG versions of the game on PC. While consoles (Nintendo Switch, PlayStation, and Xbox) primarily rely on platform-specific friend lists, the invite code serves as a universal handshake protocol for PC users.
Essential Pre-Hosting Checklist
- Platform Compatibility: Invite codes are functional on PC (Windows, macOS, and Linux). Note that cross-play between PC and consoles is not supported as of the current version.
- Version Parity: All players must be running the exact same version of the game (e.g., Version 1.6.8). Mismatched versions will result in a Connection Failed error before the farm even loads.
- Cabin Infrastructure: A multiplayer farm cannot support guests without physical cabins. Each guest requires their own cabin. These can be built during farm creation or added later by visiting Robin at the Carpenter’s Shop for 100 Gold and 10 Stone.
- Network Stability: The host should ideally have an upload speed of at least 5 Mbps to ensure a lag-free experience for three or more farmhands.
- Software Permissions: Stardew Valley must be whitelisted in the Windows Defender Firewall or any third-party antivirus software to allow the "Stardew Valley API" to broadcast the session.
Step-by-Step Workflow for Generating and Using Invite Codes
Step 1: Initiating a Multiplayer Session
The process begins at the main title screen. Do not select "Load" as this will launch the game in single-player mode, which disables the invite code generation feature. Instead, select the Co-op button.
- Navigate to the Host tab within the Co-op menu.
- Select an existing farm that has available cabins or choose "Host New Farm."
- If starting a new farm, ensure the "Starting Cabins" option is set to the number of friends you intend to invite (up to 7 additional players in the 1.6 update).
- Configure the "Profit Margin" and "Money Style" (Shared or Separate) as these settings cannot be easily changed once the session starts.
Step 2: Configuring the Multiplayer Settings
Once the farm has loaded and your character is on the screen, you must enable the visibility of your session to the matchmaking server.
- Press the Escape key (or the E key) to open the game menu.
- Click on the Options tab, represented by a small controller icon.
- Scroll down until you reach the section labeled Multiplayer.
- Locate the "Server Mode" dropdown menu. Ensure this is set to "Friends Only" or "Invite Only." If it is set to "Offline," the invite code button will not appear.
Step 3: Retrieving the Invite Code
The invite code is not automatically displayed to prevent accidental streaming leaks. You must manually trigger its visibility.
- In the same Multiplayer section of the Options menu, look for the button labeled "Show Invite Code."
- Click the button. A dialogue box will appear containing a string of approximately 10 to 12 alphanumeric characters.
- Copy this code. You can click on the code to copy it to your clipboard automatically.
Pro-Tip: The invite code changes every time you restart the game session. You cannot "save" a code for permanent use; you must provide your friends with a new code every time you host a fresh session.
Step 4: Distributing the Code to Farmhands
Share the code with your intended guests via a third-party messaging app like Discord or Steam Chat.
- The guests must open Stardew Valley and select "Co-op" from the main menu.
- They must click on the "Join" tab.
- Instead of looking for a farm in the list, they must click the button labeled "Enter Invite Code..."
- The guest pastes the code into the text field and confirms.
Warning: If a guest receives a "Friend Code Invalid" message, ensure the host has not closed the menu or entered a loading screen (like entering a mine level) during the handshake process, as this can occasionally interrupt the connection.
Stardew Valley: How to Get & Use Workbench
Multiplayer Connectivity and Platform Specifications
The following table outlines the technical parameters and limitations for Stardew Valley multiplayer across different environments. Understanding these thresholds is critical for troubleshooting invite code visibility.
| Parameter | PC (Steam/GOG) | Nintendo Switch | PlayStation / Xbox |
|---|---|---|---|
| Primary Connection Method | Invite Code / Steam Overlay | Friend List / Local Wireless | System Friend List |
| Max Player Count | 8 Players (Ver 1.6+) | 4 Players | 4 Players |
| Invite Code Support | Fully Supported | Not Supported | Not Supported |
| Cross-Play Capability | Steam to GOG (Yes) | No | No |
| Subscription Required | None | Nintendo Switch Online | PS Plus / Game Pass Core |
| Minimum Version | 1.6.x | 1.5.x (Pending 1.6) | 1.5.x (Pending 1.6) |
Resolving Multiplayer Connectivity and Invite Code Failures
In some instances, the "Show Invite Code" button may be missing, or guests may be unable to connect despite having the correct string. These issues are typically rooted in network configuration or launcher synchronization.
Issue: The "Show Invite Code" Button is Missing
- Root Cause: The game is not communicating with the Steam or GOG Galaxy API. This happens if the game is launched directly from the .exe file without the launcher running, or if the player is in "Offline Mode" on their platform.
- Actionable Fix: Close the game. Ensure Steam or GOG Galaxy is online and logged in. Restart the game through the launcher's "Play" button. Verify that the "Server Mode" in the game options is not set to "Offline."
Issue: Infinite "Connecting..." Screen for Guests
- Root Cause: A NAT (Network Address Translation) Type mismatch or a firewall blocking the UDP ports used by the game.
- Actionable Fix: The host should check their router settings to ensure UPnP (Universal Plug and Play) is enabled. If the problem persists, the host may need to manually forward port 24642 (UDP) to their local IP address.
Issue: "No Cabins Available" Error
- Root Cause: The host has fewer cabins than the number of players attempting to join, or all existing cabins are already "owned" by other player profiles.
- Actionable Fix: The host must go to Robin the Carpenter in single-player or a current co-op session and commission the construction of a new cabin. This takes no in-game time and appears instantly if built during the initial farm setup, but takes a standard building cycle if ordered mid-game.
Issue: Invite Code Changes or Disconnects Frequently
- Root Cause: Unstable IP lease from the ISP or a fluctuating Wi-Fi signal causing the host's "heartbeat" to the matchmaking server to drop.
- Actionable Fix: Use an Ethernet connection for the host machine. If on a laptop, ensure that "Power Saving Mode" for the network adapter is disabled in the Windows Device Manager.
Frequently Asked Questions
Why can't I find the invite code button on my Nintendo Switch?
The invite code system is exclusive to the PC version of Stardew Valley. For the Nintendo Switch, multiplayer is handled through your Nintendo Switch Online friends list or through "Local Communication" if the consoles are in the same room. You do not need a code to join a friend on Switch; their farm will simply appear in your "Join" tab if they are hosting.
Can I turn my single-player save into a multiplayer farm with an invite code?
Yes, you can convert any solo save file. You must first load the save in single-player, visit Robin at the Carpenter's Shop, and build a cabin for every friend you want to invite. Once the cabins are built, save the game, return to the main menu, and launch that save via the Co-op menu's Host tab. The invite code option will then be available.
Do I need to keep the invite code window open for friends to join?
No, once you have retrieved the invite code and shared it, you can close the menu and continue playing. The code remains active as long as the session is live. If you close the game and restart it later, a new code will be generated, and you will need to provide that new string to your friends.
Does the invite code work for players using mods?
Invite codes function with SMAPI (Stardew Modding API), but all players should ideally have the same mods installed, especially those that add new items, maps, or dialogue. If the host has structural mods that the guests do not, the game may crash or desynchronize during the connection attempt.
Can I kick a player who joined via an invite code?
The host has full authority over the session. By accessing the Options menu and clicking the "Delete" or "Kick" icon next to a player's name in the multiplayer list, the host can remove a guest. To prevent them from returning, the host should change the Server Mode to "Invite Only" or "Offline" and stop sharing the code.
Optimize Your Multiplayer Experience
Mastering the invite code system ensures seamless cooperation on your digital homestead regardless of launcher preferences. For the best performance, always ensure your host machine meets the recommended specifications and maintains a wired network connection.