# How To Set a Password on Your FiveM Server (/docs/fivem/set-a-password)



Setting a password on your FiveM server restricts access to only players who know the password.

<div className="fd-steps">
  <div className="fd-step">
    Open Files [#1-open-files]

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

  <div className="fd-step">
    Open server.cfg [#2-open-servercfg]

    Open the `server.cfg` file.
  </div>

  <div className="fd-step">
    Add the Password Setting [#3-add-the-password-setting]

    Add the following line to `server.cfg`:

    ```
    sv_password "yourpassword"
    ```

    Replace `yourpassword` with your desired password.
  </div>

  <div className="fd-step">
    Save and Restart [#4-save-and-restart]

    Save the file and restart your server from the **Console** page.

    Players will now be prompted to enter the password when connecting through the FiveM client.

    > 📝 **Note:** To remove the password, either delete the `sv_password` line or set it to an empty string:
    >
    > ```
    > sv_password ""
    > ```
  </div>
</div>
