Skip to main content

Usage

dokrypt up [flags]

Flags

FlagTypeDefaultDescription
-d, --detachboolfalseRun in background (detached mode)
--buildboolfalseRebuild images before starting
--servicestring[]allStart specific service(s) only
--freshboolfalseDestroy existing state, start clean
--forkstringFork a live network (e.g., mainnet, polygon)
--fork-blockuint640Fork at a specific block number
--snapshotstringStart from a saved snapshot
--profilestringUse a config profile (dev, test, staging)
--timeoutduration5mMaximum time to wait for services to start

Description

Reads dokrypt.yaml, resolves dependencies, pulls required Docker images, creates networks, and starts all chains and services in the correct order. The startup process:
  1. Parse configuration — Reads dokrypt.yaml (with optional profile override)
  2. Initialize engine — Creates the container runtime and engine
  3. Create networks — Sets up Docker networks for service communication
  4. Start chains — Launches blockchain nodes (Anvil, Hardhat, or Geth)
  5. Fund accounts — Creates and funds test accounts with the configured balance
  6. Start services — Launches services in dependency order (parallel where possible)
  7. Health checks — Waits for all services to report healthy
  8. Save state — Persists container IDs and ports to ~/.dokrypt/state/
  9. Display status — Shows running services, URLs, and funded accounts

Examples

Start everything

dokrypt up

Start in background

dokrypt up --detach

Start only the blockchain

dokrypt up --service ethereum

Start with a fresh state

dokrypt up --fresh
Destroys any existing containers and volumes before starting.

Fork mainnet on startup

dokrypt up --fork mainnet
dokrypt up --fork polygon --fork-block 50000000

Restore from snapshot on startup

dokrypt up --snapshot clean-state

Use a configuration profile

dokrypt up --profile staging
Profile overrides are defined in dokrypt.yaml under profiles:.

Custom timeout

dokrypt up --timeout 10m

Output

Starting services...
✓ ethereum    Ready  ▸ http://localhost:8545
✓ ipfs        Ready  ▸ http://localhost:5001
✓ blockscout  Ready  ▸ http://localhost:4000

Accounts (10000 ETH each):
  0x70997970C51812dc3A010C7d01b50e0d17dc79C8
  0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC
  0x90F79bf6EB2c4f870365E785982E1f101E93b906
  ...

Started 3 services in 4.8s

Errors

ErrorCauseSolution
dokrypt.yaml not foundNo config file in current directoryRun dokrypt init or dokrypt config init
Docker is not runningDocker daemon is not startedStart Docker Desktop or the Docker service
Startup timeout exceededServices didn’t become healthy in timeIncrease --timeout or check dokrypt logs
Port already in useAnother process is using a required portStop the conflicting process or change ports in config