Server Setup Guide for [Garry's Mod] Gamers
Game Server Requirements
Establishing a robust Garry's Mod server, particularly one designed for a thriving community of players, necessitates a careful consideration of underlying hardware and software specifications. The demands placed upon a server are directly proportional to the number of concurrent players, the complexity of the installed addons and game modes, and the overall activity within the server environment. Understanding these foundational requirements is paramount to ensuring a smooth, lag-free, and enjoyable experience for all participants.
At its core, a Garry's Mod server operates as a dedicated application that manages game state, player connections, and the execution of server-side scripts. This process is inherently resource-intensive. The central processing unit (CPU) is arguably the most critical component. A high clock speed per core is generally more beneficial than a large number of cores with lower clock speeds, as the Source engine, upon which Garry's Mod is built, often struggles to fully utilize multiple cores for single-threaded tasks. Therefore, a modern CPU with strong single-core performance, such as an Intel i7 or i9 (10th generation or newer) or an AMD Ryzen 7 or 9 (5000 series or newer), is highly recommended for servers hosting more than a handful of players or running complex game modes like DarkRP or TTT. For smaller, more casual servers with fewer than 10 players and minimal addons, an Intel i5 or AMD Ryzen 5 equivalent might suffice, though performance may be less consistent under load.
Random Access Memory (RAM) is another vital resource. Garry's Mod servers, especially those with numerous addons, custom content, and a significant player count, can consume substantial amounts of RAM. Each player connected to the server, each loaded texture, model, script, and map element contributes to the overall memory footprint. A baseline recommendation for a small server (up to 10 players) would be 8 GB of RAM. However, for a medium-sized server (10-30 players) with a moderate number of addons, 16 GB is a more prudent choice. Large community servers (30+ players) or those running particularly memory-intensive game modes should ideally be provisioned with 32 GB or even 64 GB of RAM to prevent memory exhaustion and subsequent server crashes or performance degradation (Computer Organization and Design: The Hardware/Software Interface). It is crucial to remember that the operating system itself will also consume a portion of the available RAM, so allocating sufficient overhead is essential.
Storage, while perhaps less impactful on real-time performance than CPU or RAM, plays a significant role in server responsiveness and reliability. Solid State Drives (SSDs) are unequivocally superior to traditional Hard Disk Drives (HDDs) for server environments. The rapid read/write speeds of SSDs drastically reduce map loading times, addon loading times, and the overall responsiveness of the server's file system operations. This translates directly into a better player experience, as players spend less time waiting for content to load. A minimum of 250 GB SSD is recommended for the operating system and game server files. For servers with extensive custom content, a 500 GB or 1 TB SSD might be necessary. While NVMe SSDs offer even greater speeds, the practical performance difference for a Garry's Mod server compared to a standard SATA SSD is often negligible and may not justify the increased cost unless other I/O-intensive applications are also running on the same machine.
Network connectivity is the final pillar of a stable Garry's Mod server. A high-bandwidth, low-latency internet connection is non-negotiable. The server needs to be able to send and receive data packets to and from all connected players efficiently. A dedicated internet connection with a minimum upload and download speed of 100 Mbps is a good starting point for a small to medium server. For larger communities, a 1 Gbps (gigabit per second) connection is highly advisable. Crucially, the connection should be stable and have low latency (ping) to the geographical regions where the majority of players are located. High latency can lead to "rubberbanding," desynchronization, and a generally frustrating experience for players, even if the server's internal hardware is powerful. Furthermore, a reliable power supply and a robust cooling system are often overlooked but equally important. Server hardware generates heat, and inadequate cooling can lead to thermal throttling, reduced performance, and even hardware failure over time.
In summary, the ideal Garry's Mod server configuration balances these components to meet the specific demands of the intended player base and content. Over-provisioning slightly is often a wise investment, as it provides headroom for future growth and unexpected spikes in activity.
Beginner's Guide
Embarking on the journey of hosting your own Garry's Mod server can seem daunting at first, but with a structured approach, it's an entirely achievable and rewarding endeavor. This guide will walk you through the fundamental steps, from initial setup to getting your server online and ready for players.
The very first step involves acquiring the necessary server files. Garry's Mod servers are typically run as dedicated servers, meaning they operate independently of the game client. These files are usually obtained through SteamCMD, a command-line version of the Steam client. You'll need to download and install SteamCMD on your chosen server machine. Once installed, you'll use specific commands to log in anonymously and download the Garry's Mod dedicated server application. The command login anonymous followed by app_update 4020 validate will initiate the download of the core server files. It's crucial to ensure sufficient disk space is available for this download, which can be several gigabytes.
After the server files are downloaded, the next critical phase is configuration. The primary configuration file for a Garry's Mod server is server.cfg, located within the garrysmod/cfg directory of your server installation. This plain text file allows you to define various server-wide settings. Essential commands to include in your server.cfg are hostname "Your Server Name Here" to set the name that appears in the server browser, sv_password "YourPassword" if you wish to protect your server with a password (remove or comment out for a public server), rcon_password "AdminPassword" for remote console access, and sv_maxplayers X to set the maximum number of players your server can accommodate. Other important settings include sv_pure 0 (often set to 0 for custom content, though 1 offers more security against client-side cheats), sv_region 3 (for North America, adjust as needed for your region), and map gm_construct (or your desired starting map). Each command should be on its own line.
Launching the server is the next logical step. This is typically done via a batch file (.bat on Windows) or a shell script (.sh on Linux). The script will execute the srcds.exe (Windows) or srcds_run (Linux) executable, passing various command-line parameters. A basic Windows batch file might look like this: srcds.exe -game garrysmod -console -autoupdate -maxplayers 16 +map gm_construct. The -game garrysmod specifies the game, -console keeps the server running in a console window, -autoupdate attempts to update the server on startup, -maxplayers 16 overrides the sv_maxplayers setting in server.cfg (though server.cfg is generally preferred for this), and +map gm_construct sets the initial map. For Linux, the command would be similar, using ./srcds_run instead of srcds.exe.
Once the server is running, you'll need to ensure it's accessible to other players. This involves configuring your network, specifically port forwarding. Garry's Mod servers primarily use UDP port 27015 for game traffic and UDP port 27005 for client queries. You'll need to access your router's administration interface and create rules to forward incoming traffic on these ports to the internal IP address of your server machine. The exact steps for port forwarding vary significantly between router models, so consulting your router's manual or an online guide specific to your model is often necessary. Without proper port forwarding, players outside your local network will be unable to connect to your server.
Finally, to enhance your server and make it more engaging, you'll want to install addons and game modes. The primary method for this is through the Steam Workshop. You'll need to create a workshop.lua file in your garrysmod/lua/autorun/server directory. Within this file, you'll list the Workshop IDs of the addons you wish to subscribe to. For example, resource.AddWorkshop("104609200") would add the "Wiremod" addon. You'll also need to generate a Steam Web API key from your Steam account and add it to your server.cfg using the command sv_steamgroup_apikeys "YOUR_API_KEY_HERE". This allows your server to download Workshop content. For custom game modes, you typically place their folders directly into the garrysmod/gamemodes directory. To activate a game mode, you can use the gamemode "gamemode_folder_name" command in your server.cfg or via the server console.
Remember to regularly back up your server files, especially your cfg folder and any custom content, to prevent data loss. Starting small, testing configurations, and gradually adding complexity will make the learning process much smoother.
Hosting Service Comparison and Recommendations
Choosing the right hosting service for your Garry's Mod server is a pivotal decision that directly impacts performance, reliability, and your overall administrative experience. The market offers a diverse range of options, from shared hosting to dedicated servers, each with its own set of advantages and disadvantages. This section will delve into a comparative analysis, providing recommendations tailored specifically for the unique demands of Garry's Mod.
Shared Hosting: This is often the most economical option, where multiple server instances, including yours, share resources on a single physical machine.
Pros: Low cost, easy setup, often includes a user-friendly control panel (e.g., TCAdmin, Pterodactyl).
Cons: Performance can be inconsistent due to resource contention with other users. Limited customization options. Not ideal for large communities or resource-intensive game modes.
Recommendation: Suitable for very small, casual servers (under 10 players) with minimal addons, primarily for friends or small groups. Not recommended for serious community building.
Virtual Private Servers (VPS): A VPS provides a virtualized slice of a physical server, offering dedicated resources (CPU, RAM, storage) within that virtual environment. You have root access and more control over the operating system.
Pros: Better performance and stability than shared hosting. More control and customization. Scalable resources.
Cons: Requires more technical knowledge to set up and manage the operating system and server software. Can be more expensive than shared hosting.
Recommendation: An excellent choice for medium-sized Garry's Mod servers (10-30 players) with a moderate number of addons and custom content. Offers a good balance of cost, performance, and control. Ideal for those willing to learn basic Linux or Windows server administration.
Dedicated Servers: With a dedicated server, you rent an entire physical machine exclusively for your use. This provides maximum performance, control, and customization.
Pros: Unparalleled performance and stability. Full control over hardware and software. No resource contention.
Cons: Most expensive option. Requires significant technical expertise for setup, maintenance, and security.
Recommendation: The ultimate solution for large, high-traffic Garry's Mod communities (30+ players), complex game modes (e.g., DarkRP, Star Wars RP), or servers with extensive custom content and demanding performance requirements. Essential for competitive or professional Garry's Mod environments.
Game Server Providers (GSPs): These are specialized hosting companies that offer pre-configured game servers. They often use shared or VPS infrastructure but provide a tailored control panel and support specifically for game server management.
Pros: Extremely user-friendly, often one-click setup for Garry's Mod. Dedicated support for game-specific issues. Pre-installed addons and mod managers.
Cons: Can be more expensive than a raw VPS for comparable resources. Less control over the underlying operating system. May have limitations on custom modifications.
Recommendation: Highly recommended for beginners or those who prefer a hands-off approach to server administration. Excellent for small to medium servers where ease of use and dedicated game support are prioritized over granular control.
When evaluating specific providers, several key factors should guide your decision:
Hardware Specifications: As detailed in the "Game Server Requirements" section, prioritize CPU single-core performance, sufficient RAM, and SSD storage.
Network Latency and Location: Choose a data center geographically close to your target player base to minimize ping. Providers often list their data center locations.
Customer Support: Responsive and knowledgeable support is invaluable, especially when troubleshooting complex server issues. Look for providers with 24/7 support and positive reviews regarding their technical assistance.
Control Panel: For GSPs, evaluate the intuitiveness and features of their control panel. For VPS/Dedicated, consider if they offer a management panel (e.g., cPanel, Plesk) or if you'll be managing via SSH/RDP.
Backup Solutions: Ensure the provider offers robust backup options or that you have a clear strategy for implementing your own.
DDoS Protection: Garry's Mod servers can be targets for Distributed Denial of Service attacks. A good hosting provider will offer some level of DDoS mitigation.
Pricing Structure: Compare monthly costs, setup fees, and any hidden charges. Be wary of providers offering unrealistically low prices, as this often comes at the expense of performance or support.
Specific Recommendations (General Categories, not specific companies):
For Beginners/Casual Players: Look for GSPs specializing in Garry's Mod. They abstract away much of the technical complexity, allowing you to focus on gameplay and community. Prioritize ease of use and good customer support.
For Enthusiasts/Small Communities: A well-configured VPS from a reputable provider offers a great balance. You'll gain valuable server administration skills and have more flexibility. Focus on CPU and RAM specifications.
For Large Communities/Professional Servers: A dedicated server is the only viable option. Research providers known for high-performance hardware and excellent network infrastructure. Be prepared for the increased administrative overhead.
Ultimately, the best hosting service is one that aligns with your technical proficiency, budget, and the specific needs of your Garry's Mod server community. A thorough review of user testimonials and independent benchmarks can also provide valuable insights.
Troubleshooting
Even the most meticulously configured Garry's Mod server can encounter issues. Effective troubleshooting is a critical skill for any server administrator, allowing for rapid identification and resolution of problems that can disrupt gameplay and frustrate players. This section outlines common server problems and systematic approaches to diagnose and fix them.
1. Server Not Appearing in Browser/Players Cannot Connect:
Symptom: Players report "Server not responding," "Connection failed," or the server doesn't show up in the in-game server browser.
Diagnosis:
Port Forwarding: This is the most frequent culprit. Verify that UDP ports 27015 and 27005 are correctly forwarded to the server's internal IP address on your router. Use an online port checker tool (e.g., CanYouSeeMe.org) to confirm ports are open from the internet.
Firewall: Check the firewall on the server machine itself (Windows Firewall, iptables on Linux). Ensure exceptions are made for srcds.exe (or srcds_run) and for UDP ports 27015 and 27005.
Public IP Address: Confirm that players are attempting to connect to the correct public IP address of your server. If your IP is dynamic, it may have changed. Consider using a Dynamic DNS (DDNS) service.
Server Crash: Check the server console or logs for any error messages indicating a crash or failure to start.
Resolution: Correct port forwarding rules, adjust firewall settings, verify public IP, restart server if crashed.
2. High Latency (Lag) or Rubberbanding:
Symptom: Players experience significant delays, characters snapping back to previous positions, or general unresponsiveness.
Diagnosis:
Network Bandwidth: Is your server's internet connection saturated? Check network usage on the server. Other applications or users on the same network can consume bandwidth.
Server Location: If players are geographically distant from the server, high ping is inevitable.
CPU Overload: A struggling CPU can't process game logic and network packets fast enough. Check CPU usage on the server.
Addon Issues: Certain poorly optimized addons can cause server-side lag. Try disabling recently added addons one by one.
DDoS Attack: While less common for small servers, a DDoS attack can flood your connection.
Resolution: Upgrade internet plan, consider a hosting provider closer to players, upgrade CPU, identify and remove problematic addons, contact hosting provider for DDoS mitigation.
3. Server Crashing or Freezing:
Symptom: The server abruptly stops running, closes, or becomes unresponsive.
Diagnosis:
Server Logs: The most crucial tool. Examine the console.log or other server logs (usually in garrysmod/console.log or a similar path) for error messages, particularly "out of memory" errors, "segmentation faults," or specific addon-related errors.
Memory Exhaustion: Garry's Mod servers, especially with many addons, can run out of RAM. Monitor RAM usage.
Corrupt Files: Corrupted map files, addons, or core server files can cause crashes.
Problematic Addons/Game Modes: A newly installed or updated addon/game mode might have bugs.
Hardware Failure: Less common, but faulty RAM or an overheating CPU can cause instability.
Resolution: Increase RAM, remove/update problematic addons, verify server files through SteamCMD (app_update 4020 validate), replace corrupt files, monitor hardware temperatures.
4. Addons Not Working or Loading:
Symptom: Installed addons don't appear in-game, produce errors, or don't function as expected.
Diagnosis:
Workshop ID: Double-check that the correct Workshop ID is listed in your workshop.lua file.
API Key: Ensure your Steam Web API key is correctly configured in server.cfg and is valid.
File Paths: For non-Workshop addons, verify they are placed in the correct directories (e.g., garrysmod/addons/myaddon).
Dependencies: Some addons require other addons to function. Check their Workshop pages for dependencies.
Conflicts: Two addons might conflict with each other.
Server-Side vs. Client-Side: Some addons are purely client-side and won't affect the server.
Resolution: Correct Workshop IDs, regenerate API key, verify file paths, install dependencies, temporarily disable addons to identify conflicts.
5. Low FPS on Server (Server-Side Lag, not client-side):
Symptom: The server's tick rate drops, leading to choppy gameplay for all players, even those with good client-side FPS.
Diagnosis:
CPU Bottleneck: The server's CPU cannot keep up with the game logic, physics calculations, and script execution. This is common with complex game modes or many entities.
Excessive Entities/Props: Too many active entities, physics objects, or complex contraptions can overwhelm the server.
Poorly Optimized Scripts: Custom scripts or addons with inefficient code can consume excessive CPU cycles.
Resolution: Upgrade CPU, implement server-side cleanup scripts to remove unused entities, identify and optimize/remove CPU-intensive addons/scripts.
General Troubleshooting Principles:
Isolate the Problem: If an issue arises after a change (new addon, configuration tweak), revert that change first.
Check Logs: Always consult server logs for error messages. They are your primary diagnostic tool.
Restart: A simple restart can often resolve temporary glitches.
Search Online: Many common issues have been encountered and solved by others. Use search engines with specific error messages.
Community Forums: The Garry's Mod community forums and Discord servers are excellent resources for help.
By systematically approaching problems and utilizing available diagnostic tools, you can effectively troubleshoot and maintain a healthy Garry's Mod server.
Performance Optimization Tips
Optimizing your Garry's Mod server's performance is crucial for providing a smooth, responsive, and enjoyable experience for your players. Even with powerful hardware, inefficient configurations or resource-heavy content can lead to lag and instability. This section outlines key strategies and techniques to enhance your server's performance.
1. Hardware-Level Optimizations:
Prioritize CPU Single-Core Performance: As discussed in "Game Server Requirements," the Source engine benefits significantly from high clock speeds per core. If upgrading, focus on CPUs with strong single-threaded benchmarks.
Ample RAM: Ensure your server has more than enough RAM to accommodate the operating system, the Garry's Mod server process, and all loaded addons and content. Memory exhaustion leads to swapping to disk, which is significantly slower.
SSD Storage: Using an SSD (preferably NVMe for the OS and server files) drastically reduces load times for maps, addons, and server startup, contributing to overall responsiveness.
Stable Network Connection: A low-latency, high-bandwidth internet connection is paramount. Ensure your server is not sharing bandwidth with other demanding applications.
2. Server Configuration (server.cfg) Optimizations:
sv_maxrate and sv_minrate: These commands control the maximum and minimum bandwidth (in bytes per second) the server can send to a client. Setting sv_maxrate 0 (unlimited) and sv_minrate 10000 (or higher, depending on your connection) can help, but be mindful of your server's upload capacity.
sv_maxupdaterate and sv_minupdaterate: These control the maximum and minimum number of updates per second the server sends to a client. Higher values (e.g., sv_maxupdaterate 66) provide a smoother experience but consume more bandwidth. Balance this with your server's network capacity.
tickrate: While not directly set in server.cfg for Garry's Mod (it's a launch parameter), the default tickrate 66 is generally optimal. Lowering it (e.g., tickrate 33) can reduce CPU usage but makes the game feel less responsive. Only consider lowering if facing severe CPU bottlenecks.
sv_pure: Setting sv_pure 1 (or 2) can improve security by forcing clients to use server-provided files, potentially reducing the impact of client-side exploits. However, it can conflict with some custom content. sv_pure 0 is common for highly modded servers but comes with security trade-offs.
decalfrequency: Controls how often the server sends decal information (bullet holes, blood splatters). Lowering this value (e.g., decalfrequency 10) can reduce network traffic and client-side processing.
3. Addon and Content Management:
Prune Unused Addons: Every addon consumes resources (RAM, CPU, disk I/O). Regularly review your addon list and remove any that are no longer used or are redundant.
Optimize Custom Content:
Models and Textures: Ensure custom models and textures are optimized for games. High-resolution textures that are not properly compressed or models with excessive polygons can significantly impact performance. Use tools like VTFEdit and Crowbar for Source engine content.
Sound Files: Large, uncompressed sound files can consume memory. Convert them to appropriate formats (e.g., WAV, MP3) and ensure they are not excessively long.
Script Optimization: Poorly written Lua scripts can be major performance hogs.
Avoid Infinite Loops: Scripts that enter infinite loops without yielding can freeze the server.
Efficient Data Structures: Use appropriate data structures and algorithms.
Minimize Global Variables: Excessive use of global variables can lead to performance issues and conflicts.
Profile Scripts: Use server-side profiling tools (if available or custom-made) to identify CPU-intensive scripts.
Entity Management:
gmod_cleanup: Utilize the built-in gmod_cleanup command or similar server-side cleanup scripts to regularly remove unused props, ragdolls, and other entities that accumulate over time.
Limit Entity Spawns: Consider implementing limits on the number of entities players can spawn, especially physics-heavy ones.
Disable Unnecessary Physics: For static props, ensure their physics are disabled if they don't need to move.
4. Map Optimization:
Choose Optimized Maps: Some maps are simply better optimized than others. Maps with fewer complex physics objects, fewer unnecessary details, and efficient lighting can perform better.
Reduce prop_physics: Maps with an excessive number of prop_physics entities can strain the server's CPU with physics calculations.
Avoid Leaks: Leaks in map geometry can cause performance issues and visual glitches.
5. Operating System and Server Environment:
Dedicated Server: Run the Garry's Mod server on a machine dedicated solely to it, or at least with minimal other applications running.
Operating System Choice: Linux distributions (e.g., Ubuntu Server, Debian) are often preferred for game servers due to their lower resource overhead and greater stability compared to Windows Server, though Windows is also viable.
Regular Updates: Keep your operating system and server software (SteamCMD, Garry's Mod server files) updated to benefit from performance improvements and bug fixes.
Disable Unnecessary Services: On the server OS, disable any services or background processes that are not essential for the server's operation.
By systematically applying these optimization techniques, you can significantly improve the performance and stability of your Garry's Mod server, leading to a more enjoyable experience for your entire community.
Technical Q&A
This section addresses common technical questions that arise during the setup, maintenance, and optimization of a Garry's Mod server. The answers draw upon established principles of server administration, networking, and game engine mechanics.
Q1: What is the difference between sv_pure 0, sv_pure 1, and sv_pure 2?
A1: The sv_pure convar (console variable) dictates how the server handles client-side files and content.
sv_pure 0: This setting disables pure server mode. Clients are allowed to use any custom files (models, textures, sounds) they have locally, even if they differ from the server's files. This offers maximum flexibility for custom content but significantly increases the risk of client-side cheats and exploits, as clients can modify game assets to gain an unfair advantage. It's common on highly modded sandbox servers.
sv_pure 1: This enables pure server mode. The server will enforce that clients use only the files provided by the server for specific directories (e.g., materials, models, sound). If a client's file differs, they will be kicked. This enhances security by preventing many client-side modifications but can cause issues if clients have legitimate custom content that the server doesn't provide.
sv_pure 2: This is the strictest pure server mode. It enforces that all client files must match the server's files. Any discrepancy will result in the client being kicked. This offers the highest level of security against client-side tampering but is the most restrictive and can lead to more false positives with legitimate client-side addons. It's rarely used on public Garry's Mod servers due to its strictness.
Q2: How do I prevent my server from being griefed or attacked by malicious players?
A2: Server security is a multi-layered approach.
Strong RCON Password: Set a complex, unique rcon_password in your server.cfg. Never share it. RCON (Remote Console) provides powerful administrative control.
Admin Mod/Permissions System: Implement an administration mod like ULX or ServerGuard. These allow you to assign specific permissions to trusted players, ban/kick griefers, and manage server settings without using RCON directly.
DDoS Protection: Choose a hosting provider that offers robust DDoS (Distributed Denial of Service) mitigation. This protects your server's network connection from being overwhelmed by malicious traffic.
Firewall Configuration: Properly configure your server's firewall (e.g., Windows Firewall, iptables) to only allow necessary ports (27015 UDP, 27005 UDP) and block other incoming connections.
sv_pure Setting: As discussed above, sv_pure 1 or sv_pure 2 can prevent some client-side exploits.
Regular Backups: Regularly back up your server's cfg folder, data folder, and any custom content. This allows for quick recovery in case of data corruption or malicious damage.
Monitor Logs: Regularly review server logs for suspicious activity, repeated connection attempts from unusual IPs, or error messages that might indicate an attack.
Community Moderation: Empower trusted community members with moderation tools to help identify and deal with disruptive players.
Q3: My server is experiencing "out of memory" errors. What can I do?
A3: "Out of memory" errors indicate that your server is running out of available RAM.
Increase RAM: The most direct solution is to upgrade the physical RAM on your server machine or increase the allocated RAM if you're on a VPS.
Reduce Addons: Each addon consumes memory. Review your installed addons and remove any that are unnecessary, redundant, or known to be memory-intensive.
Optimize Custom Content: Large, uncompressed textures, models, and sound files can quickly fill up RAM. Optimize these assets for game use.
Cleanup Scripts: Implement server-side cleanup scripts that periodically remove unused entities, ragdolls, and props from the map. These objects, even if not actively interacted with, still consume memory.
Monitor Memory Usage: Use tools like htop (Linux) or Task Manager (Windows) to monitor your server's RAM usage over time. This can help identify peak usage periods and specific processes consuming the most memory.
Restart Server: A regular server restart can clear accumulated memory leaks from addons or the game engine itself, providing a fresh memory state.
Q4: How do I add custom maps to my Garry's Mod server?
A4: Adding custom maps involves a few steps:
Acquire the Map File: Custom maps are typically distributed as .bsp files. Download the desired map.
Place in Maps Folder: Copy the .bsp file into the garrysmod/maps directory of your server installation.
FastDL (Optional but Recommended): For players to download the map quickly, you should set up FastDL (Fast Download). This involves hosting the map file (and any custom content it uses) on a web server (HTTP/HTTPS).
Create a folder structure on your web server that mirrors your garrysmod directory (e.g., yourdomain.com/gmod/maps/mymap.bsp).
Add sv_downloadurl "http://yourdomain.com/gmod/" to your server.cfg.
Compress the .bsp file into a .bz2 format (e.g., mymap.bsp.bz2) and upload both the .bsp and .bz2 versions to your FastDL server. This significantly speeds up client downloads.
Change Map: You can change the map using the changelevel mapname command in the server console or RCON, or by setting map mapname in your server.cfg for the initial startup map.
Workshop Maps: If the map is from the Steam Workshop, you can add its Workshop ID to your workshop.lua file, similar to other addons. The server will then download it automatically.
Q5: What is a "tickrate" and how does it affect server performance?
A5: The tickrate (often expressed as "ticks per second" or "Hz") is the frequency at which the server updates the game state.
Function: At each "tick," the server processes player input, calculates physics, updates entity positions, executes server-side scripts, and sends updated information to clients.
Impact on Performance:
Higher Tickrate (e.g., 66 Hz): The server updates the game state more frequently. This results in smoother gameplay, more responsive controls, and more accurate physics calculations. However, it also demands more CPU resources from the server and consumes more network bandwidth.
Lower Tickrate (e.g., 33 Hz): The server updates the game state less frequently. This reduces CPU load and network bandwidth usage, making it suitable for servers with limited resources. However, it can lead to a less responsive feel, less accurate physics, and a choppier experience, especially in fast-paced scenarios.
Garry's Mod Default: Garry's Mod typically runs at a default tickrate of 66 Hz. This is generally a good balance for most servers.
Configuration: The tickrate is usually set as a launch parameter for the srcds.exe or srcds_run executable (e.g., srcds.exe -tickrate 66). It's generally not recommended to change this unless you have a specific reason and understand the trade-offs. If your server is severely CPU-bound, lowering the tickrate might provide some relief, but it's often a last resort after other optimizations have been exhausted.