Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Set hostname "Your Server Name" in the server’s server.cfg, save the file, and restart the Counter-Strike 2 dedicated server. Hosted-panel users edit the file in the panel’s file manager or use its console; self-hosted Linux users edit the file under game/csgo/cfg/. The restart is required for the new name to be advertised to the Steam master list.

What the server name setting controls

Counter-Strike 2 displays the dedicated server’s configured hostname in server listings and to players who connect. The persistent setting is the hostname console variable. It belongs in the server configuration file, not in a client-side game setting.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A typical entry is:

hostname "My CS2 Server"

The quotation marks keep spaces together as one value. Replace the text inside them with the name you want players to see. Put the command on its own line; do not append it to another setting.

Changing the file alone does not reload a running process. Stop and start, or otherwise fully restart, the server after saving. During startup, CS2 reads the file and publishes the resulting hostname. A server-browser listing can take several minutes to reflect a restart, so check the running server locally before assuming the edit failed.

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
  • With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
  • Wide Application:Upgraded attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
  • Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
  • Warranty & Support: Our Electric air duster comes with 5 years warranty and 24/7 customer service. During this period, if you have any questions,pls kindly feel free to contact us.

Choose the method that matches your setup

Method Where the name is stored Persistence Best use
server.cfg game/csgo/cfg/server.cfg Persistent across restarts Normal operation; works on hosted panels and self-hosted servers
Launch parameter Your startup script or panel startup command Persistent while the parameter remains in the startup command Script-managed servers or installations that regenerate configuration files
Server-console command Running process memory Temporary; normally lost at the next restart Testing a name before committing it to configuration

Use one persistent method as the source of truth. If both a configuration file and a launch command set a name, the value applied by the startup process can determine what players see. Keep the two values consistent to avoid confusion.

Before editing: identify how the server is managed

Panel-managed server

A game-hosting control panel normally gives you a file manager, a start/stop control and a console. Stop the server before editing when the provider’s workflow expects files to be changed while the process is offline. This prevents a running process or an automatic configuration writer from replacing your edit during shutdown.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Self-hosted Linux server

For a SteamCMD installation, locate the directory in which you installed CS2. The configuration file is inside that installation at game/csgo/cfg/server.cfg. For example:

/home/cs2/server/game/csgo/cfg/server.cfg

CS2 dedicated servers use Steam app ID 730, start with the -dedicated option and, on Linux, are normally launched through the cs2.sh script rather than invoking the game binary directly. The exact installation root can differ, so use the path in your own startup script.

Back up the current file

Make a copy of server.cfg before changing it. A backup gives you a way to restore the previous configuration if a panel update, permissions problem or typo causes an unrelated setting to disappear. Preserve the existing line endings and file permissions when possible.

Rank #2
EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
  • Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
  • Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
  • Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
  • Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
  • Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth

Change the name in a hosting panel

  1. Stop the server. In the panel, choose the server’s stop or power-off action and wait until the status shows that the process has ended.
  2. Open the file manager. Browse to game/csgo/cfg/. Some panels expose the container root directly; in that layout the path is /home/container/game/csgo/cfg.
  3. Open or create server.cfg. If the file is present, use the panel’s edit function. If it is absent, create a plain-text file with exactly that filename. Check that the panel did not add a second extension such as .txt.
  4. Add the hostname line. Insert a separate line such as hostname "My CS2 Server". Keep other configuration commands intact.
  5. Save the file. Confirm that the editor reports a successful save before leaving the page. If the panel has both Save and Apply buttons, use both.
  6. Start or restart the server. Use the panel’s start control. A restart, rather than merely reconnecting a client, is what makes CS2 read the new value and announce it.
  7. Verify in the console or in-game. Use the checks in the verification section before waiting for the public browser to update.

Some panels provide a built-in startup-variable field instead of exposing files. If that field generates server.cfg at every boot, a manual edit may be overwritten. In that case, put the name in the panel’s persistent startup configuration or use the launch-parameter method below.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Change the name on a self-hosted Linux server

  1. Stop the dedicated server process. Use the service manager, terminal session or script that normally controls your server. Do not edit a file that an automated deployment is actively rewriting.
  2. Open the configuration directory. From the installation root, go to game/csgo/cfg/. With the example installation path, the file is /home/cs2/server/game/csgo/cfg/server.cfg.
  3. Edit the file as plain text. Add the line hostname "My CS2 Server". If you use a terminal editor, retain the existing commands and save with the filename exactly server.cfg.
  4. Check ownership and permissions. The account that launches the server must be able to read the file. If you edited it as root, make sure the service account can still access it.
  5. Start the normal launcher. Run the same cs2.sh-based command or service definition you normally use, including -dedicated and your other required options.
  6. Watch startup output. Confirm that the process reaches its ready state, then perform an in-game or console verification.

Do not place the command in the client installation’s configuration directory by mistake. The relevant file is inside the dedicated-server installation that is actually being launched.

Use a launch parameter instead

If your server starts from a shell script, systemd unit or panel startup command, you can pass the name at launch:

