Tested on Docker-desktop(Win), Docker(Ubuntu20) and Azure(Cloud) | WIP Cloud-Scripts 4 GCE and AWS
The example-dash and the stats.js are NOT from screeps-grafana
i found a different one here
(OPTIONAL) Setup Azure-Server instructions
(OPTIONAL) Setup AWS-Server instructions
(OPTIONAL) Setup GCE-Server instructions WIP - Not working atm
If u need to install Docker & compose look here
Your working folder is now server/
- Copy the
config.yml.sample
and change it toconfig.yml
- Edit
config.yml
and paste in your Steam-api-key. Feel free to change other thinks. If u need help for the config-file go to: [https://github.com/screepers/screeps-launcher] - Copy the
/cfg/stats_setup.json.sample
and change it to/cfg/stats_setup.json
- Change Username and Password
- Copy the folder
server
and rename it to whatever you want, it will be the base folder of your server. - run
docker-compose up -d
in that folder and Wait until it is done starting the docker images and settle on mongo status messages. - 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. - In the CLI, run
system.resetAllData()
to initialize the database. Unless you want to poke around, useCtrl-d
orCtrl-x
to exit the cli. - Run
docker-compose restart screeps
to reboot the private server.
- Connect via Steam-client and use Private server tab
- Host: localhost
- Port: 21025
- Server password: <leave blank, unless configured otherwise>
- Connect to Cli as described in Installation Steps.
- Type in
setPassword("USER","PASS")
Access Grafana at [http://localhost:3000/]. You'll find your stats in the default data source, under screeps.privateserver.
More Info here: screeps-grafana
I found a (working) Dashboard and a TS-Class here
YOu can find it in the grafana_sample
Folder.
To call it just
import { StatsManager } from "stats-manager.ts";
in your main.ts(js) and run
StatsManager.runForAllRooms();
at the end of your Loop.
Import newDash.json
as a new DashBoard and all should be working.
Just run docker-compose exec grafana grafana-cli plugins install grafana-clock-panel
to install the plugins, then docker-compose restart grafana
to apply. Refresh your browser and voila!
Additional Plugins can be found here.