Deployment
Deployment
On this page
A Smeltery app runs on a server as one program: the release binary, started by systemd, behind Caddy or nginx for
HTTPS. This section walks through it on Ubuntu 24.04; the commands use the app name myapp, the folder
/srv/myapp and the domain app.example.com.
What goes on the server#
| Item | What it is |
|---|---|
myapp |
the release binary (target/release/myapp) |
.env |
the production settings (or the same keys in the process environment, which win over .env) |
public/ |
the static files, including the built public/assets/css/app.css (in a React or Vue app: public/build/, the output of npm run build) |
storage/ |
uploads, logs, file sessions and the file cache; writable, kept across deploys; its folders are created when first needed |
database/ |
the SQLite file and its -wal / -shm files (SQLite apps only); writable, kept across deploys |
Everything else is compiled into the binary: the routes and controllers, the migrations and seeders, the Mold views
and mail templates (release builds render compiled templates), the Sparks components and sparks.js, and the
Watchfire dashboard. Running it needs no resources/, no Rust sources and no Cargo. The binary also runs the
setup commands, so the server needs no smeltery CLI: ./myapp key:generate, ./myapp storage:link,
./myapp migrate --force (see The smeltery command).
The app root is the working directory (or SMELTERY_ROOT): .env, public/, storage/, LOG_FILE and a relative
SQLite path are read from there.