Every account can protect its own sign-in with an authenticator app or passkeys, see where it is signed in and limit where it may be used from. Administrators set the panel-wide rules under System › Settings and System › Settings › Sign-in, and see every attempt under System › Sign-in log.
Two-factor authentication and passkeys#
Each account sets these up under Settings › Security (the password is asked again):
- Two-factor authentication: press Enable 2FA, scan the QR code (or enter the code manually) in an authenticator app, and confirm with a code. Keep the recovery codes: View recovery codes shows them and Regenerate codes replaces them. Each recovery code works once.
- Passkeys: press Add passkey, give it a name and press Register passkey. A passkey signs in without a password and counts as a second factor. Remove passkey deletes one.
The account is mailed when two-factor is turned on or off, recovery codes are regenerated, or a passkey is added or removed.
Requiring two-factor#
- Go to System › Settings (the General tab).
- Under Require two-factor authentication for, tick Administrators, Resellers and/or Users. Each line says how many accounts do not have it yet.
- Press Save settings.
An account of a ticked level that has neither an authenticator app nor a passkey is sent to its security settings at its next click and reaches nothing else (except signing out) until it sets one up. If you tick Administrators while your own account has no second factor, you are sent there right after saving.
Billing-system sign-in links still ask for the second factor: an authenticator code, or the passkey for a passkey-only account.
Failed sign-ins and bans#
Set under System › Settings › Sign-in, section Failed sign-ins:
| Setting | Default | Range |
|---|---|---|
| Failures an account may have | 5 | 3 to 100 |
| Failures an address may have | 20 | 5 to 1000 |
| Within (minutes) | 15 | 1 to 1440 |
| Ban an account for (minutes) | 15 | 1 to 1440 |
| Ban an address for (minutes) | 15 | 1 to 1440 |
- A wrong password or wrong two-factor code counts, both for the address it came from and for the account typed. A refused captcha, a refused address or an attempt during a ban is logged but not counted.
- Past either limit, sign-ins of that account, or from that address, are refused for the ban time with "Too many failed sign-ins. Try again in N minutes." The same sentence is shown whatever address was typed, so it never reveals which accounts exist.
- An IPv6 address is counted and banned by its /64.
- An account's ban does not hold for an address the account signed in from in the last 30 days (the address ban still does).
- A passkey and a billing system's sign-in link still work during an account's ban, but not during an address ban.
- A password set through a mailed reset link ends the account's ban.
Bans and allowed addresses need each visitor's real address. Behind a tunnel or reverse proxy on the panel's machine (cloudflared, nginx), the proxy must send X-Forwarded-For; the panel trusts it from the loopback only, and never bans the loopback.
Lifting a ban#
Go to System › Sign-in log. Bans in force lists every banned address and account; press Lift and confirm. Sign-ins are accepted again at once and failures are counted from zero.
Captcha#
Cloudflare Turnstile, off by default. In System › Settings › Sign-in › Captcha:
- Tick Ask a captcha on the sign-in page after failed sign-ins.
- Set After this many failures (default 3; 0 asks it always).
- Paste the Turnstile widget's Site key and Secret key. The secret is stored encrypted and never shown again.
- Press Save.
If Cloudflare cannot be reached, sign-ins go on without the captcha. A banned account is asked the captcha whenever the keys are set, even with the captcha switched off.
Allowed addresses#
Lists of addresses and networks (CIDR, IPv4 and IPv6, up to 50 entries each). Empty means anywhere.
| List | Where | Applies to |
|---|---|---|
| Panel and API for administrators | System › Settings › Sign-in › Allowed addresses for administrators | every administrator's sign-ins and API keys |
| An account's own Panel and API lists | the account's Settings › Sign-ins, or Sign-ins and sessions on its page (administrators and its reseller) | that account's passwords, passkeys, sign-in links and API keys |
When both lists apply, both must match. API keys can also have addresses of their own, checked as well.
A list that would sign out the person saving it is refused, with their current address shown ("Your address (203.0.113.5) is not in this list. Add it, or you would be signed out at once."). A manager changing another account's list is not held to this.
Sessions and timeouts#
In System › Settings › Sign-in › Sessions:
- Sign out after (minutes without activity): at least 5, empty for none. A page that refreshes itself is not activity.
- Sign out after (hours since signing in): 1 to 720, empty for none.
- One session at a time: Off, For administrators, or For every account. Signing in ends the account's other sessions.
While either timeout is set, the sign-in page offers no "Remember me" and older remember-me cookies no longer sign in. A staff role can set a shorter idle timeout and one session at a time for its holders.
Open sessions#
- Each account sees its open sessions and recent sign-ins under Settings › Sign-ins, with Sign out per session and Sign out all other sessions.
- On an account's page, Sign-ins and sessions shows the same for that account (sessions for administrators only).
- Customers › Sessions lists every open session of the panel; Sign out ends one.
Signing a session out also makes "Remember me" sign in again on every device of the account. A new password set by a manager signs the account out everywhere.
Sign-in log#
System › Sign-in log lists every success, failure, refusal and ban: the account, the address typed, the IP, the browser, how it signed in (password, passkey, link, remember-me) and the second factor. Filter by result, or search by address typed or IP. Lines are kept 90 days by default (7 to 365, set under System › Settings › Logs). Each account sees its own under Settings › Sign-ins.
A sign-in from a browser and system the account has not used in 90 days mails the account (not for the very first sign-in, and at most once a day).
Webhooks: user.locked_out for an account ban, security.address_locked_out for an address ban. The API reads the log with GET /sign-ins and GET /users/{id}/sign-ins, and lists with GET|PUT /users/{id}/allowlists; a key can never change its own account's lists.
Unlocking from the shell#
If you have locked yourself out (a wrong allowlist, a ban), run on the panel's server:
cd /opt/vmstack/current
runuser -u vmstack -- php artisan vmstack:sign-in-unlock --clear-admin-allowlist
runuser -u vmstack -- php artisan vmstack:sign-in-unlock [email protected]
runuser -u vmstack -- php artisan vmstack:sign-in-unlock --ip=203.0.113.5
| Option | Effect |
|---|---|
--clear-admin-allowlist |
empties both lists every administrator must match (panel and API) |
--user=EMAIL (or an account ID) |
empties that account's own lists and lifts its ban |
--ip=ADDRESS |
lifts that address's ban |
Each use is written to the audit log as auth.console_unlock.
For an administrator who has not set a first password yet, vmstack-panel admin-link [email protected] prints a new one-time link. An administrator who lost their second factor needs another administrator; see Troubleshooting billing and accounts.
Not available#
A mail to the account when it is banned, and a captcha per level.