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.
- pRED: Created CDetour
- psychonic: Checked dyld symbols on 10.5 and tested under virtual machine
- Fyren: Pasted some vital output from srcds and gdb on Linux
- Open Steamworks
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 install on a Windows or Linux system (assuming Mac binaries are available from it).
Once you have downloaded the appropriate package for your game listed above, place the srcds_osx
files from it into the server's root directory. If the package also includes a bin
directory, copy the files from it to the bin
directory of the server root as well.
Counter-Strike: Source Example
- Note: The Library folder may be hidden in Finder by default on Lion (10.7) or later. 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 an OS X update.
chflags nohidden ~/Library
- Note 2: If you decide to drag and drop the bin folder in Finder, make sure to hold the Option/Alt key while doing so. On OS X Lion (10.7) and later, you should be offered the option to 'Merge' folders rather than replace. I repeat, you do NOT want to completely replace the bin folder.
Once the files from the appropriate 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_run
with the game name, map, and any other options you'd like:
./srcds_run -game cstrike +map de_dust -maxplayers 16 +log on
: It is recommended that you run a dedicated server on the same system that has the Steam client installed. Steam does NOT have to be running at the same time, however. But if you really want to run it on a computer that doesn't have the Steam client, see the Running Server Without Steam Client
section at the bottom of this post.
Note on Counter-Strike: Global Offensive
binary is not included in the OS X client download of the game, but this is still required to run a server. You may use the following download of dedicated.dylib
as a starting point, but I can't guarantee that it will be kept up to date: dedicated.dylib
(last updated: 7 March 2014)
It is instead recommended that the file be obtained from a dedicated server install (appid 740) via SteamCMD
on Windows or Linux (or Wine on OS X). Alternatively, you could use Depot Downloader
. Either way, the file should be located in the bin
directory of the server's root directory.
You may even want to download the entire server via SteamCMD or Depot Downloader rather than the Steam client because all the Mac binaries are included. (The download package above is still required, of course).
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 in the Tools section of the Steam client. It's currently labeled Insurgency Beta Dedicated Server
. Note that if you use the dedicated server install, you will be overwriting/replacing the srcds_osx
binary with the one included in the srcds_osx download package above.
Note on Dota 2
It is highly recommended to install the latest snapshot
of Metamod:Source and the Dota 2 Fixups
plugin in order to fix a number of issues. Metamod:Source must be installed using the gameinfo.txt installation
method. See this thread
for more details and support.
Running Server Without Steam Client
While it is recommended to run a dedicated server on a computer with the Steam client installed, it is possible to run one without it. However, you will need to copy a number of files from an OS X Steam client install.
First, from /Applications/Steam.app/Contents/MacOS
, copy the Frameworks
directory to your server's root directory (NOT bin
Next, from the osx32
directory (full path: /Applications/Steam.app/Contents/MacOS/osx32
), copy the following files into the bin
directory of your server's root: crashhandler.dylib
, and steamclient.dylib
After you've copied these files, you should be able to run the server as described above.