Skip to content

appsinacup/gamend_starter

Repository files navigation

gamend banner


Open source game server with authentication, users, lobbies, server scripting and an admin portal.

Game + Backend = Gamend


Discord | Elixir Docs | API Docs | Guides | Deployment Tutorial | Scaling Article

Run locally

Prerequisites

  • Elixir 1.20 & Erlang/OTP 29 — see .tool-versions
  • Rust (rustup) — required to build the WebRTC native dependency (ex_sctp)
  • PostgreSQL — optional. Dev uses SQLite by default; set POSTGRES_* or DATABASE_URL in .env to use Postgres instead.

Run

  1. Copy .env.example to .env.
  2. Install dependencies and start the app from the repo root:
mix deps.get
mix dev.start

The app runs on localhost:4000 (SQLite database, device auth enabled).

Run with Docker

Alternatively, run it in a container:

docker compose up

You should now see on localhost:4000:

example

Multi-node local deployment

For multi-node deployment, you need Postgres, Redis, a scalable app service (Elixir nodes), and an nginx proxy that load-balances requests to the app replicas.

  1. Configure .env file (copy .env.example to .env).

  2. Start services with 2 app replicas:

docker compose -f docker-compose.multi.yml up --scale app=2

Configure

You can configure the:

  • modules/starter_config.en.json: Website settings (title, tagline, links) and branding paths (logo, favicon, banner, css).
  • modules/plugins/starter_hook: An example Elixir plugin with custom hook logic. Build it so its hooks load locally: cd modules/plugins/starter_hook && mix deps.get && mix deps.compile (or reload it from the admin console). The Docker build compiles plugins automatically.
  • .env: Secrets (oauth/email/etc.).
  • priv/static/theme.css: The theme.
  • priv/static/images: The images used in the website.

Godot client

A minimal Godot demo project lives in godot/ — it logs in and calls the example starter_hook.hello function over HTTP, WebSocket, and WebRTC. See godot/README.md for setup (install the Gamend SDK from the Asset Library, point it at your server, run).

Deploy

  1. Fork this repo.
  2. Go to fly.io (or another docker provider).
  3. Connect the app with the repo you forked.
  4. Launch the app and set your secrets.

About

Starter repo for gamend game server

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors