Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,16 @@ CRON_SECRET="change-me"

# Optional: initial admin password used by `npm run db:seed`
# SEED_ADMIN_PASSWORD="change-me"

# ── Ticket attachment storage ───────────────────────────────────────────────
# Default: keep attachment bytes in PostgreSQL. Set to "s3" for AWS S3,
# Cloudflare R2, MinIO, Backblaze B2, or another S3-compatible private bucket.
ATTACHMENT_STORAGE="database"
# ATTACHMENT_S3_BUCKET="openhosting-private"
# ATTACHMENT_S3_REGION="us-east-1"
# ATTACHMENT_S3_ENDPOINT="https://s3.example.com"
# ATTACHMENT_S3_ACCESS_KEY_ID=""
# ATTACHMENT_S3_SECRET_ACCESS_KEY=""
# ATTACHMENT_S3_FORCE_PATH_STYLE="false"
# ATTACHMENT_S3_PREFIX="attachments"
# ATTACHMENT_S3_DOWNLOAD_TTL_SECONDS="300"
9 changes: 9 additions & 0 deletions docs/getting-started/environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ currency and SMTP is configured in the admin panel instead — see
| `SKIP_MIGRATIONS` | | `true` skips `prisma migrate deploy` in the container entrypoint (when migrations run elsewhere). |
| `SEED_ADMIN_PASSWORD` | | Admin password used by `npm run db:seed`, applied only when the account is created. Defaults to `admin12345`. |
| `SEED_ADMIN_EMAIL` | | Address of the admin account the seed creates. Defaults to `admin@example.com`; the installer writes the address you chose here so re-seeding never adds a second admin. |
| `ATTACHMENT_STORAGE` | | `database` (default) or `s3` for new ticket attachments. Existing rows retain their original backend. |
| `ATTACHMENT_S3_BUCKET` | S3 only | Private bucket used for attachments. |
| `ATTACHMENT_S3_REGION` | S3 only | Bucket signing region. Defaults to `us-east-1`; R2 commonly uses `auto`. |
| `ATTACHMENT_S3_ENDPOINT` | | Custom S3-compatible endpoint. Omit for AWS S3. |
| `ATTACHMENT_S3_ACCESS_KEY_ID` | | Static access key. Set together with the secret; omit both to use the AWS credential provider chain. |
| `ATTACHMENT_S3_SECRET_ACCESS_KEY` | | Static secret key. Never expose it to the browser. |
| `ATTACHMENT_S3_FORCE_PATH_STYLE` | | `true` for providers such as a local MinIO deployment that require path-style bucket URLs. |
| `ATTACHMENT_S3_PREFIX` | | Object-key prefix. Defaults to `attachments`. |
| `ATTACHMENT_S3_DOWNLOAD_TTL_SECONDS` | | Signed download lifetime from 60 to 604800 seconds. Defaults to 300. |
| `PORT` | | Port the server listens on (default `3000`). |
| `NODE_ENV` | | Set to `production` in production (the image sets this). |
| `SHADOW_DATABASE_URL` | | Only for generating new migrations locally — a spare database Prisma uses as a shadow. |
Expand Down
13 changes: 10 additions & 3 deletions docs/guides/tickets.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,16 @@ default and need your own model API key — see [AI support](ai-support.md).
## Attachments

Both customers and staff can attach files (up to 3 per message, 5 MB each).
Allowed types include images, PDF, plain text, ZIP and JSON. Files are stored in
the database and served through an authenticated download route — only the
ticket owner and staff can fetch them.
Allowed types include images, PDF, plain text, ZIP and JSON. PostgreSQL storage
is the zero-configuration default. Operators can instead use a private AWS S3,
Cloudflare R2, MinIO, Backblaze B2, or other S3-compatible bucket by setting
`ATTACHMENT_STORAGE=s3` and the `ATTACHMENT_S3_*` variables described in the
[environment reference](../getting-started/environment.md).

Every download first passes through OpenHosting's authenticated route. Only the
ticket owner and staff are authorized; S3-backed files then receive a short-lived
signed download URL. Existing database-backed attachments continue to work after
switching new uploads to S3.

## Notifications

Expand Down
Loading
Loading