How to Create a Stardew Valley Server Guide

From Survival Servers
Jump to navigation Jump to search

Stardew Valley has no official dedicated server tool. Vanilla co-op only runs while the host player is in the game.

Before you start

A Stardew Valley "server" is a full copy of the game running as the host player on a machine that never turns off. That means the server machine needs its own PC copy of the game (Steam or GOG) and SMAPI (the Stardew Modding API). It also needs a host-automation server mod that plays the host for you: it goes to bed at night, handles festivals and pauses time when the farm is empty. It listens on one UDP port, 24642 by default.

Setting up an always-on farm

  1. Install Stardew Valley and SMAPI on the machine that will stay online. With Always On Server, the game runs in a normal window, so it needs a real desktop session to run in.
  2. Install a host-automation mod. There are two community options. The Always On Server SMAPI mod runs inside your normal game install. The JunimoServer project is a Docker setup that downloads the game with your Steam account and includes SMAPI and the automation. For Always On Server, use the unofficial update: the original Nexus Mods release has been broken since Stardew Valley 1.4.
  3. Create the multiplayer farm: from the title screen choose Co-Op, then the Host tab, then Host New Farm. Add one cabin for each friend who will join. On PC the farm holds up to 7 cabins, and Robin can build more later for 100g each, instantly.
  4. Forward UDP port 24642 on your router to the host machine and allow it through the firewall.
  5. Friends join from Co-Op → Join LAN Game with your public IP and port, or through Steam/GOG invite codes while the host is online in Steam or GOG.

Things to plan for

  • The game saves at the end of each day. Stardew Valley writes its save when everyone sleeps, so anything since the last completed day is lost if the machine goes down mid-day. Saves are in %AppData%\StardewValley\Saves on Windows. Back that folder up on a schedule.
  • Versions must match. The host's game version, SMAPI, and any gameplay mods have to match every player's game, so after each game update everyone has to update together.
  • The host is a player. Without automation the host character stands in the farmhouse forever, never sleeps, and stops the day from ending. The automation mod isn't optional.
  • PC players only. Steam and GOG players on Windows, Mac, and Linux can all share one farm, but console players can't join a PC farm.

The instant alternative

To skip the always-on PC, the port forwarding and looking after the mods, Stardew Valley server hosting from Survival Servers keeps your farm online 24/7 on datacenter hardware. Friends join with the normal game, no mods needed, from the co-op menu using your server address. Time pauses by itself when nobody is on, and the day's save is backed up, with full FTP access to your files.