This guide covers all authentication and login security features in Panelica --- setting up 2FA, managing sessions, password security, API keys, and High Security Mode.
Panelica supports Time-based One-Time Password (TOTP) two-factor authentication, compatible with Google Authenticator, Authy, Microsoft Authenticator, and any TOTP app.
Why Enable 2FA?
Even if your password is compromised, an attacker cannot log in without the 6-digit code from your authenticator app. 2FA is strongly recommended for all users, especially ROOT accounts.
---
Step 1: Go to your Profile (click your avatar in the top right) > Settings.
Step 2: In the Security tab, find the Two-Factor Authentication section and click Enable 2FA.
Step 3: A modal opens with a QR code. Scan it with your authenticator app:
- The QR code is generated locally by the server (no Google dependency)
- A manual entry code is shown below the QR code if you can't scan
- The QR code is 256x256 pixels with a white background for easy scanning
Step 4: Enter the 6-digit code from your authenticator app in the verification field.
Step 5: Click Enable. If the code is correct, 2FA is activated.
Step 6: Save your backup codes! A modal appears with 10 one-time backup codes:
- Each code can only be used once
- Store them in a secure location (password manager, printed paper in a safe)
- Click Copy All Codes to copy them to clipboard
- If you lose your authenticator and backup codes, you'll be locked out
---
When 2FA is enabled, the login flow becomes:
- Enter your username and password on the login page
- If credentials are valid, a 2FA verification page appears
- Enter the 6-digit code from your authenticator app
- Alternatively, click Use Backup Code to enter one of your backup codes
- If the code is valid, you're logged in
Important notes:
- Codes refresh every 30 seconds
- There's a small time window tolerance (the previous and next codes are also accepted)
- After too many failed attempts, you'll be temporarily locked out
- Backup codes are one-time use --- once used, that code is consumed
---
Step 1: Go to Profile > Settings > Security tab.
Step 2: Click Disable 2FA.
Step 3: Enter your current 2FA code to confirm.
Step 4: 2FA is removed from your account.
---
Changing Your Password:
- Go to Profile > Settings > Security tab
- Click Change Password
- Enter your current password
- Enter and confirm your new password
- A password strength indicator shows weak/medium/strong
- Click Update
Password Requirements:
- Minimum length enforced by your plan's security policy
- Strength meter evaluates complexity
- Common passwords are rejected
- Passwords are hashed with bcrypt (never stored in plain text)
---
Go to Profile > Settings > Sessions tab.
This tab shows all your active sessions across devices:
Each session shows:
- Device --- Browser name and operating system
- Location --- City/country based on IP (GeoIP)
- IP Address --- The connecting IP
- Last Active --- When the session was last used
- Current --- A green badge on your current session
Revoking a Session:
- Click Revoke on any session (except your current one)
- A confirmation modal shows the device, location, and IP
- Click Confirm Revoke
- That session is immediately terminated --- the user on that device is logged out
Security Tip: Review your sessions regularly. If you see an unfamiliar device, location, or IP, revoke it immediately and change your password.
---
Go to Profile > Settings > API Keys tab.
API keys allow programmatic access to Panelica's API without using your password.
Creating an API Key:
- Click Create API Key
- Enter a name for the key (e.g., "Monitoring Script")
- Select permissions:
domains:read--- Read domain informationdomains:write--- Modify domainsusers:read--- Read user informationusers:write--- Modify users
- Set expiry: Never, 30 days, 60 days, or 90 days
- Click Create
- Copy the generated key immediately --- it won't be shown again
Managing API Keys:
- View all your active API keys
- See last used date and expiry
- Delete keys that are no longer needed
---
High Security Mode adds an extra layer of protection for ROOT users. When enabled, certain sensitive pages require 2FA verification within the current session.
How it works:
- ROOT must have 2FA enabled first
- When accessing a protected page, a 2FA prompt appears
- After verification, the session is marked as "high security verified"
- Protected pages include: User management, Panel settings, System configuration
Protected Page Actions:
- Pages can be set to "read-only" without 2FA (view but can't modify)
- Or "blocked" without 2FA (can't even view)
- Configuration is per-page and per-role
---
JWT Authentication:
- Access tokens expire after 15 minutes
- Refresh tokens last 7 days (stored as httpOnly cookies)
- Tokens auto-refresh 5 minutes before expiry
- Refresh tokens are rotated on each use (old token invalidated)
Rate Limiting:
- Failed login attempts are rate-limited
- After too many failures, the IP is temporarily blocked
- Fail2ban integration automatically bans brute-force attackers
Session Security:
- Sessions track: IP address, user agent, GeoIP location
- Multiple simultaneous sessions are allowed
- Sessions can be revoked individually
- All sessions are revoked on password change
Impersonation (Admin Feature):
- ROOT/ADMIN can "impersonate" a user to see the panel from their perspective
- An orange banner shows "Impersonating: username" at the top
- Click "End Impersonation" to return to your account
- All actions during impersonation are logged in the audit trail
---
Problem: 2FA code not accepted
- Check that your device's clock is accurate (TOTP is time-based)
- Make sure you're entering the code for the correct account
- Try the next code that appears (codes change every 30 seconds)
- Use a backup code if available
Problem: Locked out of account with 2FA
- Use a backup code to log in
- If you don't have backup codes, contact your server administrator
- ROOT users: The server admin can disable 2FA via the CLI
Problem: QR code won't scan
- Increase screen brightness
- Try the manual entry code shown below the QR code
- Make sure your authenticator app supports TOTP (most do)
Problem: Session showing unfamiliar location
- GeoIP data may be inaccurate (VPN, mobile networks)
- If genuinely suspicious: revoke the session, change password, enable 2FA
- Check IP Blocking > Failed Attempts for related activity
---
- Enable 2FA on all accounts --- Especially ROOT and ADMIN
- Save backup codes securely --- Print them or store in a password manager
- Use strong, unique passwords --- Don't reuse passwords from other services
- Review sessions weekly --- Revoke any you don't recognize
- Set API key expiry --- Don't create keys that never expire unless necessary
- Enable High Security Mode --- Extra protection for ROOT operations
- Keep your authenticator app backed up --- Export accounts or use cloud sync