DeployRender

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

Code
terminal
cargo install cargo-axonyx --version 0.2.16 --force && cargo ax build --clean

Start command

Code
ax
cargo ax run start --host 0.0.0.0 --port $PORT

Health check path

Code
ax
/__axonyx/health

Before 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.

Code
ax
cargo ax check
cargo ax doctor --deny-warnings
cargo ax build --clean

Production server hardening

Axonyx enables gzip compression and baseline security headers by default. Keep them explicit in `Axonyx.toml` when preparing a hosted app.

Code
ax
[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 = 1024

Tokio 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`.

Code
ax
cargo ax run start --host 0.0.0.0 --port $PORT
cargo ax run start --transport std --host 0.0.0.0 --port $PORT

Why `$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.