---
title: Event servers
description: >-
  Run an event server to give each team its own capture lobbies during Wplace’s
  Territory Weekend. Region claims are off in event mode. 1.
---

# Event servers

Run an event server to give each team its own capture lobbies during Wplace’s Territory Weekend. Region claims are off in event mode.

## Enable event mode

1. Set `EVENT_SERVER=true` in the backend environment, or set `server.eventServer: true` in your [Helm values](https://caelest.is/docs/run-a-server/kubernetes-with-helm.md). Leave it off for a regular server.
2. Restart the backend with that configuration. Check its `/v1/server` endpoint under the backend URL: the capabilities include `capture: 1`.
3. Invite painters. Each session follows the team Wplace reports. Administrators can see painters from every team, but their lobby list still belongs to their own team.

## Invite painters

1. In Caelestis **Settings**, expand the event server. Under **Access tokens**, enter a label, select **Report** and choose **Create**.

   ![Report selected beside the token label and Create button on the local event server.](https://caelest.is/docs/images/capture/create-report.png)

2. Choose **Copy invite link** and send it privately to the group. One report token works across teams. See [Authentication and tokens](https://caelest.is/docs/run-a-server/authentication-and-tokens.md) to copy or revoke a credential.
3. Give painters the [capture lobby guide](https://caelest.is/docs/use-caelestis/territory-event-capture-lobbies.md). Anyone with report access can open a lobby.

## Find linked accounts

To check whether one person paints on several Wplace accounts, for example to watch another team:

1. Connect the dashboard with an administrator token.
2. Choose **linked accounts** in the footer.
3. Review the groups under **Shared by several accounts**. **Same browser** is the strongest sign: both accounts reported one browser profile. **Same network** can also be a shared household, school or VPN. **Same machine info** only means the same browser version, platform and language, which many people share. Each browser reports its own Wplace ID, so treat a match as a lead and confirm it before you act on it.
4. Search **Accounts** by name or Wplace ID to see every device an account used.

For each Wplace account, the server keeps its display name and, for each browser and network it connected from, the browser's hashed identifier, a keyed hash of its IP address, and the browser details it sends: `User-Agent`, `Accept-Language`, `Sec-CH-UA`, `Sec-CH-UA-Platform` and `Sec-CH-UA-Mobile`. It also keeps when each was first and last seen and how many times it connected. The IP address itself is never stored. Records are deleted 30 days after their last connection.

On Cloudflare the IP comes from Cloudflare's edge. On Node, set `CLIENT_IP_HEADER`, or `server.clientIpHeader` in [Helm](https://caelest.is/docs/run-a-server/kubernetes-with-helm.md), to the header your reverse proxy sets, such as `x-forwarded-for`. Until then, every network shows as unknown.

## Read the countdown log

For Kubernetes, substitute your namespace for `caelestis-event`:

```sh
kubectl -n caelestis-event logs -l app.kubernetes.io/name=caelestis,app.kubernetes.io/component=server \
  -c backend --since=6h --tail=-1 | grep '"event":"capture-countdown"' | jq -c .
```

Each `capture-countdown` line gives a lobby's planned order. `startsAt` is the first slot on the server's clock. `staggerMs` separates successive steps. Members on the same step paint together; reserves have no step.

## Read usage

The server counts each painter who connects once, under a hash of their Wplace ID salted with a value only this server holds, so no Wplace ID is stored. Each time the count changes, it logs the totals:

```sh
kubectl -n caelestis-event logs -l app.kubernetes.io/name=caelestis,app.kubernetes.io/component=server \
  -c backend --since=6h --tail=-1 | grep '"event":"caelestis-usage"' | tail -1 | jq -c .
```

`painters` is how many painters this server has seen. The totals are kept with the lobbies, so they survive restarts; the newest line is the current count.

## Read painters' latency to Wplace

Every painter's browser reports its latency to Wplace without a capture: once just after its first paint, then every five minutes while it has something new.

[Order by latency](https://caelest.is/docs/use-caelestis/territory-event-capture-lobbies.md#order-painters-and-switch-places) uses a separate, unlogged reading. The server accepts at most one per session every ten seconds and considers it fresh for six minutes.

```sh
kubectl -n caelestis-event logs -l app.kubernetes.io/name=caelestis,app.kubernetes.io/component=server \
  -c backend --since=6h --tail=-1 | grep '"event":"wplace-latency"' | jq -c .
```

`wplaceRttMs` is the median of the browser's `rttSamples` round trips to Wplace in the last five minutes, null when it made none. `paints` lists each Paint click since the previous report: `clickToSendMs` from the click to Wplace's request and `sendToResponseMs` from the request to its reply.

`status` is Wplace's HTTP status if it replied. The territory event paints over Wplace's territory socket instead: its reply reads as `/paint` would answer: `200` accepted, `429` rate-limited and `403` any other refusal. The timings run from the paint message to its reply. Otherwise look for `no-response` or `failed`. A null `sendToResponseMs` means the reply wasn't observed.
