Skip to main content
Freesona reads configuration from a .env file at startup. Copy .env.sample to .env and fill in the values you need. Variables you leave blank are ignored unless the feature that depends on them is used.

Required

These three variables must be set for the bot to start.
HTTP_PORT has a default of 10000 and is not required.

AI Provider

Provider API Keys

Set only the key for the provider you chose in AI_PROVIDER. You do not need all of these.
NVIDIA_API_KEY is the preferred variable name for the NVIDIA NIM provider.

Optional Integrations

Set these only if you want to use the corresponding feature.

File Paths

Freesona persists its state — persona, memory, warnings, character memory, anniversaries, config, and logs — to local files. The right path depends on where you are running the bot.
AI_PERSONA_JSON_FILE takes precedence over AI_PERSONA_FILE. If a persona.json is found it is loaded first. persona.txt is only used as a fallback for existing installs.

Logging

Freesona uses a structured logging system. These variables control logging behavior:
On Railway and Render, you must mount a persistent volume at /data and use the /data/ paths shown above. Without a persistent volume, all data — including your persona, conversation memory, warnings, character memory, anniversaries, and runtime config — is wiped on every redeploy.