Since Valve has decided not to release SrcDS for OS X, I took things into my own hands.
I noticed that a "dedicated.dylib" binary was included for most available Source engine games. This binary is what handles the logic for dedicated servers. I hoped that I could do something with it and I have -- but not without a lot of hacks.
My primary motivation for this was to make testing easier (for Metamod:Source and SourceMod). I find it nice to be able to develop and test without needing to run the full games on listen servers. This also has the advantage of being able to run inside a virtual machine that lacks the necessary hardware acceleration.
Hopefully someone else out there will find this useful. If you have any problems or questions, feel free to post them.
- macOS 10.9 or later
- One of the supported games listed below
- Counter-Strike: Global Offensive
- Counter-Strike: Source
- Day of Defeat: Source
- Day of Infamy
- Garry's Mod
- Half-Life Deathmatch: Source
- Half-Life 2: Deathmatch
- Left 4 Dead
- Left 4 Dead 2
- Nuclear Dawn
- Source SDK Base 2013 Multiplayer Mods
- Team Fortress 2
- pRED: Created CDetour
- psychonic: Checked dyld symbols on version 10.5 and tested under virtual machine
- Fyren: Pasted some vital output from srcds and gdb on Linux
- Open Steamworks
- Udis86 by Vivek Thampi
There are essentially two options for running a server. You could run it directly from the game's install directory in SteamApps
(usually ~/Library/Application Support/Steam/SteamApps/common/<game>
). Or you may opt to have a separate copy of the game by copying it either from the SteamApps/common
directory or from a SteamCMD
Once you have downloaded the package, place the srcds-cli.bundle
files from it into the server's root directory.
Counter-Strike: Source Example
- Note: The Library folder may be hidden in Finder by default. To get there you can either use Finder's Go menu while holding the Option/Alt key or you can unhide it semi-permanently it by running the following Terminal command:
You may have to reapply this nohidden flag after a macOS update.
chflags nohidden ~/Library
Once the files from the package have been extracted/copied, you can run the server by navigating to the server root directory in Terminal:
cd ~/Library/Application\ Support/Steam/SteamApps/common/Counter-Strike\ Source/
Then you can start the server by running srcds.sh
with the game name, map, and any other options you'd like:
Extra Command Line Options of Note
./srcds.sh -game cstrike +map de_dust -maxplayers 16 +log on
Note on Counter-Strike: Global Offensive
- -32 : Force the 32-bit version of the dedicated server to run instead of the 64-bit one. This option currently only applies to Day of Infamy.
- -nosteamupdate : Disable automatic download and updating of Steam libraries. It is highly recommended NOT to use this unless you are having problems or Steam download servers are down.
- -noupdate : Disable automatic update of srcds binaries. It is highly recommended NOT to use this unless you are having problems or are stuck on "Checking for srcds updates..."
- -steambeta : Switch to beta branch for Steam libraries. Much like you can switch your Steam client to opt into the beta version, you can also use the beta version of Steam libraries with your server. Unless you having problems or there is something specific you need from the beta version, you probably don't want this either.
The game is now 64-bit on macOS. The latest development builds of Metamod:Source
will run on this.
Note on Insurgency
You may use the client install of the game to run a server, but Mac binaries are also included in the dedicated server install. You can download this by using steamcmd
with appid 237410. Alternatively, you can get it in the Tools section of the Steam client where it's currently labeled Insurgency Dedicated Server
Notes on Day of Infamy
Like Insurgency, you may use the client install of the game to run a server, but Mac binaries are also included in the dedicated server install. You can download this using steamcmd
and appid 462310.
Also note that a 64-bit version of this now exists and is the one that runs by default. Metamod:Source and SourceMod currently do not run on this, but they should in the near future. So if you need to continue running the 32-bit version, make sure you add -32
to your command line.