Getting Started
This guide walks you through serving your first static site with Rustinx.
Prerequisites
You need one of these:
- Docker (recommended for production)
- Rust toolchain (for building from source)
Setup
Put your HTML, CSS, and JavaScript files in a folder:
index.html
style.css
app.js
Then choose your method:
The fastest way to start. No Rust installation needed.
Run Rustinx
docker run -p 9090:9090 -v ./dist:/static:ro ghcr.io/shadowarcanist/rustinx:v1.0Open http://localhost:9090 in your browser.
Add a config file (optional)
For more control, create a rustinx.toml:
[server]
listen = "0.0.0.0:9090"
[[vhost]]
hostnames = ["_"]
root = "/static"
spa = trueMount it into the container:
docker run -p 9090:9090 \
-v ./rustinx.toml:/etc/rustinx/rustinx.toml:ro \
-v ./dist:/static:ro \
ghcr.io/shadowarcanist/rustinx:v1.0Clone and build
git clone https://github.com/shadowarcanist/rustinx.git
cd rustinx/app
cargo build --releaseThe binary is at app/target/release/rustinx (under 800KB).
Create a config file
[[vhost]]
hostnames = ["_"]
root = "./public"Run it
./target/release/rustinx --config rustinx.tomlWhat You Get by Default
Without any configuration, Rustinx applies these secure defaults:
| Setting | Default |
|---|---|
| Port | 9090 |
| Allowed methods | GET and HEAD only |
| Dot-path blocking | Enabled (blocks .env, .git, etc.) |
| ETag caching | Enabled |
| SPA mode | Disabled |
| Security headers | All enabled (CSP, HSTS, XFO, etc.) |
Next Steps
- Configuration reference for all available options
- Docker deployment for production setup
- SPA mode if you're serving a React/Vue/Angular app
