{"id":20038483,"url":"https://github.com/codesteel/howtogmodserver","last_synced_at":"2025-06-17T22:07:31.971Z","repository":{"id":161220943,"uuid":"635952009","full_name":"CodeSteel/HowToGMODServer","owner":"CodeSteel","description":"How to manage a Garry's Mod Server, properly.","archived":false,"fork":false,"pushed_at":"2023-05-03T21:20:46.000Z","size":31,"stargazers_count":17,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-02T06:28:06.613Z","etag":null,"topics":["development","garrysmod","gmod"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CodeSteel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-03T20:09:54.000Z","updated_at":"2025-03-01T15:24:13.000Z","dependencies_parsed_at":"2023-06-05T20:15:26.885Z","dependency_job_id":null,"html_url":"https://github.com/CodeSteel/HowToGMODServer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CodeSteel/HowToGMODServer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeSteel%2FHowToGMODServer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeSteel%2FHowToGMODServer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeSteel%2FHowToGMODServer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeSteel%2FHowToGMODServer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodeSteel","download_url":"https://codeload.github.com/CodeSteel/HowToGMODServer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeSteel%2FHowToGMODServer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260447685,"owners_count":23010548,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["development","garrysmod","gmod"],"created_at":"2024-11-13T10:29:26.397Z","updated_at":"2025-06-17T22:07:26.959Z","avatar_url":"https://github.com/CodeSteel.png","language":null,"readme":"# How to Manage a Garry's Mod Server\n\nWelcome to \"How to Manage a Garry's Mod Server\", here I will try to explain the process of managing a Garry's Mod server properly with the aim of productivity and scale over time. I am sick of seeing populated servers with horrible development practices and even more so, tired of working for them, so read this guide and fix your shit.\n\nDisclaimer, all of the information in this README was gathered from my own personal experience. I built and managed a successful Garry's Mod server in the past and continue to do commissions for other servers in the community.\n\n## The Explanation\n\n### 1. Github\nYou need Github. Plain and simple. You will want to use Github for two main reasons, although there are many many more reasons why Github should be used.\n1. Github allows you to store a backup for every single update and every single line of code you change. This means, if you fuck shit up, you can easily revert back.\n2. Git's source conrol allows working with future developers, or any development you and your team contributes, much easier to manage and deploy as you can have mulitple people working on the same project at a time.\n\nIf you plan to hire a developer for any commission work, a Github repository is a MUST. **DO NOT** hire anyone for commission work without this step.\n\n### 2. Local Dedicated Server\nYou will want to set up a local dedicated server, this will be your dev server. Any future work YOU do should be done through this server. **DO NOT** use FTP to update your code, that is very bad practice. \n\nHosting the server yourself is free and allows you to develop much faster.\n\nIt is also what we will be using to store your local github repository branch so you can make updates to your live server without ever touching or modifying any of the files, only your local files.\n\n### 3. DeployHQ\nDeployHQ makes it easy to deploy your github repository to the live server. What this means is any updates you or your team makes can be pushed to the live server with a click of a button.\nThis allows us to take the changes you've made in your local server and send them to the live server to be updated. DeployHQ is free, but limited to 5 deploys a day. As long as you have a decent update routine, this won't be an issue.\n\n## The Setup\n\n### 1. Github\n1. Start by creating a Github account if you don't have one already.\n2. Create a new Github Organization with your ServerName/CompanyName.\n3. Create a new Private Reposiory for the Gamemode you are developing under that organization. Make sure it is set to Private.\n\nIt should look something like this **github.com/MoonNetwork/DarkRP**\n![image](https://user-images.githubusercontent.com/48765827/236049473-f81edb99-3612-4a4e-bfc7-102891d84040.png)\n\nNext we need to set up the local server before going any further with Github.\n\n### 2. Local Dedicated Server\n1. First you need to install SteamCMD. SteamCMD is used to download/update the Garry's Mod game. You can go [here](https://developer.valvesoftware.com/wiki/SteamCMD), scroll down to Download, and following the instructions for your OS.\n2. Create a new directory for your server located in a safe location and name it whatever you want. I.e. \"MoonNetworkDarkRP\". Save the location of this directory as you will need it for the next step.\n3. Go to where you installed SteamCMD and open it. The first time you open the program, it will download all of the required files for it to run. Once it has finished, type in these commands in order:\n```\nforce_install_dir \u003cpath_to_your_server_directory\u003e\nlogin anonymous\napp_update 4020 validate\n```\n\nThis will install the Garry's Mod Dedicated Server in that directory, now we need to configure it.\n\n4. Create a new file in the root directory of the installed garry's mod server, name it `start.bat`.\n5. Open it and paste these contents, but make sure to replace the \u003cvalues\u003e with your own.\n```\nstart \"SRCDS\" /B srcds.exe -game garrysmod -conlog -port 27015 -console -conclearlog -condebug -tvdisable -maxplayers 16 +gamemode \u003cGAMEMODE_HERE\u003e +r_hunkalloclightmaps 0 +map \u003cMAP_HERE\u003e -tickrate 26 +fps_max 26 +host_workshop_collection \"\u003cWORKSHOP_ID_HERE\u003e\" +sv_lan 0\n```\n\nNow if you run `start.bat`, a terminal should open and the server should start. If it doesn't run, then congratulations you failed.\n\nNow that we have the server installed, we must set up our github repository with the `addons` folder.\n\nIf you already have a live server with addons installed, now is the time to copy everything from the live server to your local server, only the `addons` folder.\n\n6. Open a terminal in your local server's `addons` directory. You can do this by right cicking in the directory and clicking \"Open in Terminal\".\n7. Type in these commands to initialize the github repository with the repository you made.\n```\ngit init\ngit remote add origin \u003cTHE_URL_TO_YOUR_REPOSITORY\u003e\ngit fetch\ngit checkout main\ngit add .\ngit commit -m \"init\"\ngit push origin main\n```\n\nThis will initialize a new repository, set it up with the repository you made, fetch any files the repo may have, add the files we already had, and push it to git.\n\nCongratulations, you created a repository and are now backing up your server files. Let's move on and set up DeployHQ.\n\n### 3. DeployHQ\n\n1. Go to https://deployhq.com/ and create a new account.\n2. Sign into your deploy panel and you should be greeted with a \"Create a Project\" screen.\n![image](https://user-images.githubusercontent.com/48765827/236048057-9feccc4b-5b6a-40ab-9896-f31c2ffdb043.png)\n3. Fill out the server information and select Github, click Create Project.\n![image](https://user-images.githubusercontent.com/48765827/236048127-42c75682-93bf-43f3-aa95-d4fe53795488.png)\n4. You should be able to link your Github account to your DeployHQ account, allowing you to select the Server's Repository. \n![image](https://user-images.githubusercontent.com/48765827/236048298-4e0558ad-8cd0-47b2-b0e5-9fd46824b0e6.png)\n5. Now we must link the repository to the live serve so updates can be pushed. Fill out the New Server form with your server's connection info. For Physgun servers, use SSH/SFTP.\n![image](https://user-images.githubusercontent.com/48765827/236048546-0a308b64-6208-4bd1-ba5b-3511c8f16e83.png)\n6. On the bottom of the page, you should see Deployment Path as an option. This will be the directory the repository is updating the files to. For Physgun servers, this should be `/garrysmod/addons`, though it could differ depending on the server's host. Now you can click Create Server.\n![image](https://user-images.githubusercontent.com/48765827/236048822-14f0cbfa-2ee2-4caf-9854-db063c3aba60.png)\n\nIf you didn't get any errors then great, it worked. Otherwise, you're going to have to debug the problem. \n\nNow whenever we want, we can go to the deploy's overview page and click New Deployment. This will allow you to update the server with the latest commit, which should be \"init\". Go ahead and run the first deployment so DeployHQ is synced with what files we have on the server.\n\nCheck FTP and make sure all the files are in the correct place. Great, this is probably the last time you'll need to use FTP.\n\n### 4. IDE (Visual Studio Code)\n\nYou will most likely want an IDE, in this case Visual Studio Code, to manage/update your files. Visual Studio Codes makes things easier by having a built-in Source Control window which shows every change you've made on that commit. It's helpful for those times you forget what you've changed and want to look back and verify everything is good. It can also be helpful for mass-finding a function or string that is messing up. Just click `Ctrl + Shift + F` to search through every file.\n1. Download and install Visual Studio Code [here](https://code.visualstudio.com/)\n2. Now you can open your addons directory in VSCode and boom, you have the power of FTP all in one editor! 😎\n\n## The Conclusion\n\nNow that we have the Github Repository storing the server files, the DeployHQ account ready to push our changes to the live server, and the dedicated server to make the changes on, we just need to put it all together.\n\n### Development Flow\n1. Open your server's `addons` directory in VSCode. You can either open a terminal in the addon's directory and type `code .` or you can right click in the directory and click 'Open with Code'.\n2. Make a change, or changes.\n3. Push changes to Github:\n```\ngit add .\ngit commit -m \"feat: my changes\"\ngit push origin main\n```\n4. Go to your DeployHQ overview and click `New Deployment`. Click Deploy to deploy your latest commit to the sever.\n\nAnd that's it, you just updated the live server with your local server's files!\n\n## Bonus!\nWhen commiting to github, you have to type 3 commands that are hard to remember every time. Make this process easier by installing my Github CLI, [Boom](https://www.npmjs.com/package/@steelio/boom-cli).\n\nThis cuts down the pushing process from this:\n```\ngit add .\ngit commit -m \"feat: my changes\"\ngit push origin main\n```\nTo only this:\n```\nboom push \"feat: my changes\"\n```\n\n1. Start by installing NodeJS, [here](https://nodejs.org/en) You may have to restart your computer after, I am not sure.\n2. Now install the Boom package with this command:\n```\nnpm install -g @steelio/boom-cli\n```\n3. Now close the terminal and open it back up and type `boom`.\n\nIf it works then great, you successfully installed Boom.\nNow everytime you want to push an update, type `boom push \"the update message\"`!\n\nThanks for reading this guide! I hope you found something useful in it. If you want to contribute, just make a PR ❤️\n  \nhttp://codesteel.io/\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodesteel%2Fhowtogmodserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodesteel%2Fhowtogmodserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodesteel%2Fhowtogmodserver/lists"}