# How to Set a Password on Your Unturned Server (/docs/unturned/server-password)



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

<Steps>
  <Step>
    Stop your server [#stop-your-server]

    Go to **Console** in the [XGamingServer Panel](https://panel.xgamingserver.com) and stop the server.
  </Step>

  <Step>
    Open Commands.dat [#open-commandsdat]

    Click **Files** in the sidebar. Navigate to `Servers/<ServerName>/Server/` and open `Commands.dat`.
  </Step>

  <Step>
    Set the password [#set-the-password]

    Add or change the `Password` line:

    ```
    Password YourSecretPassword
    ```

    To remove the password and make the server public, **delete the entire `Password` line**.
  </Step>

  <Step>
    Save and start [#save-and-start]

    Click **Save Content** and start from **Console**.
  </Step>
</Steps>

Players can connect with the password using direct connect:

```
connect IP:27015/YourPassword
```

Or they'll be prompted when joining through the server browser.

Related Guides [#related-guides]

* [Server Configuration](/docs/unturned/server-config)
* [Connect to Your Server](/docs/unturned/join-server)
