This is an alternative to screepers/screeps-launcher
I believe that build and setup should happen during the build of a docker image. The screepers/screeps-launcher does all setup and installation during the run of the image.
This image does all installation and setup during the build stage.
So to launch the server, it will only start the server.
Mods and bots are managed at startup by checking your config.yml
.
npm
is only invoked if changes are made to your config.yml
.
A working Docker installation. You can use Docker Desktop
Download the [./docker-compose.yml](compose file), ./.env.sample and ./config.yml file to your computer. You can put this in your Screeps project.
Copy .env.sample
to .env
, this can hold secrets for you, and should be ignored in git!
You can use this command (in a shell) to do the above, in your current directory.
curl --remote-name-all https://raw.githubusercontent.com/Jomik/screeps-server/main/{docker-compose.yml,.env.sample,config.yml} && cp .env.sample .env && echo ".env" >> .gitignore
Paste your Steam API key into .env
.
Edit config.yml
to add mods and bots. Some mods also look there for configuration.
We currently add the following mods, as default:
In your project run docker compose up -d
.
Run docker compose logs screeps -f
to view and follow the logs for the screeps-server container.
To stop following the logs, press CTRL + C
.
Assuming nothing went wrong, you should be able to connect to your server on http://localhost:21025
.
Run docker compose exec screeps cli
.
It is also possible to access the from outside the container via a REST API.
This can be accomplished using screepsmod-cli.
Simply add it to your config.yml
and configure it appropriately according to the readme.
Ensure that your setup applies to any new prerequisites listed above.
Run docker compose pull
to download any new version of the image.
-
Help, my server is running but I can't connect.
- Follow the instructions for screepsmod-auth
-
I can't push any code via
rollup
to my server.- Make sure your
screeps.json
configuration in your project is set properly. - In your
email:
field, simply put in yourusername
. Verify your password is the same as yourscreepsmod-auth
setting.
- Make sure your
-
My map is all red, I can't actually spawn in!
-
This is most likely a result of your map not loaded properly on first-run. To fix it do the following.
- Step 1: Navigate to your server file location in terminal/powershell.
- Step 2: Run
docker compose exec screeps cli
- Step 3: Run
system.resetAllData()
and reconnect.
-
Restart your server, check your configuration and follow the instructions for screepsmod-admin-utils
-