Create a server - LunaMultiplayer/LunaMultiplayer GitHub Wiki
Prerequisites
To run the LMP server, you need to install the .NET runtime. The version of .NET you need to install depends on which version of the server you have, as we've upgraded the version of .NET that LMP runs on throughout the course of it's development.
If you don't have .NET installed, the server will currently crash with a very unhelpful error message of nothing. We're currently working on a way for the server to provide a helpful error message and stay open, to help users debug the issue themselves.
LMP Nightly Branch

The current nightly branch of the server runs on the .NET 10 Runtime. Other versions will not work.
Install it on all platforms here.
LMP Latest Branch

For the current version of the LMP Latest branch, 0.29.1, you have to install the .NET 6 Runtime. Other versions will not work.
Windows
- Get the x64 version (unless you're running a 32 bit OS) of .NET 6 Runtime here.
Linux
- On Linux, follow the instructions on this page and remember to install .NET 6 rather than another version.
MacOS
- Get the .NET 6 Runtime here.
Older versions
- For versions 0.28 and 0.29.0, you needed to install the .NET 5 runtime.
- For some older nightlies, you needed to install the .NET 6 runtime rather than the .NET 10 runtime. For those versions, follow the 0.29.1 RC instructions above.
- For versions 0.28 and 0.29.0, you needed to install the .NET 5 runtime. You can get that here if you're still running such an old version of LMP, but you should really update to 0.29.1.
- For versions before 0.28 (made for KSP versions before 1.12) you needed to install the .NET 4.8 Framework. That version sadly no longer seems to be available, despite both earlier and later versions of .NET still being available.
Instructions:
0. Before creating a server you must have a clear knowledge of what is a LAN, external IP, internal IP and what opening a port does.
1. Download the LunaMultiplayer-Server-Release.zip asset of the latest release or the nightly version and extract it.
2. Put the folder 'LMPServer' somewhere you like (but not inside the GameData folder of KSP!)
3. Start the server:
- Windows: Start the
Server.exe. If it doesn't start: You are missing .NET 5. - Linux/Raspberry Pi LMP version >= 0.29.0.600 (nightly, KSP >= 1.12): Start the server with the command
./Server - Linux/Raspberry Pi LMP version >= 0.28 (KSP >= 1.12): Start the server with the command
dotnet Server.dll - Linux/Raspberry Pi LMP versions < 0.28 (KSP < 1.12): Start the server with the command
mono Server.exe
4. Stop the server:
- Windows: Stop the server by pressing CTRL + C or closing the server console window.
- Linux/Raspberry Pi: Stop the server by pressing CTRL + C.
5. You can now change the server configuration (Config/*.xml files) and start again.
- Be sure to know how to correctly edit an XML!
Example:
This is an empty node:<AdminPassword />
This is also an empty node (same meaning):<AdminPassword></AdminPassword>
To add a value you need to add it between the two tags, e.g.:<AdminPassword>MYPASSWORD</AdminPassword>
6. To connect you need the LMPClient installed. Follow the installation instructions here.
- If you host the server on the same PC that your KSP is running on, you can use the loopback IP address: 127.0.0.1
- Clients on the same network as you can use your private IP, which usually begins with 192.168. You can also port forward traffic to your private IP, but this isn't usually necessary.
- All clients can connect to your server through the server browser, unless you specifically disable it. This is preferred over connecting manually with the public IP address + port, because the server browser allows you to do NAT punchthrough. (no port forwarding required)
- No matter what connection method clients use, they'll have to know the password to your server if it has one.
Important notes:
Network:
- If you use Hamachi, proxies, VPN or something similar, you're on your own. LMP does not support them
- Port 8800 is the default UDP port on LMP but it can be changed in one of the settings files.
- You don't need to open ports unless you want that the clients connect to your server manually (entering the IP, not using the server browser) and without the use of the master server.
- If you set up port forwarding, make sure that the port protocol is UDP.
- Check that your (PC & router) firewall does not block the traffic on that port as well.
- Windows: Set the network profile to private
- LMP >= 0.29 supports IPv6. With IPv6, even clients behind symmetric NAT or CGNAT can connect to your server. If you have connection problems, try enabling IPv6 for your server. To make your server accept IPv6 connections, change the
ListenAddressoption inConnectionSettings.xmlto[::]. - Check that neither your router nor your computer block ICMP packets (ping requests) as otherwise you will appear with an infinite ping (∞) in the server browser.
- If you do bad stuff your IP might get banned so behave decently. You can check the ban list here
Mods:
- Check this page to see how to make mods/parts and expansions mandatory or forbidden
General:
- Settings are stored in the xml files located in the
Configfolder. There you can set up a password to make your server private, change the game mode (Career/Sandbox/Science), difficulty, etc - If you set "Easy" as difficulty you won't see Kerbnet. Check custom difficulty page to see how to set a custom difficulty
- Do not put the LMPServer folder inside the
GameDatafolder of KSP. - Press
Control+Cwhen you want to close the server so a backup is made before exiting - Backup the
Universefolder in case you want to keep your saved game somewhere safe - Remove the
Universefolder to start a new game from scratch - If you want to flag your server as dedicated and have a custom color or the rainbow effect in the browser check this wiki page
- Do not put flags manually in the
Universe/Flagsfolder! The server will correctly put them once a player use one in his vessel
Docker
Pre-built images:
There are Docker images available here.
The master tag corresponds to the nightly builds, there are no release builds yet. As of 2022-07-11, the nightly builds are compatible with the 0.29 release.
Run docker pull ghcr.io/lunamultiplayer/lunamultiplayer/server:master to pull the image to your system.
Build your own images:
Simple:
Create a Dockerfile (for example in /opt/LunaMultiplayer) with the following content:
FROM mcr.microsoft.com/dotnet/aspnet:5.0-alpine
ARG LMP_VERSION=0.29.0
ARG LMP_FILENAME=LunaMultiplayer-Server-Debug.zip
ARG LMP_URL=https://github.com/LunaMultiplayer/LunaMultiplayer/releases/download/$LMP_VERSION/$LMP_FILENAME
RUN apk add icu-libs libstdc++ libgcc wget
RUN wget $LMP_URL && \
unzip $LMP_FILENAME && \
rm -rf $LMP_FILENAME LMP\ Readme.txt
EXPOSE 8800/udp 8900/tcp
VOLUME "/LMPServer/Config" "/LMPServer/Plugins" "/LMPServer/Universe" "/LMPServer/logs"
STOPSIGNAL sigint
WORKDIR /LMPServer
CMD ["dotnet", "Server.dll"]
Then build the image with
docker build -t lmpsrv:latest .
You can change the server version by adding --build-arg LMP_VERSION=versionNumber to the build command, where versionNumber is a release tag from Releases.
Advanced (build from source)
If you want to build the server from source inside the Dockerfile, clone the repository and build an image using Dockerfile_Server.
Usage
To run the LunaMultiplayer Server as a container with persistent data in /opt/LunaMultiplayer, create the directories:
mkdir -p /opt/LunaMultiplayer/{Config,Universe,Plugins,logs} && cd /opt/LunaMultiplayer/
Create the container and start it:
docker create \
--name=lmpsrv \
-it \
-e TZ=CET \
-p 8800:8800/udp \
-p 8900:8900 \
-v /opt/LunaMultiplayer/Config:/LMPServer/Config \
-v /opt/LunaMultiplayer/Universe:/LMPServer/Universe \
-v /opt/LunaMultiplayer/Plugins:/LMPServer/Plugins \
-v /opt/LunaMultiplayer/logs:/LMPServer/logs \
--restart unless-stopped ghcr.io/lunamultiplayer/lunamultiplayer/server:master
docker start lmpsrv
Replace ghcr.io/lunamultiplayer/lunamultiplayer/server:master with lmpserv:latest if you've built the image yourself instead of using the pre-built ones.
Now you can start and stop the server with docker start lmpsrv / docker stop lmpsrv. If your Docker service is starting on boot, so is your LMP server (if not manually stopped).
You can use the server console with docker attach lmpsrv, enter /help to see a list of commands. Detach from it using CTRL-P CTRL-Q.
If you already had a server running elsewhere and want to migrate to container, just copy the Config, Universe and Plugins directories to /opt/LunaMultiplayer and start the container.