# How To Set a Password on Your Garry's Mod Server (/docs/garrys-mod/set-a-password)



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

Setting a password on your Garry's Mod server restricts access to only players who know the password.

<div className="fd-steps">
  <div className="fd-step">
    Open the Startup Page [#1-open-the-startup-page]

    Log in to the [XGamingServer Panel](https://panel.xgamingserver.com) and select your Garry's Mod server. In the sidebar, click **Startup**.
  </div>

  <div className="fd-step">
    Set the Server Password [#2-set-the-server-password]

    Find the **Server Password** field and enter the password you want.
  </div>

  <div className="fd-step">
    Restart Your Server [#3-restart-your-server]

    Go to **Console** in the sidebar and restart your server.

    Players will need to enter the password when joining through the server browser. They can also connect via the console using:

    ```
    password yourpassword
    connect YOUR_IP:YOUR_PORT
    ```

    > 💡 **Tip:** You can also set the password in `garrysmod/cfg/server.cfg` with:
    >
    > ```
    > sv_password "yourpassword"
    > ```

    > 📝 **Note:** To remove the password, clear the password field in **Startup** and restart the server.
  </div>
</div>
