Private customers Business customers

Join a CS2 serverConnect via the console with IP and port

You have started your Counter-Strike 2 server and want to get going with friends? This is how to connect step by step - via the developer console with connect IP:port. You find IP and port at any time in our web interface.

connect IP:portDeveloper consoleCommunity browser

Published on · last updated on

Get IP and port from the web interface

Every server at MainHoster.de has a fixed address made up of IP and port. You find both after ordering in the web interface on the server overview - in the form IP:port, for example 12.34.56.78:27016. You enter exactly this combination in the game, and you pass exactly this combination on to your fellow players.

The well-known CS2 default port 27015 only serves as orientation. Your server runs on the port the panel shows you, and that can differ. So do not rely on the default value, but use the displayed port - ideally by copying rather than typing it.

The IP alone is not enough: without the port, Counter-Strike 2 does not know which service to address. Always enter both together, separated by a colon. The address stays assigned to your server permanently - so you can pass it on to your group once and do not have to look it up again before every session.

CS2 server hosting from €5.99 / month

Prepaid without a contract, DDoS protection up to 250 Gbit/⁠s.

View plans & prices

How do you activate the developer console?

To connect via IP, you need the console - it is switched off by default in Counter-Strike 2 and has to be enabled once:

  1. Start Counter-Strike 2 and open Settings.
  2. Under Game, enable the option Enable Developer Console (~).
  3. From then on, you open the console in the game with the ~ (tilde) key.

Then open the console and enter the connect command:

connect 12.34.56.78:27016

Replace IP and port with the values from your panel. This way always works, regardless of your server's public visibility. If the server also has a valid GSLT, it additionally appears in the Steam community server browser and can be joined from there too.

You only need to enable it once - the setting then stays active permanently. If the console does not open at some point later, first check in the settings whether the option is still set.

Connect with a server password

If a sv_password is set on the server, the plain connect command is not enough - the attempt aborts as if the server did not exist. You pass the password in the same line:

connect 12.34.56.78:27016; password yourpassword

The semicolon separates two commands. You can also issue password yourpassword on its own beforehand and connect afterwards - all that matters is that the password is set before the connection is established.

  • Upper and lower case count. That is the most common reason why it does not work for one person in the group while everyone else is in.
  • No spaces in the password. The console splits the line at spaces - use a password without them.
  • The server password is not the RCON password. One opens the door, the other the server controls. Never pass on the second, see RCON commands.

If the server is to be open, sv_password belongs empty in the configuration. Why this value can still be set again after a restart is explained in server.cfg explained.

After joining: the first steps

You are in - now a quick check whether everything runs as it should is worthwhile. Three things are clarified in a minute:

  1. Are you on the right server? status in the console shows server name, map and connected players. Anyone who accidentally used an old, saved address notices it here at the latest.
  2. Is the desired mode running? If the map or round rules do not match what you set up, the server loaded a different config than you thought.
  3. Do you have admin rights? You log in with rcon_password YOUR_PASSWORD; afterwards, you control the server directly from the game with rcon in front.

This lets you change the map or reload a config from the running round, instead of switching to the web interface for it. The common commands are in RCON commands. Keep in mind that most values set this way do not survive the next map change - a value only becomes permanent once it is in a file.

What to do if the connection does not work?

Almost always, one of three causes is behind it. Check them in this order:

  1. Is the server running? A stopped server accepts no connections - the status in the panel answers this in seconds.
  2. Are IP and port exactly right? The port has to be the one from the panel, not the default port. Typos are the most common cause of all.
  3. Do server and client versions match? After a Valve update, it can take a moment until the server has caught up.

Distinguish cleanly between not reachable and not visible: if connect IP:port works but the server is missing from the community browser, that is not a connection problem - only the GSLT for public listing is missing.

If only part of your group cannot get in, first check whether everyone uses the same address: an outdated IP:port combination that was passed on once produces exactly the same error pattern as a stopped server.

This guide describes the normal case - joining a server that is running. If, on the other hand, the connection attempt keeps hanging or the server does not show up for anyone, that is a topic of its own: the systematic narrowing down including GSLT, sv_lan and plugin causes is in server not reachable.

Frequently asked questions

Enable the developer console in the CS2 settings, open it with the tilde key (~) and enter connect IP:port - with the values from your web interface. Always enter IP and port together.

Not necessarily. 27015 is only the CS2 default port. Your rented server uses its own port shown in the panel - that is why you always connect with IP and port together.

For public visibility in the Steam server browser, the server needs a valid GSLT. No GSLT is needed just to connect via connect IP:port.

Rent your own CS2 server

Sub-tick optimized hardware, unlimited slots, Workshop maps, Metamod:Source & CounterStrikeSharp - prepaid, made in Germany.

View plans & prices

CS2 server hosting

from €5.99 / month

Prepaid without a contract, DDoS protection up to 250 Gbit/⁠s, hosted in Frankfurt am Main.

View plans & prices

Go straight to checkout

Read more


Discover more