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.

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).

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

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 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

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.

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

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

When someone is locked out

ProblemFix
Forgot the passwordCreate 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 passkeySign 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 codesRemove two-factor, or sudo uptight users totp-reset alice. They set it up again at their next sign-in.
Locked after failed attemptsUnlock, or sudo uptight users unlock alice, or wait 15 minutes.
A device in the wrong handssudo 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 insudo 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.