# Password-Protect Your Stardew Valley Server (/docs/stardew-valley/server-password)



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

By default anyone with your invite code can join. Add a password to keep your farm private — players must authenticate before they can play.

Set a password [#set-a-password]

<Steps>
  <Step>
    Open the Startup tab [#open-the-startup-tab]

    Open your server → **Startup** tab and find **Server Password**.
  </Step>

  <Step>
    Enter a password and restart [#enter-a-password-and-restart]

    Type a password (leave blank to disable) and **restart** the server.

    {/* SCREENSHOT PENDING: /screenshots/stardew-valley/stardew-server-password.png (alt: Server Password startup variable) */}
  </Step>
</Steps>

How players log in [#how-players-log-in]

With a password set, players who enter your invite code spawn in a **holding lobby** instead of the farm. In the in-game **chat box** they type:

```
!login yourpassword
```

On success they're warped to their cabin and can play normally.

> **Warning:** don't drop items while in the lobby — they will be lost. Players get a limited number of attempts before being kicked.

Tips [#tips]

* Share the password through a private channel (Discord DM, etc.), separate from the public invite code.
* Changing the password takes effect on the next restart; already-connected players stay in.
