summaryrefslogtreecommitdiff
path: root/Documentation/source/operations/environment.rst
blob: 64e5c8e8e1d9b6487ff15f7f1b1bf0d2b292522a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Environment
===========

Validation Source
-----------------

Environment validation is defined in ``src/env.js`` with
``@t3-oss/env-nextjs`` and ``zod``. Empty strings are treated as undefined.

Server Variables
----------------

.. list-table::
   :header-rows: 1
   :widths: 34 44

   * - Variable
     - Purpose
   * - ``DATABASE_URL``
     - PostgreSQL connection string.
   * - ``RESEND_API_KEY``
     - Resend API key. Must start with ``re_``.
   * - ``RESEND_AUDIENCE_ID``
     - Resend audience identifier.
   * - ``EMAIL_FROM``
     - Sender email address.
   * - ``BETTER_AUTH_SECRET``
     - better-auth secret. Required in production.
   * - ``BETTER_AUTH_URL``
     - Optional explicit auth base URL.
   * - ``GOOGLE_CLIENT_ID`` / ``GOOGLE_CLIENT_SECRET``
     - Google OAuth credentials.
   * - ``GITHUB_CLIENT_ID`` / ``GITHUB_CLIENT_SECRET``
     - GitHub OAuth credentials.

Client Variables
----------------

.. list-table::
   :header-rows: 1
   :widths: 34 44

   * - Variable
     - Purpose
   * - ``NEXT_PUBLIC_UMAMI_URL``
     - Optional Umami analytics script URL.
   * - ``NEXT_PUBLIC_UMAMI_WEBSITE_ID``
     - Optional Umami site identifier.

Skipping Validation
-------------------

``SKIP_ENV_VALIDATION=1`` can be used for limited local or container workflows.
Do not rely on it for production builds.

Production Notes
----------------

Production should use explicit, non-default secrets for Payload and better-auth
and an explicit public site URL for canonical links and generated metadata.