# Install PromptRank v1.0.1

Distribution identity: `1.0.1`; preserved application: `1.0.1-maintenance-rc3`.
Read the offline SECURITY.md included in your buyer archive before starting.

1. Provision Node 22 LTS, PostgreSQL 16, Redis 7 and a process supervisor. Create an
   empty database owned by a dedicated LOGIN role without SUPERUSER, CREATEDB or
   CREATEROLE. The runtime role owns its application schema so the private wizard
   can create tables. Use URI-encoded database/Redis passwords.
2. Verify the archive SHA-256 against its separately delivered manifest, extract
   into a new directory, and run `bash /absolute/path/promptrank-v1/install.sh`
   as the unprivileged application user. Supply the two private connection URLs
   when prompted. The script refuses an existing `.env` or keyring, installs the
   frozen lockfile and builds. It never requires sudo or manual `.env` editing.
   Build tools/development dependencies are required for this source distribution.
3. Keys are created mode 0600 outside the release at
   `${XDG_CONFIG_HOME:-$HOME/.config}/promptrank/keys.json`. Set XDG_CONFIG_HOME to
   an appropriate private location for each independent deployment. The app's
   mode-0600 `.env` stores only that path and the active key ID, along with its
   database, Redis, JWT and setup settings. Securely back up the keyring separately
   from source and database backups before proceeding. Keep the keyring path
   accessible to the supervisor's application user.
4. From `promptrank/`, run `npm start -- --hostname 127.0.0.1`. Use a private tunnel
   or authenticated reverse proxy to open `/install`. Read INSTALLER_TOKEN from
   your own private `.env`, complete migrations, create the owner, and enter your
   authorized provider keys. All setup endpoints lock after completion. Do not
   expose the wizard publicly. Re-running the shell installer does not upgrade
   an existing installation.
5. Sign in as owner; configure application URL, verified SMTP and the actual
   enabled providers/plans. Port 465 uses implicit TLS; other ports require
   STARTTLS unless explicitly configured for implicit TLS. All paths verify the
   certificate chain and hostname. Use `NODE_EXTRA_CA_CERTS=/absolute/ca.pem` in
   the supervisor for an approved private CA; restart Node after changing it.
   Never disable certificate verification. For Redis use `rediss://` or
   `REDIS_TLS=true`; the same CA mechanism applies.
6. Configure HTTPS at the reverse proxy, retain logs privately, verify DB/Redis,
   TLS mail delivery, owner/customer isolation and backups on your own staging
   host. Configure real billing only in an authorized provider sandbox first.
   No real checkout or live AI-provider success is certified by this candidate.

For an existing RC1/RC2 deployment, do not run the fresh installer or blindly
copy the new build over running services. Follow the offline migration procedure
in SECURITY.md. Updates/rollback through the in-app updater remain unqualified.
