Skip to content

Instantly share code, notes, and snippets.

@hlysine
Created May 8, 2025 08:56
Show Gist options
  • Save hlysine/38eccef1d7d9c903a130b8f98bff807e to your computer and use it in GitHub Desktop.
Save hlysine/38eccef1d7d9c903a130b8f98bff807e to your computer and use it in GitHub Desktop.
Setting up a Screeps:World private server on Ubuntu (WSL) (Last updated May 2025)

The Screeps:World server uses pretty outdated technologies which is a huge headache when you want to set up a private server at the present day. This is a documentation of how I managed to get the server up and running without relying on the Steam GUI version.

1. Set up your environment

I am using Ubuntu in Windows Subsystem Linux for this server. Install the following prerequisites for the server and take note of the exact versions needed since they are mostly outdated.

2. Set up a folder for your server

# Create a folder
mkdir screeps-server

# Enter the folder
cd screeps-server

# Initialize npm to install packages
# Simply press enter until the command finishes
npm init

# Install isolated-vm, which is a dependency of screeps
npm install isolated-vm@^2

# Install screeps without running build scripts
# We need to make some changes before compiling
npm install screeps --ignore-scripts

3. A fix for new GCC version

This is a fix for screeps/screeps#145 Use your editor of choice to add #include <limits> to the top of node_modules/@screeps/driver/native/src/pf.h

vim node_modules/@screeps/driver/native/src/pf.h

4. Compile binaries

npm rebuild

5. Set up your server as instructed

Ref: https://github.com/screeps/screeps

# Enter your Steam API key here
npx screeps init

# Start the server
npx screeps start

# In another terminal, gain access to server console using this command
npx screeps cli

Enjoy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment