Environment Configuration

Proper environment configuration is crucial for LumoKit (v1.0.0) to connect to services, interact with the blockchain, and function as expected. Both the frontend and backend require their own environment variable files.


1. Frontend Environment (lumokit-frontend)

The frontend uses a .env.local file to store its environment variables.

Setup Steps:

  1. In the root of your lumokit-frontend project directory, rename the example file .env.example to .env.local.

  2. Modify the variables in .env.local with your specific configuration.

Frontend Environment Variables (.env.local):

Variable

Description

Default/Example from .env.example

NEXT_PUBLIC_API_URL

The URL of your running LumoKit backend instance.

http://localhost

NEXT_PUBLIC_LUMO_TOKEN_ADDRESS

The contract address of the $LUMO token on Solana.

4FkNq8RcCYg4ZGDWh14scJ7ej3m5vMjYTcWoJVkupump

NEXT_PUBLIC_PRO_SUBSCRIPTION_AMOUNT

The amount of $LUMO tokens required for a pro subscription.

22000

NEXT_PUBLIC_PAYMENT_RECEIVER_ADDRESS

The Solana wallet address that will receive subscription payments. Ensure this is an address you control.

CsTmcGZ5UMRzM2DmWLjayc2sTK2zumwfS4E8yyCFtK51

NEXT_PUBLIC_SOLANA_RPC_URL

The RPC URL for connecting to the Solana blockchain. A dedicated provider is highly recommended.

https://api.mainnet-beta.solana.com

Important Notes for Frontend:

  • ⚠️ Backend Dependency: The NEXT_PUBLIC_API_URL must point to your operational LumoKit backend instance.

  • 💰 Payment Address: If you intend to receive payments, ensure NEXT_PUBLIC_PAYMENT_RECEIVER_ADDRESS is a Solana wallet address that you control.


2. Backend Environment (LumoKit Backend)

The backend uses a .env file for its configuration.

Setup Steps:

  1. In the root of your LumoKit backend project directory, copy the example file: cp .env.example .env.

  2. Modify the variables in the newly created .env file with your specific settings.

Backend Environment Variables (.env):

Variable

Description

Example from .env.example

POSTGRES_*

Database connection details (user, password, db name etc.)

lumokit_db, lumokit_root, etc.

SOLANA_RPC_URL

URL for Solana RPC node.

https://api.mainnet-beta.solana.com

OPENAI_API_KEY

API key for OpenAI services.

sk-...

WALLET_ENCRYPTION_SALT

Salt for wallet encryption.

random_salt_value

PRO_MEMBERSHIP_WALLET

Wallet receiving pro membership payments.

CsTmcGZ5UMRzM2DmWLjayc2sTK2zumwfS4E8yyCFtK51

PRO_MEMBERSHIP_TOKEN

Token address for pro membership payments.

4FkNq8RcCYg4ZGDWh14scJ7ej3m5vMjYTcWoJVkupump

PRO_MEMBERSHIP_COST

Cost of pro membership in $LUMO.

22000

FREE_USER_DAILY_LIMIT

Daily message limit for free users.

10

PRO_USER_DAILY_LIMIT

Daily message limit for pro users.

200


Last updated