Skip to main content
Freesona runs wherever Python runs. You can spin it up on your own machine in minutes with the included setup scripts, containerize it with the provided Dockerfile, or push it to a managed platform like Railway or Render. Pick the approach that matches your infrastructure — the bot behaves identically across all of them.
Use the included setup scripts for a guided local setup. The scripts handle everything from .env creation to launching the bot.Linux / macOS
bash scripts/setup_local.sh
Windows
scripts\setup_local.cmd
What the scripts do:
  1. Create .env from .env.sample on first run — open it and fill in your real Discord IDs and provider keys before continuing.
  2. Validate BOT_TOKEN, CHANNEL_ID, AI_PROVIDER, and the matching provider API key (e.g., GOOGLE_API_KEY for Gemini, OPENAI_API_KEY for OpenAI).
  3. Create a .venv virtual environment and install dependencies from requirements.txt.
  4. Run scripts/check_project.py to verify syntax and config.
  5. Launch the bot with python main.py.
If you already have a configured .env and just want to start the bot manually, run:
python main.py
The local setup scripts are for manual hosting only — do not use them for Docker or cloud platforms. On Docker, Railway, and Render, the platform owns the bootstrap process.

Persistence

Freesona uses a small set of files to store all runtime state. Keep these files on a persistent volume in any cloud environment:
FileContents
config.jsonPrefix, channel IDs, autonomy settings, module enabled/disabled states
persona.jsonActive persona fields (core, background, beliefs, style, instructions)
personas.jsonSaved persona presets
memory.dbLong-term user facts, keyed by guild_id + user_id
warnings.dbModeration warnings with per-guild hex IDs and timestamps
anniversaries.dbUser-claimed anniversary entries
.chroma/ChromaDB vector store for knowledge base retrieval (optional)
On a local setup these files live in the project folder. On Docker, Railway, or Render, point all *_FILE_PATH environment variables at your /data/ mount to ensure they survive restarts and redeployments.