Quickstart
-
Install
Terminal window cargo install mothershipOr build from source:
Terminal window git clone https://github.com/seuros/mothership.gitcd mothershipcargo build --releaseOptional Cargo features keep the binary small (~10.4 MB default):
Feature Size impact Adds tui+0.3 MB TUI dashboard ( --tuiflag)wasm+8.4 MB WASM payload processing tokio-postgres+0.5 MB PostgreSQL flagship election Terminal window cargo build --release --features "tui,wasm,tokio-postgres" -
Initialize a manifest
Terminal window mothership initThis creates
ship-manifest.tomlin the current directory. A minimal Rails-style fleet looks like:[mothership]metrics_port = 9090compression = true[mothership.bind]http = "0.0.0.0:80"[[mothership.prelaunch]]name = "migrate"command = "rails"args = ["db:migrate"][[fleet.web]]name = "app"command = "bundle"args = ["exec", "rails", "server"]bind = "tcp://127.0.0.1:3000"healthcheck = "/up"routes = [{ bind = "http", pattern = "/.*" }][[fleet.workers]]name = "sidekiq"command = "bundle"args = ["exec", "sidekiq"]critical = false -
Validate
Terminal window # Offline manifest validationmothership clearance# Validation + uplink connectivity checks (needs network access)mothership preflight# Inspect the routing tablemothership chart -
Launch
Terminal window mothership # run the fleetmothership --tui # with the TUI dashboard (requires the tui feature)mothership --only web # only ships tagged "web"
What happens on launch
Section titled “What happens on launch”- Uplinks are verified — if a configured database or cache is unreachable, mothership aborts.
- Prelaunch jobs run in dependency order — a failing job aborts the launch.
- Bays dock and ships launch, respecting
depends_onordering. - Traffic flows: binds accept connections, routes match, requests proxy to ships and bays.
See Lifecycle states for the full state machine.
Running in containers
Section titled “Running in containers”When mothership runs as PID 1 on Linux it enables an internal init shim (PID 1 becomes a minimal reaper; the real runtime runs as a child). Prefer an external init anyway:
services: mothership: init: trueMore in Deployment.