Left 4 DeadGuideTurn on the developer console in Left 4 Dead, press ~ and type connect followed by the address and port from your server card. To play as a lobby, open How…
Turn on the developer console in Left 4 Dead, press ~ and type connect followed by the address and port from your server card. To play as a lobby, open How to join on your server card and follow the two lines on its Play as a lobby tab.
In the game's Options, open Keyboard/Mouse and set Allow Developer Console to Enabled.
Start your server from My Servers and wait for Online.
In the game, press ~ and type connect followed by the address and port from your server card, then press Enter.
On your server card, click the small arrow at the right end of the address, then press How to join in the row that opens. Its Join directly tab has the whole connect line ready to copy.

Friends join the same way with the address you send them. The in-game Invite button only works for lobbies.
Open How to join on your server card and pick the Play as a lobby tab. It shows two console lines: the first holds your server's Lobby Search Key, and the second its address, once the server is online.
The lobby leader types both lines in the console at the main menu, pressing Enter after each one.
The lobby leader creates the lobby with Server Type set to Best Available Dedicated.

The Lobby Search Key means the game's matchmaking sends a lobby to your server only when the lobby leader has typed that key.
Every player needs the same campaign installed on their own PC, because the game does not download campaigns from a server.
The server is asleep or stopped. Wake it or start it from the dashboard first and wait for Online.
The server is full. Campaign and Survival let four players in, and Versus and Team Versus eight. With Mod Loader set to SourceMod, Max Players can raise that to 16.
They play on another platform. Left 4 Dead servers on Haptic are for the PC version of the game on Steam.
Ask in Discord or email support@haptic.gg with your server's name and what your friend sees when the join fails.