Skip to content

Binary Deploy

Get the binary for your platform from GitHub Releases.

Create /etc/rcommerce/config.toml:

[server]
host = "0.0.0.0"
port = 8080
[database]
db_type = "Postgres"
host = "localhost"
port = 5432
database = "rcommerce"
username = "rcommerce"
password = "your_password"
[security.jwt]
secret = "change-this-to-a-random-string"
Terminal window
rcommerce serve -c /etc/rcommerce/config.toml

Migrations run automatically on startup.

Create /etc/systemd/system/rcommerce.service:

[Unit]
Description=rCommerce API Server
After=network.target postgresql.service
[Service]
Type=simple
User=rcommerce
ExecStart=/usr/local/bin/rcommerce serve -c /etc/rcommerce/config.toml
Restart=always
RestartSec=5
Environment=RUST_LOG=info
[Install]
WantedBy=multi-user.target
Terminal window
sudo systemctl daemon-reload
sudo systemctl enable rcommerce
sudo systemctl start rcommerce

Use Caddy, Nginx, or Traefik in front of the binary:

api.example.com {
reverse_proxy localhost:8080
}

Health check endpoint: GET /health

Metrics (if enabled): GET /metrics (Prometheus format)