DocsPrivate networking

Private networking

Let Eggs in a Coop talk to each other privately: turn on private networking, peer the Eggs, and reach them by a stable private hostname.

A Coop is the private-networking boundary. Eggs in the same Coop can be wired together so they reach each other directly, without going out over the public internet and without exposing a port to the world. This is how you keep an API Egg talking to a worker Egg, or an app Egg talking to a database Egg, whilst the outside world only ever sees your public URL. It is deny-by-default: turning it on opens nothing until you explicitly connect (peer) two Eggs, and a connection is bidirectional, so each peered Egg can reach the other.

Turn it on and peer the Eggs

  1. Open the Coop page in the dashboard and view its board.
  2. Open an Egg's slide-out panel on the board and turn on private networking for that Egg.
  3. Do the same on the sibling Egg you want it to reach. Both Eggs must be in the same Coop.
  4. From either Egg's slide-out panel on the board, choose Connect and pick the sibling Egg to peer with. The connection applies both ways.
  5. Repeat Connect for each pair of Eggs that need to talk. Only connected pairs can reach each other.

The private hostname

Each Egg has a stable private hostname on the Coop network. Once two Eggs are connected, one can reach the other by that hostname over the private link. The hostname stays the same across redeploys, so you can rely on it, and the dashboard shows the exact hostname for each Egg in its slide-out panel on the Coop board. The alias is derived from the Egg name, so it changes if you rename the Egg. Prefer referencing it through an environment variable rather than hardcoding it, so the connection target lives on the Egg and not in the repo. For example, set variables on your app Egg that point at a database Egg and a worker Egg:

bash
DATABASE_URL=postgres://app:[email protected]:5432/app
WORKER_URL=http://worker-egg.coop.internal:8080
Set on the app Egg. Both the bare Egg name (db-egg) and the <name>.coop.internal form resolve to the same Egg on the Coop network, so either works.

These are ordinary environment variables. They are set on the Egg, available at build and run time, encrypted at rest, and never printed in logs. Your app reads them like any other config, so the same code works whether the dependency is a peered Egg or an external service.

What is in scope today

  • Private networking connects Eggs that run on the same host.
  • Connections are deny-by-default: only pairs you have explicitly peered can reach each other.
  • The public <name>.<region>.ruust.run URL is unaffected. Private networking is in addition to it, not a replacement.