Standalone Usage
You can run Rustinx directly on your machine without Docker.
Build
cd app
cargo build --releaseThe binary is at app/target/release/rustinx.
Run
Create a minimal config and start serving:
[[vhost]]
hostnames = ["_"]
root = "./public"./target/release/rustinx --config rustinx.tomlThe server starts on 0.0.0.0:9090.
For local development, bind to localhost with a custom port:
[server]
listen = "127.0.0.1:3000"
[[vhost]]
hostnames = ["_"]
root = "./dist"
spa = true./target/release/rustinx --config dev.tomlFor Linux servers running Rustinx directly (without Docker):
[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.targetSignals
Rustinx handles these signals:
| Signal | Action |
|---|---|
SIGTERM | Graceful 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.
