Run a local Filecoin network with FOC (Filecoin Onchain Cloud) in minutes.
A developer-friendly tool for spinning up complete Filecoin test networks with smart contract support, deterministic key generation, and automated deployment—all running locally in Docker.
Use stable Rust via rustup, Docker, Git, and tar.
Default setup also needs network access to download repositories and images.
Run as a non-root user who can run docker info without sudo (on Linux,
typically through the docker group).
Check host.docker.internal: It must resolve to loopback on the host.
See hostname setup before starting.
cargo run -- initThis will:
- Download required repositories (or use your local ones)
- Build Docker images
- Generate deterministic cryptographic keys
- Prepare the environment
Using local repositories? Specify them during init:
cargo run -- init \
--curio local:/home/user/code/curio \
--filecoin-services local:/home/user/code/filecoin-services \
--pdp local:/home/user/code/pdp \
--lotus local:/home/user/code/lotusRe-initializing? Follow the stop and clean procedure.
cargo run -- build lotus
cargo run -- build curioThis will:
- Compile Lotus and Curio binaries inside Docker containers
- Cache build artifacts for faster subsequent builds
cargo run -- startThis will:
- Create the genesis block
- Start Lotus daemon with FEVM enabled
- Deploy FOC smart contracts (including MockUSDFC)
- Start storage provider(s)
- Launch Portainer for container management
Run only on a trusted development machine and network. Portainer's published port is not restricted to loopback, and Portainer has access to the Docker socket.
For experimental parallel startup, use cargo run -- start --parallel.
After startup, USER_1 is funded and configured for FOC storage. Check the
cluster with:
cargo run -- statusClient connection details are exported to
~/.foc-devnet/state/latest/devnet-info.json. The file contains raw test private
keys: do not share it or use those keys outside the devnet.
See integration examples to check balances or exercise storage with Synapse or filecoin-pin.
Use configuration to pin or replace dependency sources and change where devnet data is stored. Try service provider workflows to test storage with different approval and endorsement settings.
| Requirement | Details |
|---|---|
| Rust | Stable via rustup; a native build toolchain is required |
| Docker | Desktop (macOS) or CE (Linux) |
| tar | Archive utility (usually pre-installed) |
| Git | Required for repository setup |
| Disk Space | ~20GB for images and blockchain data |
| Architecture | x86-64 and ARM64; the devnet CI workflow runs on Linux x86-64 |
On Debian/Ubuntu, the CLI build uses build-essential, pkg-config, and
libssl-dev.
- Advanced documentation: CLI, configuration, cleanup, and troubleshooting
- Local contributor checks and CI dependency profiles
- MockUSDFC test token and deployment guide
See examples/README.md.
MIT License - see LICENSE file for details.
- Issues: GitHub Issues