Skip to content

SYSTEM Cited by 1 source

Nakama

What it is

Nakama is an open-source game server by Heroic Labs that provides real-time multiplayer, social features, matchmaking, leaderboards, and session management out of the box. It exposes both an HTTP REST API and WebSocket connections for persistent real-time communication.

Why the wiki has this page

Nakama is the application-server component in the AWS dual-token authentication reference architecture (2026-06-29). Its Go runtime plugin system and built-in WebSocket lifecycle controls (ping/pong, single-socket, session-token validation) are the load-bearing surfaces for several wiki patterns.

Architectural properties

  • Go runtime plugins: Nakama's server-side runtime only supports Go plugins via the runtime.Initializer interface. Custom authentication hooks (e.g., BeforeAuthenticateCustom) can intercept and modify auth requests before Nakama processes them.
  • Independent session tokens: Nakama issues its own session tokens (default 2-hour expiry) separate from any external identity provider. The session token is validated on every API request and at WebSocket connect time.
  • WebSocket lifecycle controls:
  • Ping interval (configurable, 10s in reference architecture)
  • Pong wait deadline (20s)
  • single_socket: true — new connection from same user kills previous
  • Token validation at connect time from ?token= query parameter
  • Storage: backs to PostgreSQL for player data, state, and accounts.

(Source: sources/2026-06-29-aws-dual-token-authentication-for-nakama-game-servers)

Seen in

Last updated · 562 distilled / 1,660 read