
Stardew Valley multiplayer has a problem: the host has to be playing for anyone else to access the farm. If your friend in another time zone wants to water the crops at 3 AM, too bad. The host is asleep. A dedicated server solves this by keeping the game world running independently.
ConcernedApe (the developer) does not ship an official dedicated server binary. The game was designed as a hosted session, not a server-client architecture. But the community has built tools that make it work, and the result is surprisingly stable for what is essentially a hack on top of a singleplayer game engine.
How It Works
Stardew Valley multiplayer normally works like this: one player hosts, their machine runs the game simulation, and other players connect to it. The "dedicated server" approach runs a headless (no-display) copy of Stardew Valley on a server machine that acts as the permanent host.
The two main tools for this are:
Always On Server (SMAPI Mod)
This is a SMAPI mod that modifies the game to run without a visible window and automates the in-game host behavior. The server "plays" as a farmhand that stands in the house and does nothing, while real players connect and do the actual farming.
VirtualBox/Headless Approach
Run a full copy of Stardew Valley in a virtual machine or using a virtual display (Xvfb on Linux). The game renders to a fake screen, and a real player connects to it as if it were a hosted session.
Both approaches work. The SMAPI mod is cleaner and uses fewer resources. The virtual display approach is more brute-force but requires less modding knowledge.
Requirements
Stardew Valley is extremely light on resources:
| Component | Minimum | Recommended |
|---|---|---|
| CPU | 1 core, 2.0 GHz | 2 cores, 2.5 GHz |
| RAM | 1 GB | 2 GB |
| Storage | 1 GB | 2 GB |
| Network | 1 Mbps | 5 Mbps |
This is one of the lightest game servers you can run. A small VPS that would be unusable for Minecraft runs Stardew Valley comfortably.
Setup with SMAPI (Linux)
Prerequisites
- A machine (VPS or local) running Linux
- Steam installed (SteamCMD for the server)
- A spare copy of Stardew Valley owned on Steam (the server needs a licensed copy)
Step 1: Install Stardew Valley
mkdir -p /home/steam/stardew
steamcmd +force_install_dir /home/steam/stardew \
+login YOUR_STEAM_USERNAME \
+app_update 413150 validate \
+quit
Note: unlike most game servers, Stardew Valley requires a logged-in Steam account. You need to own the game on the account you use here.
Step 2: Install SMAPI
SMAPI is the mod loader for Stardew Valley. Download the latest release and install it:
cd /home/steam
curl -L -o smapi.tar.gz https://github.com/Pathoschild/SMAPI/releases/latest/download/SMAPI-linux.tar.gz
tar -xzf smapi.tar.gz
cd SMAPI*installer
./install.sh --game-path /home/steam/stardew
Step 3: Install Always On Server Mod
Download the Always On Server mod from Nexus Mods or the Stardew modding community. Place the mod folder in /home/steam/stardew/Mods/.
Configure the mod in its config.json:
{
"serverHotKey": "F9",
"profitMargin": 1.0,
"moveBuildPermission": "on",
"petName": "ServerDog",
"farmName": "Community",
"autoStartHost": true,
"numberOfCabins": 3,
"cabinLayout": "nearby"
}
numberOfCabins: determines how many players can join simultaneously (one cabin per player, excluding the host slot). Set this to your maximum player count minus one.
Step 4: Set Up Virtual Display
The game needs a display to render to, even in headless mode:
sudo apt install xvfb -y
Step 5: Run the Server
xvfb-run -a /home/steam/stardew/StardewModdingAPI --no-terminal
For persistence with systemd:
[Unit]
Description=Stardew Valley Server
After=network.target
[Service]
Type=simple
User=steam
WorkingDirectory=/home/steam/stardew
ExecStart=/usr/bin/xvfb-run -a /home/steam/stardew/StardewModdingAPI --no-terminal
Restart=on-failure
RestartSec=15
Environment=DISPLAY=:99
[Install]
WantedBy=multi-user.target
Connecting to Your Server
Players connect through the in-game co-op menu:
- Open Stardew Valley
- Go to Co-op
- Click "Enter Invite Code" or use the direct IP option (if using a mod that enables it)
The default connection method uses Steam invites/friends. For direct IP connections, install the "Direct Connection" SMAPI mod on both the server and clients.
Configuration Tips
In-game Time
Stardew Valley's in-game clock keeps running on the server. If nobody is playing, the server still advances through the day. The Always On Server mod handles this by pausing the clock when no players are connected (configurable). If you want time to always advance, disable the pause.
Profit Margin
On multiplayer, you can reduce the profit margin to make the economy harder (since multiple players generate more income than one). 75% or 50% profit margins are common on community servers.
Cabin Placement
Each player needs a cabin on the farm. You can pre-build these or let players build them in-game. Pre-building through the config is easier for a server because nobody has to spend in-game resources on housing.
Mods
SMAPI mods work on the dedicated server the same as they do on a regular installation. Popular server-side mods:
- Chat Commands: adds server admin commands to the chat
- Time Speed: adjusts how fast in-game time passes
- Unlimited Players: removes the player cap (performance dependent)
All players connecting to a modded server need the same content mods installed. Quality-of-life mods that only change the client UI do not need to match.
Performance
Stardew Valley uses minimal server resources. The bottleneck is usually the number of simultaneous events (animals, crops, sprinklers all processing at once on a large farm). Even with 4 players on a fully developed farm, you are unlikely to exceed 1 GB of RAM or a single CPU core at 50% utilization.
The exception is heavy modding. Visual mods do not affect the server, but gameplay mods that add entities (new animals, NPCs, machines) increase the simulation load. 50+ gameplay mods on a server is where you might want 2 cores and 2 GB of RAM.
Hosting Options
Given how light Stardew Valley is on resources, you have flexible options:
Home hosting: actually viable for Stardew Valley. The bandwidth and CPU requirements are so low that most home internet connections can handle it. The only downside is keeping your PC on 24/7.
VPS: the most common choice for a persistent server. A budget VPS with 2 GB RAM and 1 vCPU is more than enough. Space-Node VPS hosting starts at prices that make this an easy expense to split among friends.
A spare Raspberry Pi: Stardew Valley's server is light enough that a Raspberry Pi 4 with 4 GB RAM can run it, though expect slower day transitions and longer save times.
FAQ
Does the server need a separate copy of the game? Yes. The server needs Stardew Valley installed through a Steam account that owns the game. This is a limitation of the game's DRM.
Can I use my existing save on a dedicated server?
Yes. Copy your save folder from %AppData%\StardewValley\Saves\ (Windows) or ~/.config/StardewValley/Saves/ (Linux) to the server's equivalent directory. Add cabins for other players if your save was originally singleplayer.
What happens when no players are online? Depends on your configuration. With the pause feature enabled, the in-game clock stops and nothing happens. With the pause disabled, the server host farmhand "sleeps" at the end of each day and the next day starts automatically.
How many players can join? Vanilla supports up to 4 players. Mods like "Unlimited Players" remove this cap. In practice, 6 to 8 players works well. Beyond that, the farm gets crowded and day transitions slow down.
Related guides: for tips on protecting your server, read the game server security guide. If you run multiple game servers, check our guides for Minecraft, Valheim, or Palworld.
Is there crossplay between Steam and GOG? Not natively. The connection relies on Steam networking. GOG players can use mods to connect via direct IP, but it requires additional setup on both ends.