1) Launch Mindustry. Click the Play button and select Custom Game.
2) Select the type of game you want to create. After loading the world, press Esc and select the Host Multiplayer Game button in the menu.
3) Now, instead of the Host button, you will see the Invite Friends button, click Invite Friends if you want to invite friends.
4) To make your server public, press Esc during the game. Go to Settings.
5) In the Settings tab, click the Game button and below you will see the Public Game Visibility field, turn off this function so that other players cannot join your server. If you want to create Public server, check the article.
Now you have created a private server and can enjoy the game with your friends. Play together with GODLIKE.