Skip to content

Deployment

chartgen ships as a single binary. Below are the supported paths to get it running remotely.

Tagging a release (v*) kicks off .github/workflows/release.yml, which uploads four artifacts to the GitHub release:

ArtifactPlatform
chartgen-linux-x86_64.tar.gzLinux x86_64
chartgen-linux-aarch64.tar.gzLinux ARM64
chartgen-macos-x86_64.tar.gzmacOS Intel
chartgen-macos-aarch64.tar.gzmacOS Apple Silicon

Grab the one you want from the Releases page, extract, and run ./chartgen --serve.

The repo’s Dockerfile is a 2-stage build (rust:1.86-slimdebian:bookworm-slim, final image ~93 MB):

Terminal window
docker build -t chartgen .
docker run -p 9315:9315 \
-e CHARTGEN_BASE_URL=https://chartgen.example.com \
-v chartgen-data:/root/.chartgen \
chartgen --serve --trade --testnet

The ~/.chartgen/ volume mount persists alerts.json, trades.log, and subscriptions.json across restarts. See the persistence reference.

NameRead byPurpose
CHARTGEN_BASE_URLsrc/server.rsPublic HTTPS URL that chartgen embeds in OAuth metadata, redirect URLs, and logo_uri. Falls back to http://localhost:<port>, which Claude.ai rejects — always set this in production.
HOME / USERPROFILEsrc/main.rsPicks the data directory (~/.chartgen/). Override to relocate alerts.json / trades.log / subscriptions.json.
_CHARTGEN_PORTsrc/server.rsInternal — set by the process to its own bind port so base_url() can compose the fallback URL. Do not set by hand.

Claude.ai requires HTTPS. Terminate TLS at your reverse proxy and forward to chartgen’s HTTP port (default 9315). The SSE stream on /mcp and /sse must not be buffered — for nginx:

location / {
proxy_pass http://127.0.0.1:9315;
proxy_http_version 1.1;
proxy_buffering off;
proxy_read_timeout 24h;
proxy_set_header Host $host;
}

.github/workflows/deploy.yml fires when CI finishes successfully on master and calls Coolify’s deploy endpoint:

GET ${COOLIFY_BASE_URL}/api/v1/deploy?uuid=${COOLIFY_APP_UUID}&force=false
Authorization: Bearer ${COOLIFY_API_TOKEN}

Required repository secrets:

SecretWhat it is
COOLIFY_BASE_URLCoolify instance root, e.g. https://coolify.example.com.
COOLIFY_APP_UUIDUUID of the chartgen application in Coolify.
COOLIFY_API_TOKENCoolify API token with deploy permission.

Cross.toml configures cross to apt-install the ARM64 variants of libssl, libfontconfig, and libfreetype before building for aarch64-unknown-linux-gnu:

Terminal window
cargo install cross
cross build --release --target aarch64-unknown-linux-gnu

This is the same recipe the release workflow uses for the chartgen-linux-aarch64.tar.gz artifact.