# How to Set a Password on Your CS:GO Server (/docs/counter-strike-go/server-password)



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

<Tabs items={['Via Startup Tab', 'Via server.cfg']}>
  <Tab value="Via Startup Tab">
    <Steps>
      <Step>
        Open Startup [#open-startup]

        In the [XGamingServer Panel](https://panel.xgamingserver.com), click **Startup** in the sidebar.
      </Step>

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

        Find the **Server Password** field and enter your password.
      </Step>

      <Step>
        Restart [#restart]

        Restart from **Console** to apply.
      </Step>
    </Steps>
  </Tab>

  <Tab value="Via server.cfg">
    <Steps>
      <Step>
        Stop the server [#stop-the-server]

        Go to **Console** and stop your server.
      </Step>

      <Step>
        Open server.cfg [#open-servercfg]

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

      <Step>
        Set sv_password [#set-sv_password]

        ```
        sv_password "YourPassword"
        ```

        For a public server, leave empty:

        ```
        sv_password ""
        ```
      </Step>

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

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

How Players Connect [#how-players-connect]

Players connect with the password using the in-game console:

```
connect 123.45.67.89:27015; password "YourPassword"
```

Related Guides [#related-guides]

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