To set up a "Terraria" server, navigate to the folder where the game is installed, run the TerrariaServer.exe file, and use the options in the server setup window to modify parameters such as world size or player number. Alternatively, use the Host & Play option within the game.
After double-clicking on TerrariaServer.exe, wait for the server control interface to initialize. Press the N key to create a new "Terraria" world, and then press Enter to confirm the selection. Select the option that corresponds to the desired world size, press Enter, type the name for the created world, and press Enter again. Alternatively, start a single-player game by clicking on Terraria.exe, create a world in the game, exit the game, and select that world from the server control interface. For additional options, set the number of maximum players, specify the server port number, and set a password if you only want to provide access to specific players.
For smaller games over a local area network, start a single-player game, select the Multiplayer option, and then select Host & Play. Select an existing world, or create a new one, and add a password if necessary. To join your server, other players need to know your IP address. To determine it, type IP in the Google search field, and write down the series of four numbers that appear in the result list.