safia logs command. Running safia logs 50 prints the last 50 lines from the bot daemon and usually surfaces the exact error message you need. If the logs don’t point to an obvious cause, work through the relevant section below — each entry describes the symptom, explains what’s likely wrong, and walks you through the fix.
Bot Issues
Bot is not responding to messages
Bot is not responding to messages
- The SAFIA daemon is not running
- Redis is not running (SAFIA cannot start without it)
- The bot token is invalid or has been revoked
Verify Redis is running
PONG. If the command fails, start Redis using the method appropriate for your OS:net start Memurai in an elevated PowerShell window.Check your bot token
.env file and confirm TELEGRAM_BOT_TOKEN is set to the token from @BotFather. Tokens look like 123456789:ABCdefGhIJKlmNoPQRsTUVwxyZ. If you regenerated the token in BotFather, update .env and restart:Redis connection errors in the logs
Redis connection errors in the logs
localhost:6379.Likely cause: Redis is not running, or the REDIS_URL in your .env points to the wrong host or port.Steps to fix:Confirm Redis is running
PONG. If the command fails, start Redis using the method appropriate for your OS (see the previous entry).Check REDIS_URL in your .env
redis://localhost:6379/0. If you changed the port or are connecting to a remote Redis instance, update this value:REDIS_URL to match your actual Redis address.docker run -d -p 6379:6379 --name safia-redis redis:7-alpine) before starting SAFIA.'User not authorized' — access denied message
'User not authorized' — access denied message
LLM API errors — bot replies with an error or stays silent
LLM API errors — bot replies with an error or stays silent
LLM_API_KEYis missing, wrong, or has been revokedLLM_PROVIDERdoes not match the key you suppliedLLM_MODELis set to a model name your provider does not recognize
Verify your provider and key
LLM_PROVIDER is one of lunos, groq, openai, or custom, and that LLM_API_KEY is the correct key for that provider.Check the model name
llama-3.3-70b-versatile, while OpenAI uses gpt-4o. Refer to your provider’s documentation and update LLM_MODEL accordingly.Check the logs
Slow startup — bot takes a long time to become available
Slow startup — bot takes a long time to become available
safia start, the bot is unresponsive for a minute or two before beginning to work normally.Likely cause: This is expected behaviour on the first run. SAFIA downloads the local embedding model (~120 MB) before it can process messages. Subsequent startups use the cached model and are much faster.What to do:Reminders are not being sent
Reminders are not being sent
REMINDER_ENABLED is not set to true in your .env file.Steps to fix:REMINDER_MAX_PER_USER and REMINDER_MAX_SENDS_PER_DAY in .env.Voice & Photos
Voice messages are not being transcribed
Voice messages are not being transcribed
GROQ_API_KEY — even if you are using a different provider (Lunos, OpenAI, etc.) for chat.Steps to fix:Get a Groq API key
Photos of receipts are not being processed
Photos of receipts are not being processed
LLM_API_KEYis missing — without a valid API key, photo scanning is disabled entirely- The image is too blurry, dark, or cropped to extract text reliably
VISION_MODELis set to a model that doesn’t support vision inputs
Confirm LLM_API_KEY is set
LLM_API_KEY must be present and valid. If it’s empty, photo scanning will always report that it’s not enabled.Check VISION_MODEL
mistralai/mistral-small-3.2-24b-instruct. If you’ve changed VISION_MODEL to a text-only model, vision extraction will fail. Reset it or choose a model your provider confirms supports image input.Improve photo quality
Admin Dashboard
Admin dashboard is not accessible at http://127.0.0.1:5454
Admin dashboard is not accessible at http://127.0.0.1:5454
http://127.0.0.1:5454.Likely causes:- The admin dashboard daemon is not running
- Another process is already using port 5454
- You are trying to access it from a remote machine (the dashboard only binds to localhost)
Check whether the port is in use
Confirm you're accessing it from the same machine
127.0.0.1 and is only reachable from the machine running SAFIA. If you need remote access, set up an SSH tunnel:http://127.0.0.1:5454 in your local browser.Admin dashboard login is not working
Admin dashboard login is not working
ADMIN_USERNAME, ADMIN_PASSWORD, or FLASK_SECRET_KEY is not set in .env, or the values don’t match what you’re entering.Steps to fix:Check your .env credentials
ADMIN_USERNAME and ADMIN_PASSWORD are both set to non-empty values. If they are blank, the dashboard may not enforce authentication correctly.Set a Flask secret key
FLASK_SECRET_KEY can break session handling. Add a long random string to your .env:Rate Limits
'Rate limit exceeded' — reached the daily message cap
'Rate limit exceeded' — reached the daily message cap
- Wait until UTC midnight — the counter resets automatically and you can send messages again.
- Increase the limit — if you host SAFIA yourself and want a higher cap, update
DAILY_MESSAGE_LIMITin your.env:Then restart: - Reset manually — an admin can clear the rate-limit counter for a specific user from the Redis CLI: