Skip to content
Flux
From Hostname to Container: How Your App Gets Its Address on Flux

From Hostname to Container: How Your App Gets Its Address on Flux

Fluxers! You deploy an app on Flux, and a moment later it answers at a clean HTTPS address — while the container itself runs on independent machines somewhere among thousands of nodes in more than 50 countries. How does a browser find it? This article walks the path, hop by hop, as described in the Flux v9 whitepaper.

Step 1: FluxOS decides where the app runs

Placement is the job of FluxOS on the nodes themselves. Every node keeps the network’s app registry — every app specification, and every location where each app is running. That registry is the source of truth for everything that follows, and since FluxOS 8.21 a node only serves it once it is complete.

Step 2: the domain manager learns where every app lives

The Flux Domain Manager (FDM) turns that registry into addresses. It reads the app specifications and their locations continuously — locations every 10 seconds — and for every app computes its names: one per port, plus a main alias, under app.runonflux.io. Deploy an app called myapp, and myapp.app.runonflux.io follows automatically.

Step 3: health-checked routing to the instances

FDM generates a configuration for HAProxy, the proven open-source load balancer, which terminates TLS and routes each request by its hostname to one of the app’s running instances. Only instances that pass health checks are in rotation: HAProxy checks every 3 seconds and takes a failed instance out in about 6. A new configuration is validated before it is ever loaded, so a bad update can never take routing down — the previous configuration keeps serving.

Step 4: certificates, and your own domain

Every app address is served over HTTPS. Want your own domain? Set it in the app specification and point its DNS at Flux: FDM checks that the domain really points to it, then obtains a certificate from Let’s Encrypt and renews it automatically, well before it expires.

Game servers take the direct route

Game traffic is different: often UDP, sensitive to every millisecond, and best kept off any middle hop. For game servers like Minecraft, Rust and Valheim, Flux publishes the address of the elected primary node directly in DNS, so players connect straight to the node running the game. When a standby takes over, the record follows it.

Inside an app: the mesh

Apps with several components need to find each other too. On every node, a small resolver called fluxdnsd answers names under .mesh.flux, so a component can reach its database or its peers by name, wherever they run. Answers carry a 5-second lifetime, so when membership changes, the whole app sees it within seconds, and a stale view can never overwrite a newer one.

Open by design

Every piece of this path can be reproduced by anyone. The Flux Domain Manager is open source under AGPL-3.0, the registry it reads is an ordinary FluxOS route served by every node on the network, and the app specification already accepts your own domains. Anyone can run their own FDM, point it at any node, and serve Flux apps from a domain they control — the reference path is the default, not the only one.

Where it goes next: private deployments

On the Flux roadmap for Q4 2026 are private deployments — private overlay networks, or VPONs — the complement to private payments and chain privacy. The idea: membership in an app’s network is granted by a private key rather than by being discoverable, and the public routing path does not need to know which nodes host a private deployment, or for whom. The building blocks already run on Flux today inside CumulusVPN: WireGuard tunnels, traffic obfuscation, a stealth transport on port 443 and multi-hop routing.

From a plain hostname to a container on an independent machine, in a handful of well-understood hops — and every one of them open for anyone to run. Deploy something and watch it answer at cloud.runonflux.com.


Posted in Education

by RunonFlux

Tags:

Comments

Leave a Reply

You must be logged in to post a comment.