Bare metal
No Docker: one script installs Postgres and Caddy, builds ravyn from source, and sets both services up under systemd. Meant for a fresh Debian or Ubuntu server.
1. Point your domain at the server
Two DNS A records to this server's IP: one for the app
(files.example.com), one for the API
(api.example.com). Caddy needs both resolving before
it can get TLS certificates.
2. Run the installer
curl -O https://tryravyn.com/install.sh chmod +x install.sh sudo DOMAIN=files.example.com ./install.sh
Leave off DOMAIN=... and it'll just ask. The API
domain defaults to api. plus whatever you gave it -
override with API_DOMAIN=... if you want something
else.
What it actually does
- Installs Postgres, Caddy, and the build tools needed to compile Rust.
- Creates a dedicated
ravynsystem user - nothing runs as root. - Installs Rust for that user and clones
ravyninto/opt/ravyn. - Builds release binaries for both
ravyn-apiandravyn-web. - Creates the Postgres role and database, with a random generated password.
- Writes
/etc/ravyn/api.envand/etc/ravyn/web.env. - Installs and starts
ravyn-api.serviceandravyn-web.serviceunder systemd. - Adds a Caddy site block for both domains and reloads it.
3. Create the first account
Open https://your-domain and register. The first
account on a fresh instance always becomes admin - no separate
setup wizard.
Managing the services
systemctl status ravyn-api ravyn-web journalctl -u ravyn-api -f systemctl restart ravyn-api ravyn-web
Updating
There's no update command yet - pull and rebuild by hand:
cd /opt/ravyn sudo -u ravyn git pull sudo -u ravyn env PATH="/home/ravyn/.cargo/bin:$PATH" cargo build --release -p ravyn-api sudo -u ravyn env PATH="/home/ravyn/.cargo/bin:$PATH" cargo-leptos build --release -p ravyn-web systemctl restart ravyn-api ravyn-web
Where things live
| Path | What |
|---|---|
/opt/ravyn | source checkout + build output |
/var/lib/ravyn | uploaded files and thumbnails |
/etc/ravyn/*.env | configuration, including the DB password |
/etc/caddy/ravyn.caddyfile | the reverse proxy block the installer added |
To use S3-compatible storage instead of local disk, or to change
anything else, edit /etc/ravyn/api.env and
systemctl restart ravyn-api - see the
environment
variable reference on the Docker page, they're the same
variables either way.