Short developer guide for running and contributing to FenixAI locally. Contains recommended environment variables, security habits and development commands.
- Create and activate a virtual environment
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev,llm,vision,monitoring]"
python -m playwright install chromium
plotly_get_chrome -y- Copy
.env.exampleto.envand update keys
cp .env.example .env
chmod 600 .env
# Edit .env - do not commit .env- Start the backend
# Default binds to 127.0.0.1 by design
python run_fenix.py --api- Start the frontend
cd frontend && npm install && npm run client:devThe Docker stack uses Python 3.12 by default, matching the current local virtualenv
series. Docker has no credential fallbacks: configure independent values of at
least 32 characters for JWT_SECRET, FENIX_METRICS_TOKEN, REDIS_PASSWORD,
and GRAFANA_ADMIN_PASSWORD.
cp .env.example .env
chmod 600 .env
# Edit .env with real secrets before live/testnet use.
# API + Redis only
docker compose up -d --build
# API + Redis + Prometheus + Grafana
docker compose --profile monitoring up -d --buildDefault local endpoints:
- API:
http://127.0.0.1:8001 - Prometheus, with monitoring profile:
http://127.0.0.1:9090 - Grafana, with monitoring profile:
http://127.0.0.1:3001
Redis is intentionally not published to the host by default; the API reaches it on the internal Compose network.
ALLOW_EXPOSE_API(default: false) — Set totrueexplicitly to bind to0.0.0.0(external exposure). Only enable if intentionally exposing.FENIX_REQUIRE_SHARED_LOGIN_RATE_LIMIT— Require the Redis-backed login limiter. It defaults to enabled wheneverALLOW_EXPOSE_API=true; externally reachable and multi-worker deployments must provide a workingREDIS_URL.FENIX_API_ALLOW_LIVE(default: false) — Separate deployment capability required before the API may start a non-paper engine.CREATE_DEMO_USERS(default: false) — Only enable in local dev/testing to auto-create demo accounts.DEFAULT_ADMIN_PASSWORD/DEFAULT_DEMO_PASSWORD— Required, independently chosen values of at least 16 characters when demo users are explicitly enabled.FENIX_MASTER_PASSWORD— Required for encrypted settings/vault persistence; use at least 16 characters and never reuse the JWT secret.FENIX_MODEL_SIGNING_KEY_FILE— Optional private key path used to authenticate mutable pickle/joblib model artifacts. The generated key and signatures must remain local.FENIX_HF_LOG_RESPONSES,FENIX_HF_LOG_CONTENT, andFENIX_DEBUG_VISUAL_RAW— Keep disabled except during short, controlled diagnostics because provider content can be sensitive.OPENAI_API_KEY,GROQ_API_KEY,BINANCE_API_KEY,BINANCE_API_SECRET, etc — set these in.envfor runtime but keep them private and do not commit.
- Never commit
.env, browser storage-state/cookie files, signing keys, or local venvs. - Run
chmod 600 .envandchmod 600 tradingview_session_state.jsonwhen that browser state is used. Fenix refuses permissive credential files. - Leave API docs, public binding, unauthenticated loopback control, and raw provider logging disabled outside isolated development.
- Use
scripts/release_cleanup.shbefore creating a release. - Add
pre-commitanddetect-secretsin your local environment.
- Use prettier and eslint for frontend. Use black/isort for Python code.
- Pre-commit hooks are configured in
.pre-commit-config.yaml(detect-secrets, black, flake8).
- Run unit tests:
pytestat repo root - Integration tests in
tests/and end-to-end tests are also available.
- Create a new branch from the base branch
- Add tests for new logic
- Run pre-commit and linters locally
- Make a PR targeting the main branch for review
- Use
scripts/release_cleanup.shandRELEASE_CHECKLIST.mdto ensure security and compliance.
- If the server binds publicly when you don't expect it, check
ALLOW_EXPOSE_API. - If authentication returns 503 in an exposed deployment, verify the private Redis connection used by the shared login limiter.
- If the demo accounts exist unexpectedly, check
CREATE_DEMO_USERSandDEFAULT_DEMO_PASSWORD.