Fix the NullReferenceException Connection Error on a New Rust Server
A newly created Rust server will disconnect you with the following error if it has not been configured yet:
Disconnected: Exception (cs: 73433): NullReferenceException: Object reference not set to an instance of an object.
AdaptMeshToTerrain.Adapt()
This happens because no map has been selected. The server cannot generate a world without a seed and map size. Follow the steps below to resolve it. See Change Hostname to set other basic server settings at the same time.
Steps
- Navigate to your server in the Game Control Panel.
- Stop the server.
- Click Configuration Files and open
server.cfgusing the Config Editor. - Make your desired configuration changes. Scroll to the bottom of the config and set your level/map settings, including the seed and size values.
- Click Save and Exit.
- Start the server.
The server will now generate a world using the seed and size you specified, and you will be able to connect.