# Installing Rainciti Studio (no root, no Docker)

You need: a host that runs **Node.js 20 or newer**, a **PostgreSQL** database
(your host's control panel, or free at neon.tech), and SSH or a terminal on the host.

1. **Upload** this folder to your host, e.g. `~/rainciti`.
2. **Create the database** and copy its connection string
   (`postgresql://user:password@host:5432/dbname?sslmode=require`).
3. **Create `.env`:** copy `.env.example` to `.env` and fill in
   - `DATABASE_URL` = the connection string from step 2
   - `APP_URL=https://rainciti.com`
   - `SMTP_HOST=smtp.resend.com` and `SMTP_PASS` = your Resend API key, `MAIL_FROM`
   - `SPACES_KEY`, `SPACES_SECRET`, `SPACES_BUCKET`
   - `INTERAC_EMAIL`, `ADMIN_EMAIL`
4. **Build** (takes a few minutes): `cd ~/rainciti && bash deploy/setup.sh`
5. **Create your admin login:** `npm run db:seed` (asks for a password).
6. **Start the site**
   - *cPanel "Setup Node.js App":* Application root `rainciti`, startup file
     `deploy/app.js`, Node 20+, then Restart. Attach rainciti.com in the same screen,
     and turn on HTTPS under SSL/TLS (AutoSSL).
   - *Plain SSH host:* `bash deploy/start.sh` (use `PORT=…` if your host assigns one),
     kept running with `pm2` or `nohup`.

**Updating:** upload the new files (keep your `.env`), run `bash deploy/setup.sh`,
then restart the app.

Admin photo uploads can be large; if uploads fail, ask your host to raise the
request size limit.
