# Deploy RentBoy.rent V10 to Spaceship Node hosting

Use Node.js 22.x.

## Spaceship app settings

- Application mode: Production
- Application root: rentboy-fullstack-v10
- Application startup file: app.js
- Node version: 22.x

## Install dependencies

Run NPM Install in the Spaceship Node app panel, or via SSH:

```bash
npm install --workspaces --include-workspace-root --omit=dev --no-audit --no-fund
```

## Environment variables

Set these in Spaceship's Node app environment settings:

```env
NODE_ENV=production
SERVE_FRONTEND=true
PORT=8080
APP_URL=https://www.rentboy.rent
API_URL=https://www.rentboy.rent
CORS_ORIGIN=https://www.rentboy.rent,https://rentboy.rent
DATABASE_PATH=./data/rentboy.sqlite
JSON_LIMIT=40mb
COOKIE_SECURE=true
COOKIE_SAME_SITE=lax
JWT_ACCESS_SECRET=replace_with_a_long_random_secret_at_least_64_chars
JWT_ACCESS_EXPIRES_IN=15m
REFRESH_TOKEN_DAYS=30
VERIFY_TOKEN_MINUTES=120
RESET_TOKEN_MINUTES=30
SIGNUP_REQUIRES_INVITE=true
SIGNUP_INVITE_DAYS=14
ADMIN_EMAILS=info@rentboy.rent
MAIL_FROM=RentBoy.rent <no-reply@rentboy.rent>
SUPPORT_EMAIL=no-reply@rentboy.rent
SMTP_HOST=mail.spacemail.com
SMTP_PORT=465
SMTP_SECURE=true
SMTP_USER=no-reply@rentboy.rent
SMTP_PASS=put_your_SpaceMail_password_here
LOCAL_AI_ENDPOINT=http://127.0.0.1:11434/api/generate
LOCAL_AI_MODEL=hf.co/Jiunsong/supergemma4-26b-uncensored-gguf-v2:latest
LOCAL_AI_PROVIDER=ollama
LOCAL_AI_TIMEOUT_MS=600000
AI_PROXY_ALLOW_REMOTE=false
```

## SpaceMail

SpaceMail SMTP uses:

- SMTP host: mail.spacemail.com
- SMTP port: 465
- Encryption: SSL
- Username: full mailbox address, e.g. no-reply@rentboy.rent

## Startup

Start/restart the Node app from Spaceship. The app serves the frontend and backend from the same Node process when `SERVE_FRONTEND=true`.

## Do not delete these folders

```text
data/
uploads/
```

`data/` stores the SQLite database. `uploads/` stores member profile photos.
