Deploy to Render
Axonyx apps can run on Render as a normal Rust web service: build the static output, then start the Axonyx production server on Render's `PORT` environment variable.
Render settings
Create a new Render Web Service from your Axonyx app repository and use these commands.
Build command
cargo install cargo-axonyx --version 0.2.16 --force && cargo ax build --cleanStart command
cargo ax run start --host 0.0.0.0 --port $PORTHealth check path
/__axonyx/healthBefore deploying
Run the same checks locally before pushing. This catches package version drift, missing `use "@axonyx/ui"` assets, route issues, and `.asx` and `.ax` diagnostics before Render starts the build.
cargo ax check
cargo ax doctor --deny-warnings
cargo ax build --cleanProduction server hardening
Axonyx enables gzip compression and baseline security headers by default. Keep them explicit in `Axonyx.toml` when preparing a hosted app.
[server]
compression = true
security_headers = true
request_logging = true
log_format = "text"
max_body_bytes = "1mb"
request_timeout_seconds = 2
shutdown_grace_seconds = 5
max_connections = 1024Tokio is the default server
`cargo ax run start` uses the Tokio transport by default. Older deploy scripts that pass `--production-server` still work, but new Render services do not need that flag. If you need the old synchronous path while debugging, pass `--transport std`.
cargo ax run start --host 0.0.0.0 --port $PORT
cargo ax run start --transport std --host 0.0.0.0 --port $PORTWhy `$PORT` matters
Render assigns the public service port at runtime. `cargo ax run start` binds Axonyx to `0.0.0.0` and uses Render's `PORT`, which lets Render forward external traffic into the app.
Notes
No Node requirement
Native Axonyx apps use Cargo packages for the runtime and Foundry UI. The React adapter site is separate.
Static output plus server
`cargo ax build` writes static HTML into `dist/`, while `cargo ax run start` serves the route tree and public assets.