# First-Boot Setup

---

# Completing Setup

_Peios / First-Boot Setup_

> Creating an administrator account, choosing a machine name, and checking first-boot completion.

First-boot setup creates an administrator account and names the machine.
The terminal and browser interfaces use the same conversation, so you can
change interfaces without starting a second setup.

## Before you start

Make sure you have these prerequisites:

- An installed image that includes and activates the first-boot services.
- Access to the machine's console, or its trusted GXWI browser connection.
- A password for the administrator account you will create.

For browser setup, verify the machine's certificate through a trusted
console before entering a password. See
[Browser Setup](/peios/first-boot/browser-setup.md).

## Complete the conversation

1. Continue from the welcome page. Language and keyboard choices shown as
   unavailable are configured after setup in System Settings.
2. Review the network state. Continue without networking on the console,
   or supply a manual address for a wired interface if needed.
3. Enter the administrator account name and matching passwords, then select
   **Next**. Correct any field errors before continuing.
4. Enter a machine name or accept the suggestion.
5. Select **Finish** to create the account, set the machine name, and apply
   any manual network setting.
6. Sign in with the account and password you created.

The machine name is a single label of up to 63 letters, digits, and hyphens.
It cannot start or end with a hyphen or be `localhost`. Account names are
trimmed and must fit the local account store's rules. Reserved group names
and `peios-oobe-setup` are rejected.

Passwords cannot contain a carriage return or line feed. Setup rejects
those characters before starting account creation; it preserves Unicode,
spaces, and tabs in accepted passwords.

The browser's password strength meter offers advice. It does not replace
the daemon's validation or guarantee that a password is hard to guess.

## Check the result

Confirm that your account can sign in and that the machine uses the name
you chose. If you configured a manual address, check reachability from a
device on that network. A subsequent boot should reach sign-in without
repeating setup.

Setup removes its service definitions only after successful completion.
Closing the interface or encountering an error leaves setup available for
another boot. A sign-in prompt after an abandoned attempt does not prove
that an account was created.

If no usable account exists and setup repeatedly fails, use the installation
medium for diagnosis. Repair operations have specific limits; they are not
a general account-recovery mechanism.

---

# Browser Setup

_Peios / First-Boot Setup_

> Shared browser state, certificate verification, and temporary setup access.

The browser setup page is a GXWI overlay available before normal sign-in.
`oobed` owns the setup operation, while `oobe-gxwi` presents the conversation
and forwards your answers.

## A shared conversation

All connected browsers observe the same page and completed choices.
Coordinate with anyone else using setup. Typed account fields stay in the
browser until submission, and the frontend does not broadcast the password
to other viewers.

The overlay is available without normal sign-in. Before offering it,
`oobed` creates or reuses the passwordless account `peios-oobe-setup` and
includes that account in the setup socket's intended access descriptor.
The account has no groups. A sign-in mechanism that accepts passwordless
accounts can also accept this account while it exists.

Successful setup removes the overlay and the temporary account and its
home directory. An unfinished setup keeps them for another attempt.
Keep the machine on a trusted network during this period.

## Check the connection

Use the address advertised on the machine's own console. When GXWI uses a
self-signed certificate, compare its SHA-256 fingerprint with the trusted
console's reading before sending credentials. A page received over the
unverified connection cannot authenticate that same connection.

The console reads the fingerprint from
`/var/state/gxwi/certificate.sha256`. The browser installer deliberately
does not present that value as a source of trust.

A fresh installation attempts to copy the medium's GXWI key and certificate
to the installed system. Failure to copy them does not fail installation.
Verify the certificate actually presented after restart; installation
success does not establish that the certificate stayed the same.

Direct development listeners created with `--listen` serve HTTP without
GXWI's TLS termination. Use those listeners only with synthetic credentials
in an isolated development environment. Production certificate handling
belongs to GXWI.

## Returning to sign-in

After setup completes, `oobed` removes the overlay and GXWI restores its
sign-in page. The browser waits for that transition. If automatic return
fails, check the machine's console and reopen its verified address.

A manual network change is applied at the end of setup. The browser can
lose access if its device cannot reach the resulting network, or if the
new address needs a fresh certificate trust decision. Verify the address
and certificate before entering credentials again.

---

# Network Choices during Setup

_Peios / First-Boot Setup_

> Reading network state and applying a manual wired address at the end of setup.

Setup shows network state reported by `net status`. You can continue on
the console without a network, or configure a manual address for a wired
interface. Joining a wireless network is not part of this setup flow.

The network page reports each interface and its addresses, gateway, and
name servers. **Check again** refreshes that state. In a browser, the page
also identifies the interface used to reach the machine when it can match
the address.

A manual address is saved as a pending choice. It does not change the
connection while you complete the account and machine-name pages. Setup
applies it after creating the account and naming the machine.

The daemon writes an ordinary network profile and an interface rule under
`Machine\System\Network`. The rule identifies the interface by its stable
identifier. These settings belong to the network service and can be changed
through its normal tools after setup.

Before finishing, check that your browser's device can reach the address you
chose. If it cannot, use the console to finish and inspect the connection.
A browser that stays on its waiting page does not prove that the network
change failed.
