> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/discordplace/discord.place/llms.txt
> Use this file to discover all available pages before exploring further.

# Client Environment Variables

> Configure the discord.place Next.js client with these environment variables.

Create a `.env` file in the `client/` directory and populate it with the variables below. You can use `client/.example.env` as your starting template.

```env client/.env theme={null}
ANALYZE=false
NEXT_PUBLIC_PORT=3000
NEXT_PUBLIC_CF_SITE_KEY=
CLIENT_SECRET=
NEXT_PUBLIC_CDN_URL=
```

## Variables

<ParamField path="ANALYZE" type="boolean" default="false">
  Set to `true` to enable Next.js bundle analysis. When enabled, the build process generates a detailed bundle report useful for debugging and optimizing bundle size. Set to `false` in production.
</ParamField>

<ParamField path="NEXT_PUBLIC_PORT" type="string" default="3000">
  The port the Next.js development server listens on. Defaults to `3000`. Change this if port 3000 is already in use on your system.
</ParamField>

<ParamField path="NEXT_PUBLIC_CF_SITE_KEY" type="string" required>
  Your Cloudflare Turnstile **site key**. This is the public key embedded in the client to render the Turnstile challenge widget.

  <Note>
    Obtain your site key from the [Cloudflare Turnstile dashboard](https://developers.cloudflare.com/turnstile/get-started/#get-a-sitekey-and-secret-key). The corresponding secret key goes in the server's `CLOUDFLARE_TURNSTILE_SECRET_KEY` variable.
  </Note>
</ParamField>

<ParamField path="CLIENT_SECRET" type="string" required>
  A shared secret between the Next.js client and the Express server. This value is attached to requests made by the client's server-side rendering so the server can verify their origin.

  <Warning>
    This value **must match** the `CLIENT_SECRET` variable set in the server's `.env` file. Use any sufficiently random string — treat it like a password.
  </Warning>
</ParamField>

<ParamField path="NEXT_PUBLIC_CDN_URL" type="string" required>
  The base URL of your CDN, used to serve emoji images and sound files. All asset URLs are constructed relative to this value.

  Must be a valid URL with no trailing slash, e.g. `https://cdn.yourdomain.com`.

  <Note>
    This should point to the same CDN bucket configured on the server side via `CDN_URL`. See [Server Environment Variables](/self-hosting/env-server) for details.
  </Note>
</ParamField>
