How to create an autoexec.cfg for CS:GO

An autoexec.cfg file is used in CS:GO to ensure some commands / settings are always set. The autoexec.cfg file is automatically executed on startup like the config.cfg file, and can contain pretty much any client-side command in Counter Strike: Global Offensive.

In this guide we’ll run through how you create one and give you some tips on what to include.

Step 1: Finding the config (cfg) folder

First off, you’ll need to locate your config folder. This is a detailed Reddit thread on how to do so, but in short you can find CS:GOs config folder under the path: “…Steamuserdata<YOURID>730localcfg”.

Where “<YOURID>” is the ID of your Steam account (for example “91325575”).

Step 2: Create the autoexec.cfg file

Once you’re in the cfg folder, you should create a new file named “autoexec.cfg”. You need to use that exact name, otherwise it won’t work.

On Windows, do this by right clicking in the folder, go to “New” and then click “Text document”. Name the text document “autoexec.cfg”.

autoexec1 autoexec2

Step 3: Edit and configure your autoexec.cfg file

Now you can enter any commands you want into the autoexec file. Do this by editing the file in a text editor. Again, on Windows you could do this by right clicking the file and selecting “Open with” and then “Notepad”.

autoexec3

Example autoexec.cfg file

(text following “//” (comments) is ignored in the autoexec. The following text can be copied straight into your autoexec.cfg.)

// removes tracers following your own fire. Other players’ tracers will not be affected.
r_drawtracers_firstperson 0
// Set your rate values to be optimal for all CS:GO servers, even 128 tick.
rate “128000”
cl_cmdrate “128”
cl_updaterate “128”
// Enable the net_graph which gives you performance information, and adjusts its position.
net_graph “3”
net_graphpos “2”
net_graphheight “0”
// disable automatically switching to a more powerful weapon when it is picked up.
cl_autoweaponswitch “0”
// set your maximum allowable ping in CS:GOs matchmaking
mm_session_max_ping 50
// set your preference on what downloads you allow from a server: all, none, or nosounds
cl_downloadfilter all
// Print a message in console that the autoexec.cfg was successfully executed. Useful for troubleshooting and peace of mind.
echo “Loaded autoexec!”

If for some reason the autoexec.cfg file isn’t executed on startup

There’s a few ways to solve this issue, listed below:

a) Manually execute the autoexec.cfg by entering the command “exec autoexec” in your in-game console.

b) Add all the commands from your autoexec.cfg to your config.cfg instead.

c) Add the command “exec autoexec” at the end of your config.cfg.

d) Add “+exec autoexec” to the launch options of Counter Strike: Global Offensive. For example, with the console activated your launch options would be: “-console +exec autoexec”.

List of commands/cvars you can add to your autoexec.cfg

You can use our list of all CS:GO console commands to find commands that you can add to your autoexec.cfg.

Interested in CS:GO and TeamSpeak servers?

At DatHost we offer CS:GO servers and TeamSpeak servers with great performance, and the easiest configuration available. You’ll be up and running within seconds.