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



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

A server password prevents random players from joining. Only people you share the password with can connect.

<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 server.cfg [#open-servercfg]

    Click **Files** in the sidebar and open `server.cfg`.
  </Step>

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

    Find `serverPassword` and set it:

    ```
    serverPassword=MySecretPassword
    ```

    To remove the password and make the server public again:

    ```
    serverPassword=
    ```
  </Step>

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

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

Players will be prompted to enter the password when they attempt to connect. Password-protected servers may not appear in the server browser — give players your IP and port for direct connect instead.

Related Guides [#related-guides]

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