authkits

Search Authkits

Search pages, documentation, and resources.

Deployment

Production Deployment

Deploy Authkits safely with production-ready database, Redis, and security settings.

Run migrations
Configure environment variables
Enable secure cookies
Use PostgreSQL in production
Use Redis for rate limits
Set trusted domains

Environment Variables

Store production secrets outside your codebase.

.env
.env
1
2
3
4
5
6
7
8
9
10
11
12
AUTHKITS_SECRET_KEY="change-me"
AUTHKITS_ALLOWED_HOSTS="example.com,www.example.com"
AUTHKITS_SECURE_COOKIES=True

Database and Redis

PostgreSQL is recommended for production. Redis can power rate limits, lockouts, and temporary verification codes.

settings.py
settings.py
1
2
3
4
5
6
7
8
9
10
11
12
AUTHKITS = {
    "database": "postgresql",
    "cache": {
        "backend": "redis",
        "url": env("REDIS_URL"),
    }
}

Run Migrations

Apply database migrations before starting your production server.

terminal
terminal
1
2
3
4
5
6
7
8
9
10
11
12
python manage.py migrate
python manage.py collectstatic --noinput

Production Settings

Enable stricter security behavior before going live.

settings.py
settings.py
1
2
3
4
5
6
7
8
9
10
11
12
AUTHKITS = {
    "security": {
        "secure_cookies": True,
        "admin_2fa": True,
        "audit_logs": True,
        "rate_limits": True,
    }
}

You're ready

Authkits is configured, protected, and ready for production.

Back to Docs