How to Make a Gmod Mac Server

by Dave Wilson
Gmod servers are often used to create animated YouTube videos.

Gmod servers are often used to create animated YouTube videos.

The Garry's Mod game server hosts a sandbox physics game (players roam a virtual world where they manipulate "props" and experiment with physics) that features multiplayer support and typically runs on a Microsoft Windows based computer platform. However, with some configuration a Gmod server can be installed and run on an Apple Mac server as well. Use the Wine and Nano utilities to setup Gmod on a Mac server from the command line.

Click the "Finder" icon in the Mac desktop Dock and click "Applications" and click "Utilities" and then click "Terminal." The command line terminal window will appear.

Type "sudo port install wine" at the command prompt and tap the "Enter" key. Enter the Administrator password for the Mac computer when prompted and press the "Enter" key. Wait until the Wine program installation has completed and the cursor returns to the command line.

Close the terminal window. Click "Applications" in the "Finder" window and click "Utilities" and then click "Terminal" to open the command line terminal window.

Click the "Safari" icon in the desktop Dock and type the URL for the Steam Windows HLDS Update Tool into the address bar near the top of the Safari web browser window. Tap the "Enter" key. Click the "Save" button to store the HLDS Update tool to the Safari default downloads location.

Type "wine ~/Downloads/hldsupdatetool.exe" at the terminal command prompt and tap the "Enter" key. Click the "Next" key in the window that appears. Read the license agreement and if you agree click "I Agree" and click "Next." Click the "Browse" button and type "C:\srcds" into the text box at the top of the "Select a Destination Directory" window. Click the "OK" button. Click the "Next" button and then click the name of the country where you are located and click "Next." Click "Next" and click "Finish" to complete the application installation.

Type "cd ~/.wine/drive_c/srcds" at the command prompt" and press the "Enter" key. Type "nano download.sh" on the command line and tap the "Enter" key. Type the following into the text editor window that appears: #!/bin/bash cd ~/.wine/drive_c/srcds echo Note that this will take a long time echo Updating/installing CS:S wine hldsupdatetool -command update -game "Counter-Strike Source" -dir C:\\srcds echo Updating/installing dods wine hldsupdatetool -command update -game "dods" -dir C:\\srcds echo Updating/installing hl2mp wine hldsupdatetool -command update -game "hl2mp" -dir C:\\srcds echo Updating/installing tf wine hldsupdatetool -command update -game "tf" -dir C:\\srcds echo Updating/installing Garrysmod wine hldsupdatetool -command update -game garrysmod -verify_all -retry -dir C:\\srcds echo Update/installation Complete echo Installed to C:\\srcdsecho Your server is now ready to use! echo To add extra addons or maps etc. place them in C:\\srcds\\orangebox\\garrysmod echo This installer can also update necessary server files, so it is recommended that you run it often.

Press the "CTRL" and "O" keys at the same time and then tap the "Enter" key to save the information entered into the document. Press the "CTRL" and "X" keys at the same time to exit the Nano text editor.

Type "chmod a+x downloader.sh" at the command prompt and tap the "Enter" key. Enter "./downloader.sh" at the command prompt and tap the "Enter" key. Wait for the command line output to display a message stating that the "server is now ready to use."

Type "nano start.sh" on the command line and press the "Enter" key. Type the following into the Nano text editor: #!/bin/bash cd ~/.wine/drive_c/srcds/orangebox while [ true ]; do echo Starting the game server. echo Beginning GMod Now wine srcds.exe -console -game garrysmod -port 27015 +map gm_construct +maxplayers 16 echo The GMod server has now started. done; Press the "CTRL" and "O" keys at the same time and then press the "Enter" key to save the document.

Type "chmod a+x start.sh" at the command prompt and tap the "Enter" key. Enter "./start.sh" in the command terminal and press the "Enter" key to start the server.

Items you will need

About the Author

Dave Wilson has been writing technical articles since 1993, including manuals, instructional "how-to" tips and online publications with various websites. Wilson holds a Bachelor of Arts in psychology from the University of California, Los Angeles and has Microsoft, Cisco, and ISC2 (CISSP) technical certifications. He also has experience with a broad range of computer platforms, embedded systems, network appliances and Linux.

Photo Credits

  • photo_camera Agri Press/Lifesize/Getty Images