Sites
Rust support
Deploy Laravel for Rust or any other Rust web application on your own servers.
Push your code, Ploi builds and runs it
Pick Rust as the project type, or install a repository with a Cargo.toml and Ploi picks it up.
Ploi installs the toolchain, builds the release binary on every deploy and keeps it running behind NGINX, with SSL and logs in the panel.
Running
Every deployment builds the binary and restarts it.
Listens on
127.0.0.1:8000
Binary
target/release/api
Toolchain
stable
Scheduler
schedule:run, every minute
Queue worker
queue:work
How Ploi runs a Rust site
From repository to a running binary, without writing server config
Set up from Cargo.toml
Ploi reads the binary from your Cargo.toml and sees whether the app is built on Laravel for Rust, then writes a deploy script that fits.
Built on every deploy
Each deployment runs cargo build --release --locked on the server and restarts the binary once the build succeeds.
Kept running behind NGINX
Supervisor runs the binary on its own port and starts it again if it stops. NGINX serves your static files and passes the rest to the app.
What you get with every Rust site
- The stable Rust toolchain installed with rustup for the site's system user
- A rust-toolchain.toml in your repository picks another version on the next build
- Its own port, passed to the app as PORT and SERVER_PORT
- NGINX as reverse proxy, with WebSockets and free Let's Encrypt certificates
- A Rust tab with the Supervisor state, the binary, the toolchain and recent output
- Create Rust sites from the API and the MCP server too
Ready for Laravel for Rust
When laravel-rust is in your Cargo.toml, Ploi sets up the rest of the framework too
Environment ready
On the first clone Ploi points APP_URL at your domain and generates an APP_KEY when it is empty.
Migrations on deploy
The deploy script runs migrate --force after the build, so the database follows your code.
Frontend assets
npm ci and npm run build run on every deploy, and NGINX serves the built files directly.
Scheduler
Turn on the scheduler from the Rust tab. Ploi adds a cronjob that runs schedule:run every minute.
Queue worker
Start queue:work from the Rust tab. It runs as a daemon and restarts after every deployment.
Behind a proxy
The Rust tab shows the line to trust NGINX as a proxy, so visitor IPs and HTTPS URLs come through.
Any Rust web app
Axum, Actix Web, Rocket, Loco or your own server: if it listens on a port, Ploi can run it.
Read the port from PORT or SERVER_PORT and bind to 127.0.0.1, NGINX takes care of the outside world.
// Ploi passes the site's port in PORT let port = std::env::var("PORT").unwrap_or("8000".into()); let listener = tokio::net::TcpListener::bind(format!("127.0.0.1:{port}")).await?; axum::serve(listener, app).await?;
Questions
I already have a site with a Rust repository on it. Can I switch it over?
Yes. Change the project type to Rust in the site settings, then click "Set up from Cargo.toml" on the Rust tab. Ploi reads the binary, starts it and writes a deploy script that builds it. A new site picks up a repository with a Cargo.toml and no composer.json on its own.
Which Rust version does Ploi install?
The latest stable release, installed with rustup for the system user the site runs as. Add a rust-toolchain.toml to your repository to build with another version, and update to the newest stable release from the Rust tab.
How long does a deployment take?
The first build compiles every crate and can take several minutes on a small server. Later deploys reuse the compiled dependencies, so they only rebuild what changed.
What happens before the first deployment?
The binary does not exist yet, so the Rust tab tells you to deploy the site. After the first successful build the app starts by itself.