Usage
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
-d, --detach | bool | false | Run in background (detached mode) |
--build | bool | false | Rebuild images before starting |
--service | string[] | all | Start specific service(s) only |
--fresh | bool | false | Destroy existing state, start clean |
--fork | string | — | Fork a live network (e.g., mainnet, polygon) |
--fork-block | uint64 | 0 | Fork at a specific block number |
--snapshot | string | — | Start from a saved snapshot |
--profile | string | — | Use a config profile (dev, test, staging) |
--timeout | duration | 5m | Maximum time to wait for services to start |
Description
Readsdokrypt.yaml, resolves dependencies, pulls required Docker images, creates networks, and starts all chains and services in the correct order.
The startup process:
- Parse configuration — Reads
dokrypt.yaml(with optional profile override) - Initialize engine — Creates the container runtime and engine
- Create networks — Sets up Docker networks for service communication
- Start chains — Launches blockchain nodes (Anvil, Hardhat, or Geth)
- Fund accounts — Creates and funds test accounts with the configured balance
- Start services — Launches services in dependency order (parallel where possible)
- Health checks — Waits for all services to report healthy
- Save state — Persists container IDs and ports to
~/.dokrypt/state/ - Display status — Shows running services, URLs, and funded accounts
Examples
Start everything
Start in background
Start only the blockchain
Start with a fresh state
Fork mainnet on startup
Restore from snapshot on startup
Use a configuration profile
dokrypt.yaml under profiles:.
Custom timeout
Output
Errors
| Error | Cause | Solution |
|---|---|---|
dokrypt.yaml not found | No config file in current directory | Run dokrypt init or dokrypt config init |
Docker is not running | Docker daemon is not started | Start Docker Desktop or the Docker service |
Startup timeout exceeded | Services didn’t become healthy in time | Increase --timeout or check dokrypt logs |
Port already in use | Another process is using a required port | Stop the conflicting process or change ports in config |