Deploy to Render
Axonyx apps can run on Render as normal Rust web services. Static starters can use the regular build and start commands. Apps with backend `.ax` sources use the compiled build and start commands. Both bind to Render's `PORT` environment variable.
Render settings
Create a new Render Web Service from your Axonyx app repository and use these commands for a static site, blog, or docs starter.
Build command
cargo install cargo-axonyx --version 0.8.6 --locked --force && cargo ax build --cleanStart command
cargo ax run start --host 0.0.0.0 --port $PORTHealth check path
/__axonyx/healthCompiled backend apps
If your app has loaders, actions, or API routes, build and start the compiled production server. axonyx.dev uses this mode. Keep your committed Cargo.lock; do not run `cargo ax upgrade` during deployment, because that changes the tested dependency set.
cargo install cargo-axonyx --version 0.8.6 --locked --force && cargo ax build --clean --compiled
cargo ax run start --compiled --host 0.0.0.0 --port $PORTBefore 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.