Self-hosting Homegames

Run a Homegames server on a machine in your house. Everyone on your network gets a game dashboard by typing homegames.link into any browser — no installs on their devices. (Curious how the URL magic works? See how it works.)

What you get

A self-hosted server runs two things:

With the link service enabled, your server registers itself with homegames.link, gets its own *.homegames.link subdomain pointed at its LAN address, and is issued a real TLS certificate — so every device on your network gets a secure, zero-config connection to a server in your own house. Game traffic itself never leaves your network.

Requirements

Quick start

The repos reference each other as sibling directories, so clone them side by side into one folder:

mkdir homegames-server && cd homegames-server
git clone https://github.com/homegamesio/homegames-common
git clone https://github.com/homegamesio/homegames-core
git clone https://github.com/homegamesio/homegames-client
git clone https://github.com/homegamesio/homegames-web
git clone https://github.com/homegamesio/homegames

cd homegames
npm install        # links the sibling repos + installs deps
npm run build      # builds the browser client bundle
sudo node index.js # sudo because the web server binds ports 80/443

Then open localhost on the server machine, or homegames.link from any other device on the same network.

What happens on first boot

The homegames launcher does three things, in order:

  1. Gets your server a certificate. It asks the Homegames API which *.homegames.link subdomain your network is assigned, generates a keypair locally, and submits a certificate signing request. The private key never leaves your machine. Issuance usually takes a minute or two on the very first boot; the key and certificate are stored in your OS's application-data directory (e.g. ~/Library/Application Support/homegames/hg-certs on macOS, ~/.homegames/hg-certs on Linux) and renewed automatically when they near expiry.
  2. Starts the web server — HTTPS on 443, with port 80 redirecting to it.
  3. Starts the game server — the dashboard, plus one process per running game session on its own port. It also registers with homegames.link so browsers on your network get redirected to it.

While the certificate is being issued, visitors to homegames.link see a "setting up a secure connection" page that refreshes itself — it flips to your dashboard automatically once HTTPS is up.

LAN-only / dev mode

You can also run the two servers directly, without the launcher or the certificate flow. This is the fastest loop for development (it's how the games in the docs are typically iterated on locally), at the cost of plain HTTP:

# terminal 1 — the game server (dashboard on port 9801 by default)
cd homegames-core && npm install && npm start

# terminal 2 — the web server (port 80)
cd homegames-web && npm install && npm run build && sudo npm start

Then open http://localhost. To boot straight into one game instead of the dashboard (great while building a game), set START_PATH in homegames-core's config.json to that game's index.js.

Configuration

Configuration lives in each repo's config.json; any key can be overridden with an environment variable of the same name. The keys you're most likely to touch:

KeyDefaultMeaning
LINK_ENABLEDtrueRegister with homegames.link so devices on your network can find the server
HOME_PORT9801Port the dashboard game server listens on
HOMENAMES_PORT7400Port of the session/player management API
GAME_SERVER_PORT_RANGE_MIN / MAX83008400Port pool for individual game sessions
HTTPS_ENABLEDfalseServe TLS using certs from hg-certs (the launcher manages this for you)
START_PATHBoot directly into one game instead of the dashboard
TESTS_ENABLEDfalseShow the built-in diagnostic/test games in the dashboard

Ports & firewall

Devices on your LAN need to reach the server on:

Nothing needs to be reachable from the internet — no port forwarding, no router configuration. The homegames.link connection is outbound-only.

Troubleshooting

Hosting the whole platform

Everything behind homegames.io is open source too — the API, the website, the link service, and the background worker. Running your own complete platform (your own catalog, studio, and cert authority) is possible but is a much bigger project: the API alone wants MongoDB, RabbitMQ, a Forgejo git server, and Docker, and the cert flow needs a domain with DNS you control. If you're seriously interested, start with the READMEs in the homegamesio GitHub org — each repo documents its own moving parts — or email joseph@homegames.io.

Something wrong or confusing on this page? Email joseph@homegames.io or open an issue on GitHub.