Files
tekton/_daily_basis/nakama_local_setup.md
T
2026-01-01 05:21:25 +08:00

1.6 KiB

Nakama Local Development Setup Checklist

Prerequisites

  • Docker Desktop installed (Windows/Mac)
  • Docker Desktop running
  • SSH client available (for localhost.run tunneling)

Setup Steps

1. Create docker-compose.yaml

  • Create server/docker-compose.yaml in project root
  • Configure Nakama service (port 7350)
  • Configure PostgreSQL service (port 5432)
  • Set up persistent volumes for PostgreSQL data

2. Start Nakama Locally

3. Tunnel for Remote Testing

  • Run: ssh -R 80:localhost:7350 nokey@localhost.run
  • Copy the generated public URL (e.g., https://xxxxx.lhr.life)
  • Update nakama_manager.gd with tunnel URL for testing

4. Configure Godot Client

  • Update NAKAMA_HOST in nakama_manager.gd
  • For local: localhost, port 7350, scheme http
  • For tunnel: use tunnel hostname, port 443, scheme https

5. PostgreSQL Learning Notes

  • Database: nakama (created by Nakama on startup)
  • Access via: docker exec -it nakama-postgres psql -U postgres -d nakama
  • Key tables: users, user_edge, storage, leaderboard, wallet_ledger

Quick Commands

# Start services
docker-compose up -d

# Stop services
docker-compose down

# View logs
docker-compose logs -f nakama

# Access PostgreSQL
docker exec -it nakama-postgres psql -U postgres -d nakama

# Tunnel port 7350
ssh -R 80:localhost:7350 nokey@localhost.run