Documentation » Getting Started
For: operator
Run a Local Server
Build Dark Pawns, provide its world and database settings, and connect on a development machine.
Requirements
- Go at the version declared in
go.mod. - No database service. The server keeps everything in one embedded SQLite file, which it creates on first boot (by default
lib/data/darkpawns.db, beside the world data). Pass-dbor setDP_SQLITE_PATHto put it somewhere else. PostgreSQL is not a runtime backend: apostgres://value stops the boot with a message rather than being ignored.DP_ALLOW_NO_DB=1is the explicit development and oracle bypass. - The repository's
lib/world/directory, which contains the original world files.
Build
git clone https://github.com/zax0rz/darkpawns.git
cd darkpawns
go build -o server ./cmd/server
Configure and start
Development mode can generate a temporary JWT secret. Provide a stable secret for anything longer-lived.
export ENVIRONMENT=development
./server
Run from the repository root and no flags are needed: the world is read from
lib/world, the browser client is served from web/public, and the database is
created at lib/data/darkpawns.db. Name it explicitly to keep the database
somewhere else, which is the usual choice for an installed instance:
./server -db /var/lib/darkpawns/darkpawns.db
# or: export DP_SQLITE_PATH=/var/lib/darkpawns/darkpawns.db
A boot that had to create the database file logs a warning saying so, so a fresh install is easy to tell apart from the database you expected it to open.
The HTTP and WebSocket server listens on -port; raw telnet uses -telnet-port. Pass 0 to disable the telnet listener.
Connect
telnet localhost 7777
The browser client is served at http://localhost:4350/ and connects over ws://localhost:4350/ws.
Verify a development checkout
go build ./...
go vet ./...
go test ./...
golangci-lint run ./...
The full C-oracle setup is covered in Port Fidelity Workflow.