1.6 KiB
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.yamlin project root - Configure Nakama service (port 7350)
- Configure PostgreSQL service (port 5432)
- Set up persistent volumes for PostgreSQL data
2. Start Nakama Locally
- Open terminal in
server/directory - Run
docker-compose up -d - Verify Nakama console at http://localhost:7351
- Test API endpoint at http://localhost:7350
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.gdwith tunnel URL for testing
4. Configure Godot Client
- Update
NAKAMA_HOSTinnakama_manager.gd - For local:
localhost, port7350, schemehttp - For tunnel: use tunnel hostname, port
443, schemehttps
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