Revision Difference
Hosting_a_custom_map#524468
<cat>Play.Hosting</cat>
<title>Hosting Custom Maps</title>
⤶
<note>This article is unfinished and needs some polish. It doesn't explain basics of server hosting, only some details you need to know while hosting a custom map.</note>⤶
<upload src="2f4/8d7b6e52e734690.png" size="1332088" name="image.png" />⤶
<note>This article is not finished and doesn't explain basics of server hosting, only details you need to know while hosting a custom map.</note>⤶
#+server.levelurl and about URLs
Most important server parameter you need for hosting a custom map is `+server.levelurl [url]`. Server reads the [url] argument and starts downloading the map. Keep in mind that other startup parameters that are responsible for procedural maps like `+server.worldsize` or `+server.seed` should be removed.
Your map file should be hosted on a public web-site that works 24/7, since new players of your server will download the map from that URL, not from your Rust server. If your URL link doesn't work then players that haven't download the map yet won't be able to join the server.
URL can be literally anything as long as it's a direct download link. You can check if your link is correct or not by accessing it in your browser - if download starts automatically, then it's a direct download link. If it loads a page that requires user to click something to start the download, then this URL won't work and server will throw an error.
You can also host your map locally. In this case your map link will be `file:///path/to/your/map`. For example, `+server.levelurl "file:///D:/My/Awesome/Custom.map"`⤶
#Receiving an error?⤶
## World File Mismatch⤶
You can also host your map locally. In this case your URL should start with `file:///` and after this you enter a full path to your map. For example, `file:///path/to/your/map`. Keep in mind that other players won't be able to connect because of locally hosted map. ⤶
#Common issues⤶
## World Cache Version Mismatch / World File Outdated⤶
This error means that downloaded .map file is conflicting with the map installed on a server. This usually happens when you're loading your custom map on a server for a first time, then you edit and save it under the same name and trying to load it again. You can easily avoid this issue by saving a new version of your custom map under a different name.
To fix this error, open your Rust client folder (Steam Library -> Right click on Rust -> Properties -> Local Files -> Click on "Browse Local files") and find there "maps" folder. Find the conflicting map and delete it. If you don't know it's name, then see the full error log using in-game console via <key>F1</key>. It has an information about the name of conflicting file.
## Server freezes while loading a map
Usually this happens when your custom map doesn't have an access to the ocean, which means there is no area that can be used for generating paths of Cargo Ship. You can fix that by adding some area for ocean on edges of your custom map. Alternatively you can just disable Cargo Ship event using these two server startup parameters: `baseboat.generate_paths false` and `cargoship.event_enabled false`.
## Errors while trying to download the map
This means that server couldn't download your custom map using the provided URL. Make sure that it's a direct download link, there is no typos in the link and web-site that hosts your map is up and can be accessed by everyone.
## NullReferenceException: Object reference not set to an instance of an object
<upload src="2f4/8d7b6be068bf0c6.png" size="30547" name="image.png" />
This means that your custom map has a broken prefab which won't allow you join the server. If you are sure it's not a file corruption, then open your map in the editor and remove the broken prefab.