Docs / Using Uptight
Built-in sign-in
Uptight signs people in itself, with local accounts: a username, a password and two-factor, or a passkey. Central runs the sign-in and keeps the sessions in its database; uptight-web shows the pages. No sign-in proxy needed. Free in every edition, from 0.12.0, and the default from 0.13: a server.yaml without auth.mode means built-in sign-in.
New installs have it: the Ubuntu packages, the Docker quick start and the NixOS modules all set it up. Central's server.yaml decides how people sign in, and uptight-web follows it. An upgrade never changes your config files; an install that runs a proxy must say auth.mode: header (see below). Sign-in with your OIDC provider (Okta, Entra ID, Google, Keycloak, Authentik) comes in the next release.
On a new install
There is one step: open the first admin's setup link. While no admin can sign in, central logs a one-time link for the user admin, valid 1 hour:
sudo journalctl -u uptight -o cat | grep setup_url # Ubuntu packages (or /var/log/uptight/uptight.log)
docker compose -f deploy/docker-compose.yaml logs uptight | grep setup_url # Docker quick start
journalctl -u uptight -o cat | grep setup_url # NixOS
Or make a link for the name you want, which also works once the logged one has run out:
sudo uptight users setup-link --admin <your-name> # Ubuntu packages: prints http://localhost:8091/auth/setup#…
docker compose -f deploy/docker-compose.yaml exec uptight uptight users setup-link --admin me # Docker quick start
sudo uptight-hub users setup-link --admin <your-name> # NixOS
Open the link, choose a password (at least 12 characters) and set up two-factor: admins must have it. A link works once, within 1 hour; if it runs out, restart uptight for a new logged one, or run setup-link.
- The address. A new install's
public_urlin server.yaml ishttp://localhost:8091; uptight-web reads it from central. Open it on that host, or from your own computer through a tunnel:ssh -L 8091:localhost:8091 <central-host>. Uselocalhost, not127.0.0.1: the address must be exactlypublic_url. - For the other machines on your LAN, set
public_url: https://<this host's address>:8091in server.yaml andUPTIGHT_WEB_LISTEN=0.0.0.0:8091in/etc/uptight/web.env, thensystemctl restart uptight uptight-web. uptight-web serves https itself with a self-signed certificate: see Built-in https. - Behind your own TLS reverse proxy, set
public_urlto its https address and restart uptight; uptight-web follows. A proxy that speaks plain http to a uptight-web on a non-loopback address must sendX-Forwarded-Proto: https, or setUPTIGHT_WEB_TLS=off. - The logged link is a credential until it is used or expires: whoever can read central's log (root, the
admandsystemd-journalgroups, container log readers) can use it. It stops working once another admin can sign in. Turn it off withauth.local.bootstrap.enabled: false, for example when logs leave the host before setup. - Back up the secret key the package generated (
auth.secret_keyin server.yaml;/var/lib/uptight/auth-secret-keyon NixOS). See below.
Switch an install that runs a proxy
Upgrade every central node and uptight-web to 0.13 first. On central, as root:
sudo uptight auth init # secret key + relay token, fills UPTIGHT_WEB_TOKEN in web.env
sudo uptight users setup-link --admin you # prints https://…/auth/setup#…
In /etc/uptight/server.yaml (auth init wrote secret_key and web_tokens already, or kept the ones there):
public_url: https://uptight.example.com
auth:
mode: native
secret_key: …
web_tokens: …
Then restart central; uptight-web follows within a minute:
systemctl restart uptight
Open the link, choose a password and set up two-factor. Pick a name your proxy never sent: a user the proxy named cannot get a password. On NixOS: services.uptight.settings.auth.mode = "native" (the default; see NixOS).
- https.
public_urlis the browser-facing address and must be https, because the session cookie is only safe over https. Plain http is fine on loopback:localhost, any*.localhostname, a 127.x.x.x address written in full, or[::1]. - Plain http on a home network (last resort; built-in https is better). Set
auth.allow_http: truein server.yaml,public_urlto the address people open, such ashttp://192.168.1.10:8091, andUPTIGHT_WEB_LISTEN=0.0.0.0:8091in web.env. On NixOS,services.uptight.settings.auth.allow_http = true. Passwords and session cookies then cross the network unencrypted, and people who can manage users see a banner saying so on the dashboard and Settings. - What refuses to start. Central in native mode exits 78 without
public_url,auth.secret_keyor a relay token, and lists every missing item. uptight-web exits 78 withoutUPTIGHT_WEB_TOKEN; while central does not answer, or is older than 0.13, it shows a "starting" page and its log says why. - The api_token stops working for the API in native mode. It still links the nodes of a cluster. Move scripts to a service account's token before you switch (
sudo uptight tokens create --service ci --role responder), or setauth.api_token_access: admin. - People your proxy named cannot sign in in native mode: they have no password. Give each person a local account (below). Their old user and its audit history stay.
Use a sign-in proxy instead
To have your SSO proxy (oauth2-proxy, Pomerium, your load balancer's sign-in) sign people in, set it in central's server.yaml and restart uptight; uptight-web follows:
public_url: https://uptight.example.com # the proxy's address: turns on the Origin check
auth:
mode: header
web_tokens: … # uptight-web's relay token, needed in header mode too
header:
identity_header: X-Forwarded-User # the default
default_user: web # the default
proxy_addrs: [127.0.0.1] # the proxy's addresses: uptight-web takes the header only from them
- On a package install, change
mode: nativein theauth:block the package wrote; a secondauth:key is a YAML error. - NixOS:
services.uptight.settings.auth.mode = "header", andsettings.auth.header.*.
Accounts, passwords and two-factor stay in the database if you switch back later.
Upgrading to 0.13 with a proxy? A server.yaml without auth.mode now means built-in sign-in, and central refuses to start without its settings. Add mode: header to the auth: block first. The sign-in settings in web.env moved to server.yaml: UPTIGHT_WEB_IDENTITY_HEADER, UPTIGHT_WEB_DEFAULT_USER, UPTIGHT_WEB_GROUPS_HEADER and UPTIGHT_WEB_PROXY_ADDRS are now auth.header.identity_header, default_user, groups_header and proxy_addrs, and uptight-web needs a relay token (sudo uptight auth init). uptight-web refuses to start while UPTIGHT_WEB_PROXY_ADDRS is still in web.env.
Built-in https
With built-in sign-in, an https public_url and uptight-web listening on an address other machines reach (UPTIGHT_WEB_LISTEN=0.0.0.0:8091), uptight-web serves https itself on that port, so a LAN install needs no reverse proxy.
- The certificate is self-signed, valid 825 days, for
public_url's host,localhost, 127.0.0.1 and ::1. uptight-web keeps it in/var/lib/uptight-web/tls/and renews it when less than 30 days are left or the host changes. - Fingerprint. uptight-web logs it at start:
journalctl -u uptight-web -o cat | grep sha256. Browsers warn once about a self-signed certificate; compare the fingerprint the browser shows before you accept it. - Plain http on the same port redirects to
public_url. - Passkeys need a host name in
public_url, not an IP address, and a certificate the browser trusts; see Passkeys. - Your own certificate:
UPTIGHT_WEB_TLS_CERTandUPTIGHT_WEB_TLS_KEYin web.env (PEM files);systemctl reload uptight-webreads them again after a renewal.UPTIGHT_WEB_TLS=offturns built-in https off,onforces it.
The first admin and new accounts
There is no first-run page and no "first visitor becomes admin". While no admin can sign in, the leader logs a one-time setup link for the user admin each time it starts (setup_url; auth.local.bootstrap.username picks another name, auth.local.bootstrap.enabled: false turns it off), and sudo uptight users setup-link --admin <name> on a central host creates the user as an admin if needed and prints a one-time link to set a password. While there is no admin, the sign-in page says where to find the link. The code in a link comes after #, so it never reaches a proxy's access log.
To add someone, create the user on Settings → Users, then Create setup link on their page, or run sudo uptight users create alice --role editor, which prints the link. Send it to them. A setup link works once, within 24 hours (1 hour for an admin), and Uptight shows it once.
Two-factor
- Codes come from any authenticator app: scan the QR code or type the key. Set it up on Your account, or at sign-in when it is required.
- By default admins must have it.
auth.local.require_totpisadmin,allornone. An admin without two-factor is asked to set it up at sign-in, and gets in only after that. - Setting it up shows 10 recovery codes, once. Each works once in place of a code. Your account page shows how many are left, and New recovery codes there makes a new set of 10, shown once; the old ones stop working.
- A code works once: the same code is refused a second time.
auth:
mode: native
local:
require_totp: all # admin (default) | all | none
password_min_length: 12 # at least 8
Passkeys
A passkey signs you in without your password or a code: your phone, laptop, password manager or security key checks your fingerprint, face, PIN or screen lock. Passkeys are free in every edition and on by default.
- Add one on Your account under Passkeys: Add a passkey, give it a name ("MacBook", "YubiKey") and follow your browser. Your account needs a password first, and Uptight may ask for your password again (a sign-in within the last 15 minutes). An account has at most 20 passkeys; rename or remove them on the same page.
- Sign in with Sign in with a passkey on the sign-in page: no username, password or code. A passkey always checks your fingerprint, face or PIN, so it counts as two-factor, and Keep me signed in works with it. Your password and code still work too.
- Asked to confirm it is you? The page offers your passkey next to the password.
- Synced passkeys (iCloud Keychain, Google Password Manager, 1Password and others) work, and the list marks them "synced". A passkey that looks copied (its counter went backwards) is refused until you remove it.
- Lockout. A passkey sign-in ignores the password lockout, and a failed one does not count toward it. It counts toward the 30 attempts per address like any sign-in.
- Removing a passkey signs out the sessions that signed in with it, but not the one you are using.
Where passkeys work. A passkey belongs to the address in public_url. Browsers allow passkeys on a host name over https, or on localhost over plain http, so the default http://localhost:8091 (and an ssh -L tunnel to it) works. They do not work on http://127.0.0.1, an IP address (https://192.168.1.10:8091 included), or plain http on a home network name, even with auth.allow_http: true. With built-in https, set public_url to a name your network resolves, such as https://uptight.lan:8091; Chrome and Edge refuse passkeys on a page whose certificate they warned about, so trust uptight-web's self-signed certificate on each computer (check its fingerprint first) or use your own. Where they cannot work, Uptight hides them, and central says why in its log at start.
After a suspected compromise, remove the passkeys too. A password change or a reset link does not remove them. The user removes them on Your account; an admin removes them on the user's page in Settings → Users, or all at once with sudo uptight users passkey-reset alice. Your password can still be phished; passkeys do not change that yet.
auth:
local:
passkeys: true # the default; false turns passkeys off
Sessions
- A session ends after 8 hours without activity, and 24 hours after sign-in at the latest. A page refreshing itself in a forgotten tab does not count as activity.
- Keep me signed in on this device lasts 14 days without activity and 30 days at most. It is offered only after two-factor or a passkey. Use it for phones and wall screens, with a viewer account on a wall screen.
- Changing your password or two-factor signs you out everywhere else. A user has at most 20 sessions; a new one ends the oldest.
- Sign out is in the menu. Your account page lists where you are signed in and signs out any of them. Disabling a user signs them out at once.
- Asked for your password again? Managing users or tokens, creating a token, changing your two-factor, getting new recovery codes, and adding or removing a passkey need a sign-in within the last 15 minutes. Otherwise Uptight asks for your password (and code), or a passkey, then carries on. Changing your password does not count as a fresh sign-in.
auth:
session:
idle_timeout: 8h
absolute_timeout: 24h # at most 720h
device_idle_timeout: 336h # "keep me signed in"; 0 removes the option
device_absolute_timeout: 720h
reauth_window: 15m
Passwords and lockout
- At least 12 characters, and no rules about digits or symbols. Uptight refuses the 10,000 most common passwords, and your username or email address. Passwords are stored as Argon2id hashes.
- Every failed sign-in gets the same answer, "Invalid username or password", whatever went wrong. The audit log has the real reason.
- 10 failures in 15 minutes lock the account's password sign-in for 15 minutes (
auth.local.lockout). Wrong two-factor codes count as failures too, at sign-in and when you are asked again. Each client address gets 30 attempts in 10 minutes; an IPv6 client counts by its /64. - There is no "forgot password" email, by design: whoever controls the email settings could then take over accounts. An admin creates a reset link instead.
When someone is locked out
| Problem | Fix |
|---|---|
| Forgot the password | Create password reset link on Settings → Users, or sudo uptight users reset-password alice. It works once, within 24 hours (1 hour for an admin). The old password works until then. |
| Lost a device with a passkey | Sign in with your password and remove it on Your account. Or an admin removes it on Settings → Users, or sudo uptight users passkey-reset alice removes them all. |
| Lost the phone and the recovery codes | Remove two-factor, or sudo uptight users totp-reset alice. They set it up again at their next sign-in. |
| Locked after failed attempts | Unlock, or sudo uptight users unlock alice, or wait 15 minutes. |
| A device in the wrong hands | sudo uptight users revoke-sessions alice, a password reset, and sudo uptight users passkey-reset alice: a reset does not remove passkeys. |
| No admin can sign in | sudo uptight users break-glass <admin> on a central host. |
Break-glass prints a one-time sign-in link, valid 15 minutes, that needs no password or two-factor. The session lasts at most 1 hour. It works even with auth.local.enabled: false, when setup and reset links and password changes are refused. It is in the audit log, and for 7 days admins see a warning on the dashboard and Settings naming who signed in that way. Like every uptight users command, it needs root on a central host and opens the database directly, so it works while central is stopped.
Back up the secret key
auth.secret_key encrypts the two-factor secrets in the database. Back it up, apart from the database backup. If you lose it, nobody's two-factor works: restore the key, or run sudo uptight users totp-reset <name> for everyone who had two-factor, and they set it up again.
High availability Team
Give every node the same auth: block, secret key, relay tokens and public_url; Settings → Config flags a node whose auth settings differ. Sessions live in the database, so any node and any uptight-web serve any user, and the load balancer needs no sticky sessions. Node-to-node traffic carries session tokens: keep it on a private network.
Every setting, command and API route is in the README's "Built-in sign-in" section. Roles and tokens work the same way in both modes: see Users and roles.