OSRS Guild Map
Set up ha-osrs-map, a live map and tracker for your guild that reads from the hub.
OSRS Guild Map (ha-osrs-map) is a self-hosted website
that shows where every online guild member is, what they carry and wear, their skills and XP history,
and what the guild has been up to. It is a fork of
group-ironmen, reworked for guilds.
It reads every player from the hub. Players don't pair anything with the map; they only pair RuneLite with the hub, as usual. The map has no accounts of its own either: people log in with Discord, and the hub says who is a member and who is an admin.
RuneLite plugin ──pair/events──▶ osrs-data-hub ◀──GET /api/v1/snapshot (every 5 s)── map backend ──▶ site
▲ │
└──── /xp, /events, /locations, /leaderboards ◀─────┘ (cached)- The live map shows every online player in their own colour, with pings for loot, level-ups and deaths.
- Player profiles show vitals, gear, inventory, skills, XP gains, sessions and carried value.
- Trails follow up to eight players at once over 24 hours, 7 days, or one play session of the player you're watching, and the time you pick applies to every trail shown. Each player's events are marked along the way. Teleports are drawn as arcs, and Replay plays the routes back on a timeline.
- The Clan page lists who's online and where, the top XP gainers, the biggest drops and the event feed.
- The Admin page, for the hub's admins, hides or deletes players and shows how the hub connection is doing.
What you need
- A running hub, version 2.1 or newer, and an admin on it who can create an integration key. Nobody can log in to the map against an older hub.
- A Discord application for the login. It can be the one the hub uses, with one more redirect.
- A machine with Docker and the Compose plugin. The map runs three containers: frontend, backend and PostgreSQL.
Set it up
Create an integration key on the hub
On the hub, open Admin → Integrations → Create integration key. Name it "Guild map" and give it these categories:
| Categories | Used for |
|---|---|
activity, location_live | the map and the player list |
stats, equipment, inventory | profiles and graphs |
events, location_history | the Clan page, map pings and trails |
Copy the key; it is shown once.
It has to be an integration key
A personal key from API keys can read the players, but the hub doesn't tell it who is a member, so nobody can log in to a map that runs on one. The backend logs an error at start-up when the key is a personal one.
Get the compose files
git clone https://github.com/RedFirebreak/ha-osrs-map.git
cd ha-osrs-map
cp .env.example .envPoint it at your hub
In .env, set the hub URL (without /api/v1) and the key, and a database password (PG_PASSWORD).
HUB_BASE_URL=https://hub.example.com
HUB_API_KEY=ohub_xxxxxxxxxx_xxxxxxxxAdd the Discord login
In the Discord Developer Portal, open your application's
OAuth2 page and add https://<your map>/login/discord as a redirect. The map only asks for the
identify scope. Then set:
DISCORD_CLIENT_ID=…
DISCORD_CLIENT_SECRET=…
DISCORD_REDIRECT_URI=https://<your map>/login/discordThe backend refuses to start without the hub settings and these three.
Start it
docker compose up -dThe site listens on http://localhost:4000. Put it behind your reverse proxy with HTTPS. Only the
frontend needs to be reachable.
Plain HTTP
On plain http://localhost also set COOKIE_SECURE=false, or the browser drops the login cookie.
Log in and test the connection
Log in with Discord as an admin of the hub. There is no first admin to create: whoever the hub calls an admin gets the Admin page. Open Admin → Test connection. It checks the key and shows how many accounts it can read.
Who can log in
Discord only says who someone is. The backend then asks the hub whether that Discord account is a
member, and an admin (GET /api/v1/members/{discord_id}).
- A member of the hub gets in. Someone the hub doesn't know is told to sign in to the hub once first, since that is where joining the guild happens.
- An admin on the hub is an admin on the map.
- The hub is asked again every 15 minutes for everyone who is logged in. Someone who left the guild or was removed on the hub is logged out of the map within that time. While the hub can't be reached, whoever is logged in stays so.
- A login lasts three days.
Players choose what the map shows
The map shows exactly what the hub shares with the guild. New accounts share every category with the guild by default. On accounts from before hub 1.2, equipment, inventory and the location trail stay private until the owner shares them, so a player whose items don't show up on the map should change their sharing settings on the hub. A profile tab or trail says "not shared" until they do, and what an owner stops sharing on the hub is dropped from the map.
Optional settings
| Variable | Default | Purpose |
|---|---|---|
HUB_POLL_INTERVAL_SECS | 5 | How often the backend polls /snapshot (at least 2). |
HUB_HISTORY_ENABLED | true | Serve graphs, trails and the events feed from the hub. |
HUB_REQUEST_BUDGET | 80 % of the key's limit | Hub requests per minute the map allows itself. |
SITE_TITLE, SITE_NAME | OSRS Guild Map | Branding. |
ICONS_BASE_URL | https://icons.scapekeeper.com | Where browsers load item, skill and slot icons from. Empty turns icons off. |
The map's README has the full list, a Kubernetes deployment contract, and a mock hub for trying the map without a real hub.
How it uses the hub
- The backend polls
/snapshotwithETagandsince, and does a full refresh every two minutes. The key never leaves the server. - Presence comes from the hub's
onlineandlast_seen. If the sync stops for five minutes, everyone shows as offline. - Graphs, trails, gains, profiles and the events feed are served from a short-lived cache, so the hub sees the same number of requests however many people view the map.
- Trails come from
/locations, drawn the way the hub'svialabels each point: a line for a walk, an arc for a teleport. The events along a trail come from/eventswithfromandto. - Accounts are matched by hub account id, then by
account_hash, then by name. Renames on the hub are followed.