Deployment Basics
This guide explains how to deploy Asset Core write and read daemons on a single node with durable storage.
Prerequisites
- Built Asset Core binaries (
cargo build --release) - Writable directory for commit log and checkpoints
- Ports 8080 and 8081 available (or alternatives)
Step 1 - Prepare directories
Create directories for persistent state:
mkdir -p /var/lib/assetcore/{logs,checkpoints}
The commit log and checkpoints will be stored here.
Step 2 - Configure the write daemon
Create a configuration file write.toml:
[server]
listen = "0.0.0.0:8080"
[commit_log]
path = "/var/lib/assetcore/logs/commit_log.log"
checkpoint_path = "/var/lib/assetcore/checkpoints/write.checkpoint.json"
flush_interval_ms = 100
[ingress]
queue_capacity = 1000
precheck_workers = 4
max_inflight_commits = 100
Key settings:
| Setting | Description |
|---|---|
listen | Address and port to bind |
commit_log.path | Where to store the event log |
flush_interval_ms | How often to fsync (lower = more durable) |
precheck_workers | Parallel validation workers |
Step 3 - Configure the read daemon
Create a configuration file read.toml or use command-line arguments:
[server]
listen = "0.0.0.0:8081"
[tail]
commit_log = "/var/lib/assetcore/logs/commit_log.log"
checkpoint = "/var/lib/assetcore/checkpoints/read.checkpoint.json"
poll_interval_ms = 10
The read daemon must point to the same commit log as the write daemon.
Step 4 - Start the write daemon
./target/release/assetcored-write --config write.toml
Verify it’s running:
curl http://localhost:8080/v1/health
Expected: {"status": "healthy", ...}
Step 5 - Start the read daemon
./target/release/assetcored-read \
--listen 0.0.0.0:8081 \
--commit_log /var/lib/assetcore/logs/commit_log.log \
--checkpoint /var/lib/assetcore/checkpoints/read.checkpoint.json
Verify it’s running:
curl http://localhost:8081/v1/health
Step 6 - Verify end-to-end
Send a test commit:
curl -X POST http://localhost:8080/v1/commit \
-H "Content-Type: application/json" \
-d '{
"operations": [
{"op": "CreateContainer", "args": {"container_id": 1, "kind": "Standard"}}
]
}'
Read it back:
curl http://localhost:8081/v1/read/container/1
Troubleshooting
”Address already in use”
Another process is using the port. Either stop that process or change the listen address.
”Permission denied” on commit log
The user running the daemon doesn’t have write access to the directory. Check ownership:
chown -R assetcore:assetcore /var/lib/assetcore
Read daemon shows old data
Check the freshness endpoint:
curl http://localhost:8081/v1/read/freshness
If checkpoint_seq is behind commit_log_seq, the read daemon is catching up. Monitor the lag metric.
Crash recovery
Both daemons recover automatically from their checkpoints on restart. No manual intervention needed.
Next steps
- Health and Metrics - Monitoring endpoints
- CLI Reference - Using acctl for operations