# How to Invite Players & Join Your Stardew Valley Server (/docs/stardew-valley/join-server)



import { Step, Steps } from 'fumadocs-ui/components/steps';
import { Tab, Tabs } from 'fumadocs-ui/components/tabs';

Stardew Valley multiplayer doesn't use a server list or direct IP — players connect with an **invite code** over Steam's relay network. That means **no port forwarding** and it works through almost any network.

Step 1 — Find your invite code [#step-1--find-your-invite-code]

Your server generates an invite code each time it boots. There are two easy ways to get it from the panel.

<Tabs items={['From the Console', 'From the File Manager']}>
  <Tab value="From the Console">
    <Steps>
      <Step>
        Open the Console tab [#open-the-console-tab]

        In the panel, open your server and go to the **Console** tab.
      </Step>

      <Step>
        Read the invite code [#read-the-invite-code]

        Once the server is fully started, it prints the code in a green banner:

        ```
        [sdvd] ════════════════════════════════════════════════
        [sdvd]  INVITE CODE: S123456789
        [sdvd]  Players: Stardew Valley → Co-op → Enter Invite Code
        [sdvd] ════════════════════════════════════════════════
        ```

        {/* SCREENSHOT PENDING: /screenshots/stardew-valley/stardew-console-invite-code.png (alt: Invite code in the panel console) */}
      </Step>
    </Steps>
  </Tab>

  <Tab value="From the File Manager">
    <Steps>
      <Step>
        Open the File Manager [#open-the-file-manager]

        Open your server and go to the **Files** tab.
      </Step>

      <Step>
        Open invite-code.txt [#open-invite-codetxt]

        The current code is written to **`invite-code.txt`** in the main directory. Open it to copy the code.

        {/* SCREENSHOT PENDING: /screenshots/stardew-valley/stardew-invite-code-file.png (alt: invite-code.txt in the file manager) */}
      </Step>
    </Steps>
  </Tab>
</Tabs>

> The invite code **changes every time the server restarts**. If players can't connect, grab the latest code first.

Steam vs GOG codes [#steam-vs-gog-codes]

| Prefix | Platform   | Reliability             |
| ------ | ---------- | ----------------------- |
| `S…`   | Steam      | **\~99% — recommended** |
| `G…`   | GOG Galaxy | \~50%                   |

If both appear, hand out the **Steam (`S…`)** code.

Step 2 — Connect in-game [#step-2--connect-in-game]

<Steps>
  <Step>
    Launch Stardew Valley [#launch-stardew-valley]

    Start the game and load (or create) a character. Your character is your farmhand on the server.
  </Step>

  <Step>
    Co-op → Enter Invite Code [#co-op--enter-invite-code]

    From the main menu choose **Co-op**, then **Enter Invite Code**.

    {/* SCREENSHOT PENDING: /screenshots/stardew-valley/stardew-coop-menu.png (alt: Stardew Valley Co-op menu) */}
  </Step>

  <Step>
    Paste the code and join [#paste-the-code-and-join]

    Paste the invite code and click **OK**. First-time players get a cabin created automatically; returning players spawn where they left off.

    {/* SCREENSHOT PENDING: /screenshots/stardew-valley/stardew-enter-invite-code.png (alt: Enter invite code dialog) */}
  </Step>
</Steps>

> **Password-protected server?** You'll spawn in a holding lobby. Type `!login <password>` in chat to be warped to your cabin. Don't drop items in the lobby — they're lost. See [Server Password](/docs/stardew-valley/server-password).

Requirements for players [#requirements-for-players]

* They must **own Stardew Valley** (Steam or GOG) — you don't supply their copy.
* If you've added **SMAPI mods** to the server, players must install the **same mods**. See [Install SMAPI Mods](/docs/stardew-valley/mods).
* Make sure the server status is **Running** in the panel before sharing the code.
