You can create a server in CS2 to play with friends in three ways: build a lobby from your friends list and play on Valve servers, set up a shared virtual network with Radmin VPN or Hamachi and join by IP with the connect command, or run your own local server with the -dedicated launch parameter and the map you want. A lobby is the easiest option for a friendly match; for your own rules and configs you need your own server.
In CS:GO it was enough to start a practice game with bots and let a friend join. In Counter-Strike 2 that route often ends with a "session full" error, so it is more reliable to connect to existing servers or create your own network. Below is each option step by step, plus the console commands for an offline server. If you only want to queue together, see the separate guide on how to play CS2 with friends.
How to add a person to your friend list
In order to play with your friend, the first thing you need to do is add them to your friends list on Steam. To do this you need to:
Open your friends list in Steam.
Click the icon next to the search bar.
Enter a nickname or friendship code that a friend might tell you. The code is located in the profile settings.
After you send the request, your friend must accept it.

After confirmation, your friend will be added to your friends list, and you can play together not only in CS2, but also in any online games that support the friend search function.
If your friend is not on your Steam friends list, you cannot invite them to a lobby for official modes such as Premier, Competitive or Wingman. However, they can still join your own server, because in that case the connection goes by IP.
How to play with a person from your friend list in CS 2
There are several methods that differ in the connection method and the ability to customize your game:
Official game - Premier, Competitive and Wingman. If you want to have fun with a friend, then this option is not suitable.
Closed match selection - thanks to closed selection, you can create your own server in cs 2, which your friends can join. The game takes place on Valve servers. If you just want to have a friendly match, then this is the best way.
Community servers are unofficial servers created by other players. They often contain mods and plugins that change the gameplay and textures (for example, CS2 servers with skins).
Your own local server - this server will be hosted on your computer, you will have full access to it.
How to create a lobby in CS 2
In order to create a lobby, you just need to open the friends menu in the main menu and invite your friend. If the invitation is accepted, a lobby will be created. Now you can play all the official ranked modes together, just press Play and start the search.
How to close a lobby
After creating a lobby, you can close it so that no one except the friends you invite can enter. To do this, go to the map selection, there will be a switch on the left panel. Turn it off, then your group will be closed.
If you want to find a new teammate for your group, or you want to play with someone, but your friends are busy, then leave the slider on.
How to create your own server in cs 2
There are several ways that will allow you to create a server in cs 2. One of them is provided by the functionality of the game itself, the second will require the intervention of third-party programs.
Radmin
The Radmin VPN application lets you to play with a friend on an unofficial server. The order of necessary actions is as follows:
Install the Radmin application from the official website.
Launch the application and go to the "network" tab.
Next, create your network, set a name and password for it.
Start a game with bots from the CS2 main menu (how to launch the map you want, including Workshop maps, is covered in how to launch a map with friends).
If a friend wants to connect, they need to:
Also install the application and launch it.
In the "network" tab, find the "join network" button.
In the input window you need to write the name of the network and the password for it that you set.
If the data is entered correctly, you will be given an IP by which you can join.
Go to CS2, open the console and enter "connect (ip)".
There are alternative applications, but Radmin allows you to create a server in cs 2 without any extra effort, and connecting to it is also simple.
Hamachi
Hamachi is one of the oldest tools for creating a virtual local network. It is less convenient than Radmin, but it works in a similar way.

To create a local match you need:
Download the Logmein Hamachi application
Prepare a server config (ready-made CFG files for Hamachi are easy to find with a search like "CFG to create a server in cs 2 Hamachi"; download only from trusted sources).
After that, open Hamachi and in the "Network" create a server, set a name and password for it.
Start Counter-Strike 2.
Replace the files in the game folder with the downloaded ones.
In the console, enter connect *ip*.
Once your friend has installed Hamachi, to connect they need to:
In the tab "network" join the network using your password and name.
After copying the IP, enter it into the CS 2 console to log into the server.
How to create a local offline server
If you want to play with your friend on an offline network, expect more setup work. The first step is to open port 27015. This is done differently on each router, so you will have to search the Internet yourself.
You only need to open the port for the IPv4 and UDP protocols. You can skip this step if the computers are on the same local network. If your computers are not connected by a local network, then closed ports will not allow a friend to join your server.
Find the .exe file of the game and move it to your desktop, open the properties with the right mouse button. In the "Target" field enter -dedicated -usercon +game_type 0 +game_mode 1 +map de_dust2. The command must be after the closing quotes.
Instead of de_dust2, specify the map that you want to run on your server. A list of map names can be found on the Internet.
Open Counter-Strike 2 through the Steam application, and then launch the shortcut into which you entered the commands and map name. The console should appear on your monitor.

Switch to the CS2 window and enter "connect localhost" into the console. If your server has started, congratulations, the hardest part is over. Now you can add your own settings to the shared config folder (see how to install a config in CS2). To apply one, type "exec config_name" in the server console. If the config installation was successful, the round on the server will start again with new settings.
In order for your friend to join your offline server, you need to provide the IP. To find it out, enter "status" into your server console. Your friend then types "connect ip" in their game console.

When creating a server in cs 2 in this way, remember that the host is your computer, this loads the system and reduces performance, so you can forget about stable FPS.
If you leave the server, it stays on as long as its console is running. To change the map, enter "changelevel map_name" in the server console and restart your config using the command "exec file name".
Possible problems
When creating an offline server or lobby, questions may arise. Answers to the most common ones:
What to do if your CS2 session is full - most likely you are trying to join through practice mode. That used to work, but now you need to create your own network through third-party applications or the console.
Why my friend's lobby invite does not arrive - turn off Invisible mode, if it is on, re-login to Steam and Counter-Strike 2.
Why is there such a high ping on the server - if you made your own network, then this may be due to a weak Internet or the location of the host. If you are playing on an official server, try again later: the servers closest to you may be overloaded.
I can't invite my friend to the lobby - exit the game, add CS to the firewall exception list and enter the game again. If this does not work, then let a friend invite you to the lobby.
If you carefully follow the tips from the article, you should not have any problems creating your own server in cs 2. It is worth noting that you should not use your computer as a host for an offline server, if it is weak, you simply will not be able to play normally. In this case, it is better to place a server on a friend's computer, or rent online hosting for a day and run your server there.
If you cannot find information on how to open ports on your router, then, if possible, connect your computers to a local network, then closed ports will not prevent your friend from joining your match.
If you want to install some mods or textures on your server, then your friend must also download them in order to access the server. You can add plugins without any problems if you use online hosting. If you want to add plugins to a server hosted by your computer, then be aware that this will be a large additional load, which can cause high input lag and game crashes.
If your friend cannot join your server by IP, double-check the address you sent: that is the most common mistake. If the server config needs your identifier, see how to find your Steam ID.
