# Environment Variables

You can set environment variables to change various parts of Inngest's configuration.

We'll look at all available environment variables here, what to set them to, and what our recommendations are for their use.

- [INNGEST\_BASE\_URL](#inngest-base-url)
- [INNGEST\_DEV](#inngest-dev)
- [INNGEST\_ENV](#inngest-env)
- [INNGEST\_EVENT\_KEY](#inngest-event-key)
- [INNGEST\_LOG\_LEVEL](#inngest-log-level)
- [INNGEST\_SERVE\_ORIGIN](#inngest-serve-origin)
- [INNGEST\_SERVE\_PATH](#inngest-serve-path)
- [INNGEST\_SIGNING\_KEY](#inngest-signing-key)
- [INNGEST\_STREAMING](#inngest-streaming)

Within some frameworks and platforms such as Cloudflare Workers, environment
variables are not available in the global scope and are instead passed as
runtime arguments to your handler. In this case, you can use
`inngest.setEnvVars()` to ensure your client has the correct configuration
before communicating with Inngest.

```ts
// For example, in Hono on Cloudflare Workers
app.on("POST", "/my-api/send-some-event", async (c) => {
  inngest.setEnvVars(c.env);

  await inngest.send({ name: "test/event" });

  return c.json({ message: "Done!" });
});

// You can also chain the call to be succinct
await inngest.setEnvVars(c.env).send({ name: "test/event" });
```

***

## INNGEST\_BASE\_URL

Use this to tell an SDK the host to use to communicate with Inngest.

If set, it should be the host including the protocol and port, e.g. `http://localhost:8288` or `https://my.tunnel.com`. Can be overwritten by manually specifying `baseUrl` in `new Inngest()`.

In most cases we recommend keeping this unset. A common case, though, is wanting
to force a production build of your app to use the Inngest Dev Server instead of
Inngest Cloud for local integration testing or similar.

In this case, prefer using [INNGEST\_DEV=1](#inngest-dev). For Docker, it may be
appropriate to also set `INNGEST_BASE_URL=http://host.docker.internal:8288`. Learn more in our [Docker guide](/docs-markdown/guides/development-with-docker).

***

## INNGEST\_DEV

Use this to force an SDK to be in Dev Mode with `INNGEST_DEV=1`, or Cloud mode with `INNGEST_DEV=0`. A URL for the dev server can be set at the same time with `INNGEST_DEV=http://localhost:8288`.

Can be overwritten by manually specifying `isDev` in `new Inngest()`.

Explicitly setting either mode will change the URLs used to communicate with Inngest, as well as turning **off** signature verification in Dev mode, or **on** in Cloud mode.

If neither the environment variable nor config option are specified, the SDK defaults to **cloud mode**. For local development, explicitly set `INNGEST_DEV=1` or `isDev: true` in your client configuration.

***

## INNGEST\_ENV

Use this to tell Inngest which [Inngest Environment](/docs-markdown/platform/environments?ref=environment-variables) you're wanting to send and receive events from.

Can be overwritten by manually specifying `env` in `new Inngest()`.

This is detected and set automatically for some platforms, but others will need manual action. See [Configuring branch environments](/docs-markdown/platform/environments#configuring-branch-environments?ref=environment-variables) to see if you need this.

***

## INNGEST\_EVENT\_KEY

The key to use to send events to Inngest. See [Creating an Event Key](/docs-markdown/events/creating-an-event-key?ref=environment-variables) for more information.

Can be overwritten by manually specifying `eventKey` in `new Inngest()`.

***

## INNGEST\_SERVE\_ORIGIN

The origin used to access this application from Inngest Cloud.

If set, it should be the origin including the protocol and port, e.g. `http://localhost:8288` or `https://my.tunnel.com`. Can be overwritten by manually specifying `serveOrigin` in `serve()`.

By default, an SDK will try to infer this using request details such as the `Host` header, but sometimes this isn't possible (e.g. when running in a more controlled environment such as AWS Lambda or when dealing with proxies/redirects).

***

## INNGEST\_SERVE\_PATH

The path used to access this application from Inngest Cloud.

If set, it should be a valid URL path with a leading `/`, e.g. `/api/inngest`.

By default, an SDK will try to infer this using request details, but sometimes this isn't possible (e.g. when running in a more controlled environment such as AWS Lambda or when dealing with proxies/redirects).

***

## INNGEST\_SIGNING\_KEY

The key used to sign requests to and from Inngest to ensure secure communication. See [Serve - Signing Key](/docs-markdown/learn/serving-inngest-functions#signing-key?ref=environment-variables) for more information.

Can be overwritten by manually specifying `signingKey` in `new Inngest()`.

***

## INNGEST\_SIGNING\_KEY\_FALLBACK

Only used during signing key rotation. When it's specified, the SDK will automatically retry signing key auth failures with the fallback key.

Available in version `3.18.0` and above.

***

## INNGEST\_STREAMING

Sets an SDK's streaming support, potentially circumventing restrictive request timeouts and other limitations. See [Streaming](/docs-markdown/streaming?ref=environment-variables) for more information.

Can be `true` or `false`.

By default, this is `false`, disabling streaming. It can also be overwritten by setting `streaming` in `serve()` with the same values.