Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/dataease/SQLBot/llms.txt

Use this file to discover all available pages before exploring further.

The System Settings area is the central control plane for a SQLBot deployment. It is only accessible to the global admin account. From here you configure the AI models that power SQL generation, manage workspaces and users, tune global parameters, and review the audit log. This page gives you an overview of what is available and where to find it.
All sections described on this page require the global admin account (admin). Workspace admins and regular members cannot access System Settings.

Sections at a glance

AI Models

Add and manage the LLM providers that SQLBot uses for natural-language-to-SQL conversion. At least one model must be configured and set as the default before any queries can run.

Users

Create accounts, reset passwords, activate or deactivate users, and assign them to workspaces. Batch import from Excel is also available here.

Workspaces

Create and rename workspaces that isolate datasources and conversations from one another. Manage workspace membership and roles.

Permissions

Understand the three-tier role model: global admin, workspace admin, and regular member, and how workspace isolation is enforced.

Global parameters

Navigate to System Settings → Parameters to view and edit global configuration values. Parameters are grouped into categories. Changes take effect immediately without restarting the server.
Controls authentication behaviour, such as session duration and login restrictions. These settings are also exposed publicly so the login page can adapt its UI without an authenticated session.
Controls how the query engine behaves during conversation. For example, the number of prior conversation rounds included in each prompt (GENERATE_SQL_QUERY_HISTORY_ROUND_COUNT, default 3) and whether a row-count limit is enforced on query results (GENERATE_SQL_QUERY_LIMIT_ENABLED, default true).
Parameters are saved immediately when you click Save. You do not need to restart the backend for changes to take effect.

Audit log

SQLBot records every significant operation in a structured audit log stored in the sys_logs table. Navigate to System Settings → Audit Log to view and filter log entries. Each log entry captures:
FieldDescription
Operation typeThe action performed: create, delete, update, reset_pwd, login, export, and others.
ModuleThe resource category: user, workspace, ai_model, datasource, chat, member, and more.
UserThe account that performed the action.
WorkspaceThe workspace context in which the action occurred.
StatusWhether the operation succeeded or failed.
IP addressThe client IP address at the time of the request.
Execution timeHow long the operation took in milliseconds.
TimestampWhen the operation occurred.
The audit log covers all administrative actions (user creation, password resets, model changes) as well as user activity (chat queries, datasource access, login events). Only the global admin can view the full log.

Interface language

Each user sets their own language preference from their profile page. The platform supports four locales:
CodeLanguage
zh-CNSimplified Chinese (default for new accounts)
zh-TWTraditional Chinese
enEnglish
ko-KRKorean
Language validation is enforced both client-side and server-side. Requests with unsupported locale codes are rejected.

API keys

Users can generate API keys to access SQLBot programmatically. Navigate to System Settings → API Keys to view all active keys across the platform. As an admin, you can disable any key. Each key pair consists of an Access Key (public identifier) and a Secret Key (credential). Keys can be activated or deactivated at any time without deleting them.

Production deployment checklist

Before going live, review the following hardening steps.
1

Change the default admin password

The admin account is created with the default password defined by DEFAULT_PWD (default: SQLBot@123456). Change it immediately after first login.Passwords must be 8–20 characters and include at least one uppercase letter, one lowercase letter, one digit, and one special character (~!@#$%^&*()_+-={}|:"<>? etc).
2

Set a strong SECRET_KEY

The SECRET_KEY environment variable signs all JWT access tokens. The default value is randomly generated at startup, which means tokens are invalidated on every restart. Set a stable, high-entropy value in your .env file:
# Generate a secure key
python -c "import secrets; print(secrets.token_urlsafe(32))"
Then add it to your environment:
SECRET_KEY=your-generated-key-here
3

Configure CORS origins

Set BACKEND_CORS_ORIGINS to the exact origin(s) your frontend is served from. The FRONTEND_HOST variable also adds a permitted origin:
FRONTEND_HOST=https://sqlbot.example.com
BACKEND_CORS_ORIGINS=["https://sqlbot.example.com"]
4

Configure the database connection

By default SQLBot connects to a local PostgreSQL instance. Set SQLBOT_DB_URL for a custom connection string, or set the individual POSTGRES_* variables:
POSTGRES_SERVER=db.example.com
POSTGRES_PORT=5432
POSTGRES_USER=sqlbot
POSTGRES_PASSWORD=strong-password-here
POSTGRES_DB=sqlbot
5

Set up Redis for caching (recommended)

By default SQLBot uses in-memory caching (CACHE_TYPE=memory), which does not persist across restarts and does not scale across multiple instances. For production, configure Redis:
CACHE_TYPE=redis
CACHE_REDIS_URL=redis://:password@redis.example.com:6379/0
6

Add at least one LLM model

Users cannot run any queries until a default AI model is configured. Go to System Settings → AI Models → Add and connect your preferred provider before sharing access with users. See the LLM Models page for full setup instructions.
Running SQLBot with the default SECRET_KEY, DEFAULT_PWD, and database password in a production environment is a serious security risk. Complete the checklist above before exposing the platform to users.

Build docs developers (and LLMs) love