HUB
Sign inSign up

maximalmax90/hkmpserver

By maximalmax90

•Updated about 1 month ago

Hollow Knight Multiplayer Standalone Server

Image
Networking
Web servers
1

3.5K

maximalmax90/hkmpserver repository overview

⁠HKMP dedicated server

Standalone server for HKMP⁠, Hollow Knight Multiplayer by Extremelyd1.

linux/amd64 and linux/arm64. Source for the image: maximalmax90/HKMPDocker⁠.

⁠Tags

Each tag is one fixed HKMP release — v2.4.3, v2.4.2, … — baked in at build time and verified against the checksum GitHub publishes. latest is the newest release. Update by pulling a new image; the server does not update itself.

⁠Run it

services:
  hkmp:
    image: maximalmax90/hkmpserver:latest
    container_name: hkmp
    restart: unless-stopped
    environment:
      PORT: 2222
    ports:
      - "2222:2222/udp"
    volumes:
      - hkmp-data:/data
    stop_grace_period: 40s

volumes:
  hkmp-data:
docker compose up -d

Or directly:

docker run -d --name hkmp \
    -e PORT=2222 -p 2222:2222/udp \
    -v hkmp-data:/data \
    maximalmax90/hkmpserver:latest

The port is UDP. HKMP speaks DTLS over UDP; a TCP mapping reaches nothing.

Use a volume. Everything the server remembers lives in /data, and without a volume it is gone the moment the container is recreated.

⁠Settings

VariableDefaultMeaning
PORT2222UDP port the server listens on
FULL_SYNCunsettrue syncs bosses, enemies, world state and saves
PUID/PGID1000Owner of /data and the identity the server runs as
STOP_TIMEOUT30Seconds to wait for a clean shutdown
TZUTCTimezone for log timestamps

Gameplay settings live in /data/serversettings.json and can be changed while the server runs.

⁠Managing it

docker exec -it hkmp hkmp

A full-screen console: the live log, a command line, and panels for the rest.

 HKMP v2.4.3 · 2222/udp · players 2 · up 2d 4h
 [INFO] Zote connected
 [INFO] Online players (2): Zote, Hornet

 > set pvp true
 F1 Help · F2 Players · F3 Settings · F4 Whitelist · F5 Bans · F10 Quit
  • F2 players, with kick, ban, ban-IP and authorize
  • F3 server settings, toggled or edited in place
  • F4 whitelist, pre-list and approved keys
  • F5 bans, by auth key and by IP
  • Tab completes a command, Up/Down history, PgUp/PgDn scrolls

Ctrl-C there is ignored, so it cannot stop the server by accident; F10 leaves the console and the server keeps running.

For scripts, give hkmp the command and it prints the reply:

docker exec hkmp hkmp list
docker exec hkmp hkmp set pvp true
docker exec hkmp hkmp announce "restarting in 5 minutes"
docker exec hkmp hkmp whitelist add SomePlayer

Any upstream command⁠ works: list, set, announce, kick, ban, unban, banip, unbanip, whitelist, auth, deauth, team, skin, copysave, log. Also hkmp status, hkmp check, hkmp logs [n] and hkmp attach for the raw server prompt.

⁠Stopping

docker stop asks the server to exit cleanly and waits for it to disconnect players and flush its state. Give it room: stop_grace_period: 40s in compose, or --stop-timeout 40 with docker run.

⁠What is in /data

serversettings.json   gameplay settings
consolesettings.json  port and full-synchronisation flag
whitelist.json        whitelist and pre-list
banned.json           bans by auth key and by IP
authorized.json       authorized auth keys
key.pem, cert.cer     DTLS key pair, generated on first start
save.json             world save, when full synchronisation is on
logs/                 rolling server log

⁠Coming from an older image

State used to live in /HKMP. A bind mount still pointing there is copied to /data once, automatically — nothing is lost — but move the mount when convenient. hkmp update no longer exists: pull a new image instead.

Tag summary
Recent tags
Content type
Image
Digest
sha256:627179956…
Size
109.2 MB
Last updated
about 1 month ago
docker pull maximalmax90/hkmpserver:latest