Prerequisites
- Ubuntu 22.04 or newer
- Public IPv4
- Domain already pointed to the VPS IP
- SSH user with
sudo - Base values from Environment Variables
- A storage profile from Manual Installation Overview
Shared server baseline
Option A: Bun + systemd + Nginx
1
Install runtime packages
package.json under engines.bun (currently 1.4.4). Make its bun executable available in that account’s PATH.2
Clone the repository and create .env
.env with vim .env and fill the required values before continuing. Set CHAIN_ID explicitly for the intended network.3
Build and migrate
4
Create the systemd service and Nginx site
Create The service account needs read access to the checkout and Create Enable the site, check the configuration, and issue the TLS certificate:Confirm
/etc/systemd/system/kuest.service with sudo vim. Replace deploy and the Bun path with the account and executable you configured:.env, and write access to .next for the standalone startup script. Then enable the service:/etc/nginx/sites-available/kuest with the following site, replacing the example domain:SITE_URL matches the final HTTPS origin. Restart the service after environment changes, and rerun bun run db:push when the domain or cron secret changes to update database callbacks.Option B: Docker Compose + Caddy
1
Install Docker Engine and Compose
Install Docker Engine, Compose plugin, and Git on the server.
2
Clone the repository and create .env
Use the same
/opt/kuest/prediction-market layout as the Bun path, and fill .env before starting the containers.3
Set domain variables
Add:
4
Start production compose
5
Run database migrations
Scheduler on VPS
If the suppliedpg_cron jobs are not active in your database, create Linux cron jobs that follow Scheduled Jobs. Keep that page as the single source of truth for the exact cron expressions.