How to setup a dedicated server

This guide explains how to set up a dedicated server for Core Keeper. Most of the details are specific to Windows, but some will also work for Linux servers.

When you launch the dedicated server it will pop up a Powershell window, which you must leave running until you want to close the server. To close the server bring up the Powershell window and press Q.

If you use the Auto-restart script it will also have a batch file that runs along side the Powershell that checks to make sure the server is still running. To close the server while using Auto-restart script, bring up the Auto-restart script window and hit CTRL+C, followed by Y, then Enter. After you have done that you can then bring up the Powershell window for the server and hit Q to close it.

Example of the Powershell window when you launch the server.
Example screenshot of the Auto-restart script window.

Setting up dedicated server[edit]

  • MAKE SURE YOU HAVE BACKUPS BEFORE POSTING YOUR GAME CODE IN PUBLIC
  • Dedicated server \worlds\ folder may not appear until it saves for the first time, ~30s after a player logs in
  • You can optionally paste in another \worlds\ folder, or create the folder yourself and paste worlds inside

Installing main branch dedicated server from Steam[edit]

Click here to install the server via Steam.

Installing main branch dedicated server from SteamCMD[edit]

Downloading SteamCMD

   steamcmd +force_install_dir c:\corekeeperdedicatedserver\ +login anonymous +app_update 1963720 +quit

Docker containers made by players[edit]

Save data and server config locations[edit]

Back up client data with this hotkey on the main menu: CTRL ALT B

   %userprofile%\Desktop\CoreKeeperSaves.zip
Main branch client worlds[edit]
   %APPDATA%\..\LocalLow\Pugstorm\Core Keeper\Steam\YOURSTEAMID\worlds\

Command to open folder:

   cmd /k FOR /D %a IN ("%APPDATA%\..\LocalLow\Pugstorm\Core Keeper\Steam\*") DO explorer %a & exit
Main branch client saves (characters)[edit]
   %APPDATA%\..\LocalLow\Pugstorm\Core Keeper\Steam\YOURSTEAMID\saves\

Command to open folder:

   cmd /k FOR /D %a IN ("%APPDATA%\..\LocalLow\Pugstorm\Core Keeper\Steam\*") DO explorer %a\saves\ & exit
Main branch dedicated server worlds[edit]
   %APPDATA%\..\LocalLow\Pugstorm\Core Keeper\DedicatedServer\worlds\

Command to open folder:

   cmd /k explorer %APPDATA%\..\LocalLow\Pugstorm\Core Keeper\DedicatedServer\worlds\ & exit
Main branch dedicated server config[edit]
   %APPDATA%\..\LocalLow\Pugstorm\Core Keeper\DedicatedServer\ServerConfig.json

Command to open folder:

   cmd /k explorer %APPDATA%\..\LocalLow\Pugstorm\Core Keeper\DedicatedServer\ServerConfig.json & exit

Auto-Restart script[edit]

Navigate to the install directory for Core Keeper Dedicated Server and replace Launch.PS1 and Launch.bat with the following, or rename and adjust the script to reflect the new names of the files. You can locate the install directory by going to Steam (if installed through the client) and right clicking, Manager and then "Browse Local Files". If you installed from SteamCMD command above it'll be in c:\corekeeperdedicatedserver\

If you keep the names as Launch.PS1 and Launch.bat future updates may overwrite them and you'll need to do this again.

Launch.PS1[edit]
   # Feel free to change these (see README), but keep in mind that changes to this file might be overwritten on update
   $Date = Get-Date -format "yyyyMMdd"
   $DateStr = './logs/CoreKeeperServerLog-{0:yyyyMMdd}.txt' -f $Date
   $CoreKeeperArguments = @("-batchmode", "-logfile", $DateStr) + $args
   $script:ckpid = $null
   
   function Quit-CoreKeeperServer {
   	if ($script:ckpid -ne $null) {
   		taskkill /pid $ckpid.Id
   		Wait-Process -InputObject $ckpid
   		Write-Host "Stopped CoreKeeperServer.exe"
   	}
   }
   
   try {
   	if (Test-Path -Path "GameID.txt") {
   		Remove-Item -Path "GameID.txt"
   	}
   
   	$script:ckpid = Start-Process -PassThru -FilePath %0\..\CoreKeeperServer.exe -ArgumentList $CoreKeeperArguments
   	Write-Host "Started CoreKeeperServer.exe"
   
   	# Wait for GameID
   	while (!(Test-Path -Path "GameID.txt")) {
   		Start-Sleep -Milliseconds 100
   	}
   	
   	Get-Process | Where-Object { $_.MainWindowTitle -like 'CoreKeeperPowershell' } | Stop-Process
   	$host.UI.RawUI.WindowTitle = "CoreKeeperPowershell"
   	
   	Write-Host -NoNewline "Game ID: "
   	Get-Content "GameID.txt"
   	Write-Host "Press q to quit, DON'T close the window or the server process will just keep running"
   	   While ($KeyInfo.VirtualKeyCode -eq $Null -or $KeyInfo.VirtualKeyCode -ne 81) {
   		$KeyInfo = $Host.UI.RawUI.ReadKey("NoEcho, IncludeKeyDown")
   	}
   }
   finally {
   	Quit-CoreKeeperServer
   	pause
   }


Launch.bat[edit]
   @echo off
   :loop
   tasklist /fi "ImageName eq CoreKeeperServer.exe" /fo csv 2>NUL | find /I "CoreKeeperServer.exe">NUL
   if "%ERRORLEVEL%" NEQ "0" start powershell -executionpolicy unrestricted -File Launch.ps1 %*
   timeout 10
   goto loop


Installation instructions by Xech#6666

Auto-restart script by CaptainStupid#8539

Cookies help us deliver our services. By using our services, you agree to our use of cookies.