Skip to content

PointerEvent/screeps-launcher

 
 

Repository files navigation

A better launcher for Screeps private servers

CircleCI

Why?

  • The steam private server has a few limitations, one being that getting non-workshop mods to work is a huge headache.
  • The npm version is much better, but requires care in installing everything correctly.

Therefore, the goal of this is to simplify the entire process making it much easier to use. No need to manually npm install anything, its handled automatically

Guides

If installing on ubuntu 18.04 or on a Pi with raspbian, theres also a guide on reddit here that does a step-by-step setup including mongo, redis, and auto start.

Usage

  1. Download a release from the Releases Page
  2. Drop into an empty folder or your PATH
  3. Get your Steam API key
  4. Create config.yml (All fields are optional! You can pass STEAM_KEY as an environment variable)
steamKey: keyFromStep3
mods: # Recommended mods
- screepsmod-auth
- screepsmod-admin-utils
- screepsmod-mongo  # You must install and start `mongodb` and `redis` before this mod will work
bots:
  simplebot: screepsbot-zeswarm
serverConfig: # This section requires screepsmod-admin-utils to work
  welcomeText:  |
    <h1 style="text-align: center;">My Cool Server</h1>
  constants: # Used to override screeps constants
    TEST_CONSTANT: 123
  tickRate: 1000  # In milliseconds. This is a lower bound. Users reported problems when set too low.
  1. Open a shell to folder
  2. Run screeps-launcher
  3. If you installed screepsmod-mongo, run screeps-launcher cli in another shell, and run system.resetAllData() to init the DB. It completes instantly, restart the server after.
  4. Done!

You can use screeps-launcher cli in the same folder for CLI access

Other options

There are several extra arguments that can be used to manage the install:

  • screeps-launcher apply Applies the current config.yml without starting the server.
  • screeps-launcher upgrade Upgrades all packages (screeps, mods, bots, etc)
  • screeps-launcher cli Launch a screeps cli
  • screeps-launcher backup <file> Creates a backup
  • screeps-launcher restore <file> Restores a backup (Warning: Completely replaces existing data)

docker-compose

There is also an example docker-compose.yml that starts a server + mongo. This is the easiest way to get a private server working on windows and using mongo + redis.

  1. Install docker (look on the left to find the correct platform).
  2. You might have to fiddle with the docker advanced settings to allow enough CPU to run the server smoothly.
  3. Create an empty folder with both a config.yml (don't forget to add screepsmod-mongo!) and a docker-compose.yml (see examples). The docker-compose.yml example can be used as-is, but the config.yml requires some customization.
  4. Open a terminal in that folder. Run docker-compose up to start the services. Wait until it is done starting the docker images and settle on mongo status messages.
  5. Open another terminal in that folder. Run docker-compose exec screeps screeps-launcher cli. This is a command-line interface to control your new private server.
  6. In the CLI, run system.resetAllData() to initialize the database. Unless you want to poke around, use Ctrl-d to exit the cli.
  7. Run docker-compose restart screeps to reboot the private server.

Your server should be up and running! Connect to it using the steam client:

Choose the Private Server tab and connect using those options:

  • Host: localhost
  • Port: 21025
  • Server password: <leave blank, unless configured otherwise>

Docker

Docker builds are published to Dockerhub as screepers/screeps-launcher Quickstart:

  1. Create config file in an empty folder (/srv/screeps is used for this example)
  2. Run docker run --restart=unless-stopped --name MyScreepsServer -v /srv/screeps:/screeps -p 21025:21025 screepers/screeps-launcher
  3. Done!

Mods

You can easily install mods by adding their names to the config.yml file. The screeps-launcher takes care of downloading them for you. Mods can be found in the ScreepsMods github repository.

A few mods of interests:

  • screepsmod-mongo (needed to actually use mongo+redis!)
  • screepsmod-auth (use it to change your password by going to [http://localhost:21025/authmod/password])
  • screepsmod-admin-utils
  • screepsmod-map-tool
  • screepsmod-history
  • screepsmod-market

See each of their documentation on the ScreepsMods github repository.

About

Launcher for the Screeps Private Server

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 98.0%
  • Dockerfile 1.3%
  • Shell 0.7%