Quickstart · all pages

Start

Guides

Reference

Project

  1. Docs
  2. Start
  3. Quickstart

Quickstart

Install diaporos, run a node and deploy a service in a few minutes.

  • 1 min read

Install a release archive (Releases), or build from source with Rust 1.85+ on Linux or macOS: cargo build --release (the binary is target/release/diaporos).

1. A service. Any directory with a diaporos.contract works. This one serves its own folder with Python:

mkdir -p app/bin && echo 'hello v1' > app/index.html
cat > app/diaporos.contract <<'EOF'
name hello
exec bin/run
port http 8080
env PORT ${DIAPOROS_PORT_HTTP}
health http /
cap net.listen http
EOF
printf '#!/bin/sh\nexec python3 -m http.server "$PORT" --bind 127.0.0.1\n' > app/bin/run
chmod +x app/bin/run

2. A node. The daemon owns port 8080 and keeps its state in .diaporos/node:

diaporos node --bind 127.0.0.1 &

3. Push and deploy.

diaporos push app --out hello.manifest     # hash the tree, store new objects
diaporos deploy hello.manifest             # fetch, verify, start, health-gate, swap
curl localhost:8080/                       # -> hello v1

4. Change it and deploy again. Only the changed file ships, and clients on port 8080 never see an error:

echo 'hello v2' > app/index.html
diaporos push app --out hello.manifest && diaporos deploy hello.manifest
# deployed hello e9aa5745cb8b: fetch 1 ms (0.3 KiB from the store), ... total 93 ms
diaporos dashboard --open                  # services, deploys, events, logs

Next: share a store between machines with diaporos serve and push --remote; run many nodes from a fleet file with diaporos fleet deploy; require signed releases with diaporos keygen and a node trust file. See the CLI reference.

↑↓ to move ↵ to open