Self-Hosted Game Backend

TrontCloud

Own your stack. A PlayFab/LootLocker alternative you control; single binary, 116 endpoints, three-tier auth.

Why Build Your Own?

The Problem

PlayFab and LootLocker expose API keys in your game files. Their client SDKs let modders make arbitrary calls with your title key. You end up writing server-side validation anyway - so why not own the whole stack?

TrontCloud's Approach

Three-tier auth keeps your game secure. Game clients use PublicAuth to browse and SessionAuth after login. Admin keys (APIKeyAuth) stay on your server, never shipped in builds. Rate limited per IP. Bcrypt everything.

Features

Everything you need for a multiplayer game backend, nothing you don't.

109

API Endpoints

Players, stats, leaderboards, economy, inventory, achievements, progression, loot tables, messaging, analytics, and more.

3

Auth Tiers

PublicAuth for browsing store and leaderboards. SessionAuth for logged-in game clients. APIKeyAuth for server and admin tools.

14

Admin Dashboard

Embedded HTML admin UI with 14 tabs, grouped sidebar, 12 stat cards, and 16 admin API endpoints. No separate deploy needed.

329

Unity SDK Methods

UPM package with callback and async/await support. Dual mode: Init() for servers, InitClient() for game clients.

1

Single Binary

Go compiles to one executable. Pair it with PostgreSQL and you have a complete backend. Auto-migrates 20 tables on first run.

60/s

Security Hardened

Per-IP rate limiting (60/s general, 5/s auth). Bcrypt password hashing. FOR UPDATE row locks on currency. Atomic transactions.

Quick Start

server
# Build
go build -o trontcloud.exe .

# Generate an API key for your game
./trontcloud.exe --generate-key mygame
# prints key once; save it

# Run (auto-migrates DB, opens admin)
./trontcloud.exe

# Or without auto-opening browser
./trontcloud.exe --no-browser
unity
// UPM: https://github.com/TrentSterling/trontcloud.git?path=sdk/unity
TrontCloud.Init(url, apiKey);
TrontCloud.InitClient(url, titleId);
TrontCloud.GuestLogin(deviceId, ok, err);

Architecture

116 endpoints organized into four areas. Go + PostgreSQL. 20 auto-migrated tables.

Core

Players & Data

Register, login, sessions, player data (JSON blob), stats, leaderboards with best-score tracking

Economy

Currency & Items

Currencies with caps, atomic grant/spend, catalog items, stackable inventory, store with atomic purchases

Progress

Levels & Loot

Achievements with stat-based auto-unlock, XP/level progressions, weighted drop tables with optional auto-grant

System

Config & Analytics

Title data key-value store, player inbox/messages, analytics events (single + batch up to 1000), summary aggregation