Environment Variables Reference
Authentication & Security
| Variable |
Required |
Default |
Description |
STORAGE_SECRET |
Yes |
- |
NiceGUI session encryption key |
ACCESSMAN_PASSWORD_HASH |
Yes |
- |
PBKDF2 password hash for login |
ACCESSMAN_API_AUTH_REQUIRED |
No |
1 |
Enable API authentication (0 = disabled) |
ACCESSMAN_API_KEY |
No |
- |
API key for authentication |
ACCESSMAN_UNPROTECTED |
No |
0 |
Danger: Disable auth for dev (1 = yes) |
Database & Storage
| Variable |
Required |
Default |
Description |
ACCESSMAN_DB_PATH |
No |
User data dir |
SQLite database path |
ACCESSMAN_BACKUP_DIR |
No |
backups/ |
Backup directory |
ACCESSMAN_BACKUP_RETENTION |
No |
30 |
Backup retention count |
Logging
| Variable |
Required |
Default |
Description |
ACCESSMAN_LOG_LEVEL |
No |
INFO |
Log level (DEBUG, INFO, WARNING, ERROR) |
Generating Secrets
Storage Secret
python -c "import secrets; print(secrets.token_urlsafe(32))"
Password Hash (PBKDF2)
python -c "
import hashlib, os, base64
salt = os.urandom(16)
dk = hashlib.pbkdf2_hmac('sha256', b'your_password', salt, 260000)
print(base64.b64encode(salt + dk).decode())
"
API Key
python -c "import secrets; print(secrets.token_urlsafe(64))"