{% extends "base.html" %} {% block title %}Settings - AISBF Dashboard{% endblock %} {% block content %}

Server Settings

{% if success %}
{{ success }}
{% endif %} {% if error %}
{{ error }}
{% endif %} {% if warning == 'default_password' %}
Security Warning: Default password in use.
You are logged in with the factory-default admin / admin credentials. Please change your password immediately using the Admin tab below before using AISBF.
{% endif %}
Server
Auth & MCP
Models
Database
Cache
Classification
TOR
Signup
OAuth2
SMTP
Batching
Rate Limiting
Admin
Server Configuration
If specified, Let's Encrypt will be used to generate valid SSL certificates. Leave empty to use self-signed certificates.
Path to SSL certificate file. Leave empty to use default (~/.aisbf/cert.pem). Auto-generated using Let's Encrypt if public domain is set, otherwise self-signed.
Path to SSL private key file. Leave empty to use default (~/.aisbf/key.pem). Auto-generated with certificate.
Authentication
MCP Server
Model Context Protocol server for remote agent configuration
Tokens that give access to autoselection and autorotation settings + standard APIs
Tokens that give access to full system configuration + standard APIs
Internal Models
Used when condensation model is set to "internal"
Max tokens the condensation model can generate per summary (default 1000).
Used when autoselect selection_model is set to "internal"
Max tokens of conversation context sent to the internal autoselect model (default 8000). Ignored when selection_model is a rotation or provider/model.
Model used for NSFW content detection
Model used for privacy-sensitive information detection
Model used for semantic embedding and vectorization
Removes all locally cached model files and unloads them from memory. Models will be re-downloaded from HuggingFace on next use.
Database Configuration
Choose the database backend (SQLite is recommended for most users)
Path to SQLite database file (supports ~ expansion)
MySQL server hostname or IP address
MySQL server port (default: 3306)
MySQL database username
MySQL database password
MySQL database name
Cache Configuration
Choose the cache backend for model embeddings and other cached data (SQLite recommended for most users)
Path to SQLite cache database file (supports ~ expansion)
MySQL server hostname or IP address
MySQL server port (default: 3306)
MySQL database username
MySQL database password
MySQL database name for cache
Redis server hostname or IP address
Redis server port (default: 6379)
Redis database number (default: 0)
Redis password (optional)
Prefix for Redis keys (default: aisbf:)

Response Cache Configuration

Cache API responses to improve performance and reduce costs
Choose the backend for response caching
Time to live for cached responses (default: 600 seconds)
Maximum number of items in memory cache (default: 1000)

Response Cache

Status: Loading...
Content Classification
Enable automatic NSFW content detection for model selection
Enable automatic privacy-sensitive content detection for model selection
Enable semantic content classification using the configured model
TOR Hidden Service
Status: Loading...
Expose AISBF over TOR network as a hidden service

⚙️ Required torrc Configuration

Before enabling Tor, you must configure your torrc file (usually /etc/tor/torrc):

Step 1: Generate Password Hash
tor --hash-password "your_secure_password"
Step 2: Add to torrc
Step 3: Restart Tor
sudo systemctl restart tor  # Linux
brew services restart tor   # macOS
TOR control port host (default: 127.0.0.1)
TOR control port (default: 9051) - must match ControlPort in torrc
The password you used with tor --hash-password (NOT the hash itself)
Ephemeral: Leave blank for temporary service (new address each restart)
Persistent: Enter full absolute path (e.g., /home/username/.aisbf/tor_hidden_service) - must match HiddenServiceDir in torrc
⚠️ Note: torrc does NOT expand ~ - use full paths like /home/username instead
Port exposed on the onion address (default: 80) - must match HiddenServicePort in torrc for persistent services
TOR SOCKS proxy host (default: 127.0.0.1)
TOR SOCKS proxy port (default: 9050)
User Signup
Allow users to create accounts via signup form
Users must verify their email before they can login
How long verification links remain valid (1-168 hours)
OAuth2 Authentication
Google OAuth2

GitHub OAuth2

SMTP Email Configuration
Enable email sending functionality for password resets, account verification, and notifications
SMTP server hostname (e.g., smtp.gmail.com)
SMTP server port (587 for TLS, 465 for SSL, 25 for no encryption)
SMTP authentication username (leave blank if not required)
SMTP authentication password
Use STARTTLS for secure connection (recommended for port 587)
Use SSL/TLS from the start (for port 465)
Email address to send from
Display name for sent emails
Request Batching
Batch multiple requests together for improved efficiency
Time window to collect requests for batching (default: 100ms)
Maximum number of requests per batch (default: 8)

Provider-Specific Batching Settings

Client Rate Limiting

Protect the server against request flooding. Limits are applied per authenticated token (API/MCP) or per IP address (all other routes). Set a value to 0 to disable that specific threshold.

Rate-limit inbound clients before processing auth or routing
API & MCP Calls
0 = unlimited
0 = unlimited
General (Dashboard & Other)
0 = unlimited
0 = unlimited

Adaptive Rate Limiting

Outbound adaptive rate limiting — automatically adjusts how fast requests are forwarded to upstream providers based on their responses.

Automatically adjust rate limits based on provider responses
Starting rate limit (0 = unlimited)
How quickly to adapt to rate limit changes (0-1, default: 0.1)
Safety margin below detected limit (default: 10%)
Rate at which limits recover after errors (default: 0.05)
Maximum allowed rate limit (default: 60)
Minimum allowed rate limit (default: 0.1)
Exponential backoff multiplier (default: 2)
Random jitter to prevent thundering herd (0-1, default: 0.25)
Time window for tracking rate limit history (default: 3600)
Number of successful requests before increasing rate limit (default: 10)
Admin Account & Notifications
Email address to receive admin notifications. Requires SMTP to be configured and enabled.
Admin Email Notifications
Select which events trigger an email to the admin. SMTP must be enabled and an admin email must be set above. {% set notif = config.dashboard.notifications if config.dashboard and config.dashboard.notifications else {} %}
Cancel
{% endblock %}