RustinxRustinx

Standalone Usage

You can run Rustinx directly on your machine without Docker.

Build

cd app
cargo build --release

The binary is at app/target/release/rustinx.

Run

Create a minimal config and start serving:

rustinx.toml
[[vhost]]
hostnames = ["_"]
root = "./public"
./target/release/rustinx --config rustinx.toml

The server starts on 0.0.0.0:9090.

For local development, bind to localhost with a custom port:

dev.toml
[server]
listen = "127.0.0.1:3000"

[[vhost]]
hostnames = ["_"]
root = "./dist"
spa = true
./target/release/rustinx --config dev.toml

For Linux servers running Rustinx directly (without Docker):

/etc/systemd/system/rustinx.service
[Unit]
Description=Rustinx Static Web Server
After=network.target

[Service]
Type=simple
ExecStart=/usr/local/bin/rustinx --config /etc/rustinx/rustinx.toml
Restart=on-failure
User=www-data
Group=www-data
NoNewPrivileges=true
ProtectSystem=strict
ReadOnlyPaths=/
ReadWritePaths=/var/log/rustinx

[Install]
WantedBy=multi-user.target

Signals

Rustinx handles these signals:

SignalAction
SIGTERMGraceful shutdown
SIGINT (Ctrl+C)Graceful shutdown

On shutdown, Rustinx stops accepting new connections, waits for active requests to finish, and writes any remaining log entries to disk before exiting.

On this page