# How to Set Up a Practice Server in Counter-Strike 2 (/docs/counter-strike-2/practice-server)



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

A practice config is a `.cfg` file you can `exec` to instantly switch your server into a nade-lineup / aim-training environment. Anything that needs `sv_cheats 1` (impacts, trajectories, noclip) lives here.

Create the Practice Config [#create-the-practice-config]

<Steps>
  <Step>
    Stop the server, then click **Files** in the [XGamingServer Panel](https://panel.xgamingserver.com).
  </Step>

  <Step>
    Navigate to `game/csgo/cfg/`. Create a new file called `practice.cfg`.
  </Step>

  <Step>
    Paste the config below and save:

    ```ini
    // CS2 Practice Server Config
    sv_cheats 1
    mp_warmup_end
    mp_freezetime 0
    mp_roundtime 60
    mp_roundtime_defuse 60
    mp_maxmoney 60000
    mp_startmoney 60000
    mp_buytime 9999
    mp_buy_anywhere 1
    mp_respawn_on_death_t 1
    mp_respawn_on_death_ct 1

    // Infinite ammo + no recoil for lineups
    sv_infinite_ammo 1
    ammo_grenade_limit_total 5
    ammo_grenade_limit_flashbang 2

    // Nade visualisation
    sv_grenade_trajectory_prac_pipreview 1
    sv_grenade_trajectory_dash 1
    sv_showimpacts 1
    sv_showimpacts_time 10

    // QoL
    sv_alltalk 1
    mp_limitteams 0
    mp_autoteambalance 0
    mp_solid_teammates 0
    bot_kick

    // Restart
    mp_restartgame 1
    ```
  </Step>

  <Step>
    Start the server. In-game, open console and run:

    ```
    exec practice
    ```
  </Step>
</Steps>

Useful In-Game Commands After Loading [#useful-in-game-commands-after-loading]

| Command                    | Description                           |
| -------------------------- | ------------------------------------- |
| `noclip`                   | Toggle fly mode (sv\_cheats required) |
| `god`                      | Invincibility                         |
| `give weapon_hegrenade`    | Spawn an HE in your hand              |
| `give weapon_smokegrenade` | Spawn a smoke                         |
| `give weapon_flashbang`    | Spawn a flash                         |
| `give weapon_molotov`      | Spawn a molotov                       |
| `mp_restartgame 1`         | Reset the round                       |
| `bot_place`                | Place a bot at your crosshair         |

Switching Back to Match Play [#switching-back-to-match-play]

Run `exec server.cfg` (or your normal mode config) to drop sv\_cheats and reset to competitive settings, then `mp_restartgame 1`.

Related Guides [#related-guides]

* [Server Configuration](/docs/counter-strike-2/server-config)
* [Bot Configuration](/docs/counter-strike-2/bot-config)
* [Game Modes](/docs/counter-strike-2/mode-setup)
