🚧 FastCMS is under active development — not ready for production use. APIs and features may change without notice.
FastCMS
Infrastructure

System Settings

Database-backed configuration for authentication, SMTP, file storage, rate limiting, and more — manageable via Admin UI or API.

System Settings

FastCMS includes a comprehensive settings system for storing application configuration values in the database. Settings can be managed via the Admin UI or API.

localhost:8000/admin/files

Files

Manage uploaded files and media

Total: 384 files
Page 1 of 16

hero-banner.png

142 KB

product-shot.jpg

88 KB

PDF

report-q1.pdf

2.1 MB

thumbnail.webp

34 KB

CSV

data-export.csv

512 KB

SVG

logo-dark.svg

8 KB

bg-pattern.png

67 KB

user-avatar.jpg

22 KB

TXT

readme.txt

4 KB

video-thumb.jpg

56 KB

JSON

schema.json

18 KB

banner-mobile.png

95 KB

Admin UI

Navigate to Admin > Settings to access the settings interface with four tabs:

Authentication Tab

Configure how users authenticate:

  • Authentication methods (password, OAuth, OTP, MFA)
  • OAuth behavior (auto-create users, link by email, require verification)
  • Password requirements (minimum length, complexity)
  • Token settings (access and refresh token expiry)

OAuth Providers Tab

Manage OAuth providers for social login:

  • View configured providers with status
  • Add new providers (29 supported)
  • Edit provider credentials
  • Enable/disable and reorder providers

Mail Tab

Configure SMTP for sending emails:

  • SMTP host, port, username, password
  • From email address and display name

Storage Tab

Configure file storage:

  • Storage type (Local, S3, or Azure Blob Storage)
  • Maximum file size
  • S3 and Azure credentials

Setting Categories

CategoryDescription
appGeneral application settings
authAuthentication and security
mailEmail/SMTP configuration
storageFile storage configuration
backupBackup settings
logsRequest logging settings

Default Settings Reference

App

KeyDefaultDescription
app_name"FastCMS"Application name
app_url"http://localhost:8000"Application URL
rate_limit_per_minute100Rate limit per minute
rate_limit_per_hour1000Rate limit per hour

Auth

KeyDefaultDescription
password_auth_enabledtrueEnable password authentication
oauth_enabledtrueEnable OAuth2
oauth_auto_create_usertrueAuto-create on OAuth login
password_min_length8Minimum password length
password_require_upperfalseRequire uppercase letter
password_require_numberfalseRequire number
password_require_specialfalseRequire special character
token_expiry_hours24Access token expiry
refresh_token_expiry_days7Refresh token expiry
verification_requiredfalseRequire email verification

Mail

KeyDefaultDescription
smtp_host""SMTP server host
smtp_port587SMTP server port
smtp_user""SMTP username
smtp_password""SMTP password
from_email"noreply@fastcms.dev"From email address
from_name"FastCMS"From display name

Storage

KeyDefaultDescription
type"local"Storage type (local/s3/azure)
max_file_size10485760Max file size (10 MB)
s3_bucket""S3 bucket name
s3_region""S3 region (e.g., us-east-1)
azure_container""Azure container name
azure_connection_string""Azure connection string

Backup

KeyDefaultDescription
enabledtrueEnable automated backups
cron_schedule"0 2 * * *"Cron schedule (2 AM daily)
retention_days30Keep backups for N days
s3_enabledfalseUpload to S3

Settings API

Get All Settings

GET /api/v1/settings
Authorization: Bearer ADMIN_TOKEN

Get Settings by Category

curl "http://localhost:8000/api/v1/settings/auth" \
  -H "Authorization: Bearer ADMIN_TOKEN"
{
  "password_auth_enabled": {
    "value": true,
    "description": "Enable password authentication"
  },
  "password_min_length": {
    "value": 8,
    "description": "Minimum password length"
  }
}

Update a Setting

POST /api/v1/settings
Authorization: Bearer ADMIN_TOKEN
Content-Type: application/json

{
  "key": "password_min_length",
  "value": 12,
  "category": "auth",
  "description": "Minimum password length"
}

Delete a Setting

DELETE /api/v1/settings/{key}
Authorization: Bearer ADMIN_TOKEN

Programmatic Access

from app.services.settings_service import SettingsService

async def example(db):
    settings = SettingsService(db)

    # Get a setting with default
    min_length = await settings.get("password_min_length", default=8)

    # Set a setting
    await settings.set(
        key="maintenance_mode",
        value=True,
        category="app",
        description="Enable maintenance mode"
    )

    # Get all settings in a category
    auth_settings = await settings.get_category("auth")

Common Recipes

Enable Strict Password Policy

curl -X POST "http://localhost:8000/api/v1/settings" \
  -H "Authorization: Bearer ADMIN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"key": "password_min_length", "value": 12, "category": "auth"}'

curl -X POST "http://localhost:8000/api/v1/settings" \
  -H "Authorization: Bearer ADMIN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"key": "password_require_upper", "value": true, "category": "auth"}'

Enable Maintenance Mode

{
  "key": "maintenance_mode",
  "value": true,
  "category": "app",
  "description": "Site is under maintenance"
}

Configure Rate Limiting

{
  "key": "rate_limit_per_minute",
  "value": 60,
  "category": "app"
}

Best Practices

  1. Use Categories — Organize related settings together
  2. Add Descriptions — Always include helpful descriptions for future reference
  3. Set Defaults — Define sensible defaults in code, override via settings
  4. Use Admin UI — Prefer the Admin UI for interactive configuration
  5. Backup Settings — Settings are included in database backups automatically

On this page