> ## Documentation Index
> Fetch the complete documentation index at: https://docs.postbase.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Configuration

> Environment variables and provider setup.

Postbase is configured with environment variables. Only the core Supabase keys
are required; everything else enables an optional capability.

## Core

| Variable | Purpose |
| - | - |
| `NEXT_PUBLIC_SUPABASE_URL` | Supabase project URL. |
| `NEXT_PUBLIC_SUPABASE_ANON_KEY` | Supabase anon key (browser). |
| `SUPABASE_SERVICE_ROLE_KEY` | Service-role key for trusted server jobs. |
| `NEXT_PUBLIC_APP_URL` | Your public origin — OAuth issuer + MCP connector base. |
| `DATABASE_URL` | Postgres connection string (for migrations). |

## Media storage (R2 / S3)

Set your bucket credentials to enable the [media library](/using/media)
(`R2_*` / S3-compatible keys) and configure the bucket's CORS to expose the
`ETag` header for multipart uploads.

## Platforms

Each platform you publish to needs its own OAuth app and keys (X, LinkedIn,
Instagram/Facebook, TikTok, YouTube). Add the keys and the channel's **Connect**
button lights up. Channels stay hidden until their provider is configured.

<Warning>
  **X charges for API use.** Your self-hosted install posts through your own X
  developer app, so X bills your developer account for every call. At the time
  of writing that's about $0.015 per post, $0.20 per post with a link and \$0.005
  per post read for stats. Check the current rates in your
  [X developer console](https://developer.x.com) before you connect X. The other
  platforms are free to post to.
</Warning>

## Optional

| Capability | How to enable |
| - | - |
| Billing | Stripe keys + price ids. |
| AI generation | The image/video provider key — enables [Generate](/ai/generate). |
| MCP over OAuth | Works out of the box once `NEXT_PUBLIC_APP_URL` is set. |

<Note>
  A capability that isn't configured is simply hidden in the UI — the app runs
  fine with just the core Supabase setup.
</Note>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.