./cs2.sh -dedicated -maxplayers 16 -port 27015 +hostname "My CS2 Server"

The important part is +hostname "My CS2 Server". Keep it in the command that really starts your server; editing an unused script will have no effect. A panel may display the same command as a startup template rather than a shell file.

This method is useful when an image or deployment process recreates server.cfg. Its persistence comes from the startup command, so the name will disappear if the script is replaced or the parameter is removed. Document the parameter alongside the rest of your launch options and quote the value when it contains spaces.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black
  • 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
  • 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
  • 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
  • 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
  • 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.

If you maintain both a server.cfg entry and a launch parameter, use the same spelling in both places. When the displayed value differs, remove the duplicate or make one clearly authoritative, then restart and verify which value CS2 applies.

Test a name temporarily from the server console

For a quick test, enter the command in the dedicated-server console:

hostname "Test Name"

Players can then reconnect or refresh their view to see whether the value is accepted. This changes the running process only. Unless you also save the command in server.cfg or the launch command, the setting normally returns to the configured value after the next restart.

Use the console test to diagnose whether the variable is recognized, not as your final deployment method. A temporary value can also be lost when the process crashes, is updated or is restarted by a hosting panel.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

hostname versus sv_hostname

Guides for CS2 commonly use hostname in server.cfg. That is the setting to try first:

Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
  • 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
  • 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
  • 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
  • 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.
hostname "My CS2 Server"

Some third-party instructions instead show sv_hostname. The available guidance does not establish that sv_hostname is a confirmed CS2 console variable, so do not substitute it automatically. If hostname appears to be ignored, test the running server rather than adding both commands blindly.

  1. Open the dedicated-server console.
  2. Run find hostname to list matching console variables and confirm what the server exposes.
  3. Set the recognized variable temporarily, then inspect the result with the verification steps below.
  4. Once you know which variable works in your build, place that command in server.cfg and restart.

Because CS2 is updated over time and hosting images can differ, the console’s result is more reliable for your installation than an old guide that assumes a different build.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Verify that the new name is active

Check from the server console

Run:

find hostname

This searches available console-variable names for the keyword and helps confirm that the server has a matching setting. It is a discovery command, not a guarantee that every returned item controls the public browser label.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Check from a connected client

  1. Connect to the server using its address.
  2. Open the developer console with the key assigned to ~ on your keyboard layout.
  3. Run status.
  4. Inspect the first line of the output for the active hostname.

This check tells you what the running server is presenting to a connected client. It is more useful than relying on a stale browser entry.

Check the public browser

After a successful restart, refresh the server list and search for the address or other identifying details. The listing may take several minutes to show the new name. The exact propagation time is not fixed, so do not repeatedly restart a healthy server just because the browser still displays the old entry.

Best Value
Sale
Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
  • 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
  • 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
  • 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
  • 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
  • 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.

Troubleshoot an unchanged name

Symptom Likely cause What to do
The file edit saves, but the old name remains immediately The process was not restarted Stop and start the server, then check status from a connected client.
The panel shows a new line, but startup restores the old value A startup template or deployment process rewrites server.cfg Put the value in the panel’s persistent startup field or add +hostname to the actual launch command.
The server starts, but the name is blank or malformed Typo, missing quotation mark or command merged with another line Use one complete line: hostname "Name"; remove stray characters and restart.
The file appears correct, but the server ignores it Wrong installation path or unreadable file Confirm the launched installation’s game/csgo/cfg/server.cfg path and verify ownership and read permissions.
sv_hostname has no visible effect The variable may not be supported or may not control the browser label in your build Run find hostname, use the recognized hostname variable and test again.
The in-game name is correct but the browser is old Listing propagation delay or cached results Wait several minutes, refresh the browser and avoid unnecessary restarts.
The server fails to start after editing Accidental deletion or syntax damage elsewhere in server.cfg Restore the backup, start the server, then reapply only the hostname line and test.

Practical naming guidance

Choose a short, recognizable label that tells players what the server is for. Include a community name, game mode or region only when it helps identification. Avoid putting operational instructions, passwords or private contact details in a value that is sent to the public server list.

Keep the name on one line and use ordinary text while diagnosing a problem. Special characters can be introduced after the basic version works, one change at a time, so a display issue can be traced to the most recent edit. Do not include a line break inside the quoted value.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If several servers share one machine, give each process a distinct name and verify that each startup command points to the intended installation and port. Editing one server’s server.cfg cannot change a different process launched from another directory.

Recommended workflow for reliable changes

  1. Record the current hostname and back up the configuration.
  2. Identify whether the panel, a script or a service file is the authority that starts the server.
  3. Set hostname "New Name" in that authority’s configuration.
  4. Restart the dedicated server completely.
  5. Use status from a connected client to confirm the active value.
  6. Refresh the public browser after allowing time for propagation.
  7. If the old name returns on the next restart, inspect startup templates and duplicate launch parameters before editing the file again.

The same procedure applies whether the server is hosted remotely or run on your own Linux machine: the setting is the same, but the place where you edit it changes. A persistent file or startup parameter is required for the name to survive restarts; a console-only change is for testing.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.