# Setting a Password on Your Subnautica Nitrox Server (/docs/subnautica/server-password)



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

Nitrox has two separate passwords: a **server password** that players need to join, and an **admin password** that authenticates in-game admin commands.

Server Password [#server-password]

This is what players type when joining. Leave it empty for an open server.

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

    In the [XGamingServer Panel](https://panel.xgamingserver.com), click `Stop`.
  </Step>

  <Step>
    Open the save config [#open-the-save-config]

    Open `File Manager` and navigate to:

    ```
    .config/Nitrox/saves/My World/server.cfg
    ```

    Replace `My World` with your save name if you changed it.
  </Step>

  <Step>
    Set ServerPassword [#set-serverpassword]

    Find the `ServerPassword` line and set the value:

    ```
    ServerPassword=mySecret123
    ```

    Leave it blank to remove the password:

    ```
    ServerPassword=
    ```
  </Step>

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

    Save the file and click `Start`. Players use the new password on their next join.
  </Step>
</Steps>

> 📝 **Note:** The **Startup** tab in the panel may also expose `ServerPassword`. Whichever value is in the save config is what's used at runtime -- if the two disagree, edit the save config to be sure.

Admin Password [#admin-password]

The admin password authenticates the in-game `/login` command, which gives a player full admin permissions for the session.

<Steps>
  <Step>
    Stop the server and open the save config [#stop-the-server-and-open-the-save-config]

    Same path as above: `.config/Nitrox/saves/My World/server.cfg`.
  </Step>

  <Step>
    Set AdminPassword [#set-adminpassword]

    ```
    AdminPassword=anotherSecret
    ```

    Nitrox generates a random `AdminPassword` on first boot. Change it before sharing the server -- the random one is fine but inconvenient.
  </Step>

  <Step>
    Use it in-game [#use-it-in-game]

    After connecting, press `Y` to open chat, then run:

    ```
    /login anotherSecret
    ```

    You're now an admin and can run [admin commands](/docs/subnautica/admin-commands).
  </Step>
</Steps>

Changing Passwords Without Restarting [#changing-passwords-without-restarting]

If you're already logged in as admin in-game, you can rotate passwords without a server restart:

```
/changeserverpassword newPassword
/changeadminpassword newAdminPassword
```

Use `/changeserverpassword` with no argument to clear the server password and make the server open.

Forgotten Admin Password? [#forgotten-admin-password]

Stop the server, open `.config/Nitrox/saves/My World/server.cfg`, and read the `AdminPassword` value -- it's stored in plain text. Change it if you want.

Related [#related]

* [Admin Commands](/docs/subnautica/admin-commands) -- what `/login` unlocks
* [Configure Your Server](/docs/subnautica/configure-your-server) -- full settings reference
