---
title: Upload
icon: image-upload
description: Set up, configure, and run the Reloop upload microservice locally.
---
> For the complete documentation index, see [llms-docs.txt](/llms-docs.txt) or the site index [llms.txt](/llms.txt). Full docs corpus: [llms-full-docs.txt](/llms-full-docs.txt). Prefer markdown URLs (append `.md`) for agent consumption. Product skill: [skill.md](/skill.md).


File uploads — logos, attachments, and assets stored in MinIO/S3.

<Tip>
Run [`bun setup`](/docs/setup) once so MinIO is up (`bun docker:up`). Env files come from `bun setup` / `bun env:setup`. Console: [http://localhost:9001](http://localhost:9001) (`reloop` / `reloop123`).
</Tip>


## Overview

| Property | Value |
| :--- | :--- |
| **Directory** | `apps/backend/upload` |
| **Port** | `8018` |
| **Local URL** | [https://local.reloop.sh/api/upload](https://local.reloop.sh/api/upload) |
| **Swagger UI** | [https://local.reloop.sh/api/upload/openapi](https://local.reloop.sh/api/upload/openapi) |
| **Stack** | ElysiaJS · PostgreSQL · MinIO/S3 · NATS |


## Quick start

```bash
bun be:upload:dev
```

Or `bun backend:dev` / `bun dev`.


## Environment

`apps/backend/upload/.env` — from `bun setup` / `bun env:setup`.

```bash
PG_URL=postgresql://reloop:reloop123@localhost:5432/reloop
REDIS_URL=redis://:reloop123@localhost:6379
PORT=8018
BASE_URL="https://local.reloop.sh"
S3_ENDPOINT=http://localhost:9010
S3_ACCESS_KEY=reloop
S3_SECRET_KEY=reloop123
S3_BUCKET=reloop-uploads
S3_REGION=us-east-1
S3_FORCE_PATH_STYLE=true
NATS_URL=nats://localhost:4222
NODE_ENV=development
```

| Variable | Required | Default |
| :--- | :--- | :--- |
| `PG_URL` | **YES** | `postgresql://...` |
| `S3_ENDPOINT` | **YES** | `http://localhost:9010` |
| `S3_ACCESS_KEY` | **YES** | `reloop` |
| `S3_SECRET_KEY` | **YES** | `reloop123` |
| `S3_BUCKET` | **YES** | `reloop-uploads` |
| `PORT` | **YES** | `8018` |


## Commands

| Command | Description |
| :--- | :--- |
| `bun be:upload:dev` | Start dev server with hot reloading |
| `bun run --filter=be-upload build` | Compile production bundle |
| `bun run --filter=be-upload start` | Run compiled production build |
| `bun run --filter=be-upload check-types` | TypeScript type-check |


## Architecture

| Layer | Detail |
| :--- | :--- |
| **Storage** | Files uploaded to MinIO locally (`localhost:9010`), S3 in production |
| **Metadata** | File index stored in Postgres (`upload` table) |
| **Signed URLs** | Generates presigned upload/download URLs for the dashboard |


## Next

<CardGroup cols={2}>
  <Card icon="rocket" title="Setup" href="/setup">
    One-command local bootstrap
  </Card>
  <Card icon="globe" title="Port reference" href="/setup/port">
    MinIO ports `9010` / `9001`
  </Card>
  <Card icon="inbox" title="Inbox" href="/setup/backend/inbox">
    Attachments via upload
  </Card>
  <Card icon="layout" title="Template" href="/setup/backend/template">
    Assets used in templates
  </Card>
</CardGroup>
