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

# Configuration reference

> Settings for the browser version of AI Code Zero: the photo library, ports and allowed addresses.

You can change how the browser version of AI Code Zero behaves with a `.env` file: a plain text file with one `NAME=value` setting per line. This works when you run [from source](https://docs.aicodezero.com/quickstart-source.md) or with [Docker](https://docs.aicodezero.com/self-hosting/docker.md).

**Every setting is optional.** The AI provider, key and model are always chosen in **Settings → AI**, never in `.env`. Each person's key stays in their own browser. The desktop app doesn't read `.env` at all.

Settings that start with `AICODEZERO_` were called `APPBLIPS_` before the app was renamed. The old names still work, so an existing `.env` needs no changes.

## Create the file

1. Copy `.env.example` to `.env` in the AI Code Zero folder.
2. Fill in only the lines you need.
3. Restart AI Code Zero. From source, stop it with `Ctrl+C` and run `npm start` again. With Docker, run `docker compose up -d`.

## Photo library

**UNSPLASH\_ACCESS\_KEY** `string`

The Access Key of an Unsplash app you register at [unsplash.com/developers](https://unsplash.com/developers). With it, the AI uses real, credited Unsplash photos in websites and apps, and you can add or replace pictures with Unsplash photos from the [right-click menu](https://docs.aicodezero.com/features/editing-apps.md#photos-from-unsplash). Nobody needs an Unsplash account, and games don't use it. Everyone on your server shares the key's hourly limit: 50 requests for a new app, 1,000 once Unsplash approves it for production. To make that go further, each search is cached for an hour and each visitor can make 50 searches an hour. You don't need the Secret Key.

**AICODEZERO\_PHOTO\_LIBRARY\_URL** `string` (default: [https://web.aicodezero.com](https://web.aicodezero.com))

For the desktop app, which holds no Unsplash key: the AI Code Zero server their photo searches go to. Set it to `off` to turn the photo library off.

## Server

**PORT** `number` (default: 3000)

The port `npm start` listens on. Docker ignores it. Use `AICODEZERO_PORT` instead.

**AICODEZERO\_PORT** `number` (default: 3000)

Docker only. The port on your computer where you open AI Code Zero.

**HOST** `string` (default: 127.0.0.1)

`npm start` only. The network address the server listens on. The default lets only your own computer connect. Change it only if you put your own sign-in in front. See [Security](https://docs.aicodezero.com/self-hosting/security.md#if-you-open-ai-code-zero-to-other-devices).

**AICODEZERO\_ALLOWED\_HOSTS** `string`

AI Code Zero only answers when opened as `localhost`, `127.0.0.1` or `[::1]`. To use another name, such as a reverse proxy's domain, list it here. Separate names with commas, without `http://` or a port. Example: `aicodezero.home.example`.

**AICODEZERO\_CHAT\_ALLOWED\_ORIGINS** `string`

AI Code Zero refuses AI requests that come from any page but its own. If a reverse proxy changes the address the server sees, builds can fail with `Requests from other sites are not allowed.` List the exact address you open AI Code Zero at, separated by commas. Example: `https://aicodezero.home.example`.

**AICODEZERO\_DATA\_DIR** `string` (default: \~/.appblips)

Older AI Code Zero versions stored saved keys here. Keys now stay in your browser, and the server deletes any old key files from this folder at startup. You don't need to set it. The Docker image uses `/data`.


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