Docker container cost allocation across one or many VPS instances. Deploy lightweight agents, track per-container costs from a central dashboard. Weighted formula based on actual CPU and RAM usage.
Each VPS runs a lightweight Go agent that collects raw Docker stats and pushes them to the central server. The central server calculates costs using VPS configuration stored in the database — no local config needed on agents.
POST /api/v1/pushFrom single VPS to multi-VPS fleet — weighted cost allocation based on actual resource usage.
Total cost across all VPS, per-container breakdown, trends — all from one central dashboard. Online/offline detection per VPS.
Single Go binary — no Python, no dependencies. Reads Docker socket and pushes raw stats. One-liner deploy via curl pipe.
Weighted allocation: CPU 50%, RAM 40%, Storage 10%. Fully configurable per VPS from the dashboard — adjust weights in real-time.
Admin, Engineer, Management — three access levels. Session-based login with bcrypt password hashing.
Add/edit/delete VPS from dashboard. Set price, CPU cores, RAM, storage, weights — all stored in DB. Agent just needs an API key.
Docker image on GHCR. Binary tarballs for amd64/arm64 on GitHub Releases. Versioned releases with semver tags.
Docker Compose for the central server, one-liner for agents on each VPS.
# Start everything with one command:
curl -sL https://raw.githubusercontent.com/edsuwarna/container-cost/main/docker-compose.yml > docker-compose.yml
docker compose up -d
# Open http://localhost:8081
# Login: admin / change-me
# Add VPS → deploy agent → done
# From the VPS you want to monitor:
docker run -d --name container-cost-agent \
--restart unless-stopped \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
ghcr.io/edsuwarna/container-cost:latest \
--mode=agent \
--server=http://CENTRAL_IP:8080 \
--api-key=DCKR_xxx
# Download from GitHub Releases:
curl -LO https://github.com/edsuwarna/container-cost/releases/latest/download/container-cost-linux-amd64.tar.gz
tar xzf container-cost-linux-amd64.tar.gz
sudo install container-cost /usr/local/bin/
# Verify:
container-cost --version
container-cost --mode=agent --server=http://CENTRAL_IP:8080 --api-key=DCKR_xxx
💡 Agent only needs Docker socket + API key. VPS config (price, specs, weights) is managed from the dashboard.
From architecture deep-dive to API reference and troubleshooting.