It is now possible to run dedicated servers for Dota 2 on all platforms: Windows, Linux, and Mac OS X.
To get started, download Dota 2 using the Steam client or SteamCMD
with appid 570. For SteamCMD, you will have to login to an existing Steam account since it is not available when logging in anonymously.
For Mac OS X, follow the Linux instructions for SteamCMD usage. The Mac OS X build of SteamCMD can be downloaded here.
Next, download the appropriate attachment below for the OS on which you wish to run a server. Extract the files into your Dota 2 install directory. Note that this will overwrite the dedicated.so or dedicated.dylib file on Linux or OS X.
By default, the install directory will be one of the following:
- Windows: C:\Program Files (x86)\Steam\SteamApps\common\dota 2 beta
- Linux: ~/.local/share/Steam/SteamApps/common/dota 2 beta
- Mac OS X: ~/Library/Application Support/Steam/SteamApps/common/dota 2 beta
For Linux, if you don't have the Steam client installed, you will also need to download the Steam runtime
and extract it into your home directory.
For both Linux and Mac OS X, if you don't have the Steam client installed, you will need to still obtain the steamclient binaries from a Steam client install for your OS and copy them to the bin
directory of your Dota 2 install. This includes crashhandler
, and libvstdlib_s
. On Linux, these files have a .so extension and can be found in ~/.steam/bin32
. On OS X, they have a .dylib extension and can be found in /Applications/Steam.app/Contents/MacOS/osx32
. From /Applications/Steam.app/Contents/MacOS
, you will also need to copy the Frameworks
directory to your server's install directory (NOT bin
Before you run the server, it is highly recommended that you also install the latest snapshot
of Metamod:Source and the Dota 2 Fixups
plugin in order to fix a number of issues. Note that you must edit the gameinfo.txt file in the "dota" subdirectory in order to install Metamod:Source. For more details on this install method, see the documentation here
. (If you chose to use a Steam client install from which you also play the game, you will need to remove the gameinfo edit before launching the Dota client.)
Running the Server
After installing the necessary files, running the server is easy if you've ever run Source servers before. Open a terminal program (or the command prompt on Windows) and navigate to the directory containing your Dota 2 installation. Then run the following command depending on which OS you are using:
- Windows: srcds.exe -console -game dota +map dota
- Linux: ~/steam-runtime/run.sh ./srcds_run -game dota +map dota
- Mac OS X: ./srcds_run -game dota +map dota
Additional command line options, such as -port <port number> and -ip <ip address>, may also be added as needed.
If on Linux and using the copy of steam-runtime shipped with the Steam client, its default path is ~/.steam/bin32/steam-runtime
Special thanks to psychonic
for testing this on Linux and for creating the Dota 2 Fixups plugin!