Skip to content

Configuration

Control Plane (moenet-core)

All configuration is via environment variables in .env.

Required Variables

VariableDescription
DB_PASSWORDPostgreSQL password
JWT_SECRETSecret for JWT token signing
TELEGRAM_BOT_TOKENBot token from @BotFather
TELEGRAM_ADMIN_USERNAMEAdmin Telegram username
TELEGRAM_ADMIN_CHAT_IDAdmin chat ID for notifications
WEBHOOK_DOMAINBot webhook domain
WEBHOOK_SECRETWebhook validation secret
AGENT_API_KEYShared key for agent authentication

Optional Variables

VariableDefaultDescription
DB_HOSTpostgresPostgreSQL host
DB_PORT5432PostgreSQL port
DB_NAMEmoenetDatabase name
DB_USERmoenetDatabase user
REDIS_HOSTredisRedis host
REDIS_PORT6379Redis port
REDIS_URLredis://moenet-redis:6379Redis connection URL
RATE_LIMIT_MAX20Bot requests per minute
RATE_LIMIT_WINDOW_MS60000Rate limit window

Email Verification (Optional)

VariableDescription
MAILGUN_API_KEYMailgun API key
MAILGUN_DOMAINMailgun sending domain
MAILGUN_FROMSender email address

Agent (moenet-agent)

Agent configuration is via JSON config file. See Agent Config Reference for the full specification.

Config File Locations

The agent searches in order:

  1. Command line: ./moenet-agent -config /path/to/config.json
  2. Current directory: ./config.json
  3. System: /etc/moenet-agent/config.json
  4. User: ~/.config/moenet-agent/config.json

Environment Variable Overrides

VariableConfig PathDescription
MOENET_NODE_NAMEnode.nameNode name
MOENET_NODE_IDnode.idNode ID
MOENET_CP_URLcontrolPlane.urlControl Plane URL
MOENET_CP_TOKENcontrolPlane.tokenAgent token

Validate Config

bash
./moenet-agent -validate

MoeNet DN42 Network — AS4242420998