Machine provisioning and unattended setup
Omarchy separates machine setup from owner setup so an install can finish without a person at the keyboard. System work runs first. The owner flow then creates or finalizes the account, and first login applies settings that need a live desktop session.
Provisioning model
Provisioning moves a machine through three related stages. System setup prepares the image, user setup prepares the account, and first-run setup completes session work after login.
Owner provisioning
Owner provisioning is the first-boot bridge between an installed machine and its first owner. It collects the owner and machine choices, creates or finalizes the account, and completes the handoff to the normal login path.
The flow can be deferred when an image has no known owner. In that case, the first person who boots the machine supplies the owner details. This keeps personal data out of reusable images while using the same owner handoff as an interactive install.
References: bin/omarchy-provision-owner• L557-623 bin/omarchy-provision-owner• L769-781 bin/omarchy-provision-owner• L1246-1303
User provisioning
User provisioning prepares the account before a live desktop session is required. The shared user pass seeds the selected theme and region settings, applies language and input choices, creates the standard work area, applies hardware-aware defaults, and refreshes the user's command and platform setup.
The order matters because later stages rely on the settings or paths created by earlier stages. The same pass supports both first ownership and later re-provisioning, so account setup has one repeatable contract.
References: install/…/all.sh• L1-21 install/…/theme.sh• L1-23 install/…/region.sh• L1-7
First-login setup
First-login setup handles work that needs the user service manager, desktop shell, audio system, or network session. bin/omarchy-provision-first-run runs each step separately, records its result in the user's state log, and marks the full pass complete only when all tracked steps succeed.
The first session enables user services, completes platform user setup, applies live-session settings, and sends setup notices. A failure in one step does not hide later steps. An incomplete pass remains eligible for the next login, while --force allows an explicit rerun.
References: bin/omarchy-provision-first-run• L39-48 bin/omarchy-provision-first-run• L50-99 install/…/enable-user-units.sh• L3-9
Deferred first-boot lifecycle
Deferred provisioning records work that cannot finish before the target machine or owner exists. First boot consumes that state, completes machine-specific work, and then starts the owner handoff.
Machine handoff
The pending provisioning state tells the boot flow that an owner is still needed. The owner path must not create an account while a reset is still pending, because that account could be removed by the reset.
The handoff also protects unfinished hardware and boot state. Work remains pending until the machine confirms that the needed setup is complete, so a failed first boot can resume instead of silently skipping part of the setup.
References: install/…/omarchy-provision-owner.service• L1-19 bin/omarchy-provision-owner• L25-34 bin/omarchy-provision-hardware• L40-50
Login boundary
The owner flow controls the first login boundary so an owner does not receive a half-configured desktop. Encrypted installs retain the expected disk-unlock boundary. Unencrypted installs may use autologin for the handoff boot, then remove it before normal graphical login.
The result is a one-time transition from machine preparation to normal use. The owner can retry incomplete work without selecting a different account or losing the temporary recovery state needed by the boot path.
References: install/…/omarchy-provision-owner.service• L13-31 bin/omarchy-provision-owner• L1271-1303 bin/omarchy-provision-owner• L1324-1455
Unattended deployment assets
Unattended deployment supplies the install choices on a separate data drive instead of using the interactive prompts. A filesystem labeled cidata carries the input, which lets VM and image tools repeat the same install without a custom ISO.
Configuration media
The media can describe the target machine, provide a known owner's credentials, or request a reusable image with no owner. It can also carry optional identity and remote-access data.
| Asset | Purpose |
|---|---|
| user_configuration.json | Disk, host, time zone, keyboard, and encryption choices |
| user_credentials.json | Credentials for a known owner |
defer-provisioning | Reusable image with owner setup deferred |
| user_full_name.txt and user_email_address.txt | Optional owner identity |
authorized_keys | Optional SSH access |
tailscale_authkey | Optional first-boot network enrollment |
When no cidata media is present, the normal interactive install remains available. This makes unattended setup an input mode rather than a separate provisioning system.
References: manual/51-unattended-installs.md• L1-23 manual/51-unattended-installs.md• L31-39
Known-owner deployment
A known-owner deployment can create the account during the unattended install and continue without keyboard input. Optional SSH keys or a Tailscale key can provide remote access after the machine joins the network.
Encryption changes the trust boundary. The unattended configuration includes the encryption passphrase in plain text, so the configuration media must be protected as a secret.
References: manual/51-unattended-installs.md• L7-29 manual/51-unattended-installs.md• L59-61
Deferred-owner images
A deferred-owner image contains no personal credentials. The first person who boots it completes the owner form, and that choice also supplies the encryption password when disk encryption is enabled.
This mode supports VM templates and machines that will later be assigned to different people. It preserves the normal first-boot owner path without placing personal data in the image.
References: manual/51-unattended-installs.md• L21-23 manual/02-getting-started.md• L23-29 bin/omarchy-apply-system• L20-23
First-run session services
The first session turns on user services and applies settings that cannot be trusted before the desktop exists. It also delays network-dependent invitations until the network manager has made its first connection attempt.
User service activation
User service activation enables and starts the shipped services one at a time. This keeps one broken service from stopping the rest of the first-session services, while unit conditions keep hardware-specific services inactive where they do not apply.
The step also applies input-method defaults and installs the theme synchronization hook. These actions connect the account's stored settings to the live user service manager.
References: install/…/enable-user-units.sh• L11-47
Network-dependent notices
Network-dependent notices run in the background so a slow or absent connection does not block the desktop. The Wi-Fi notice appears when no connection is available, and later setup invitations wait until a link exists.
The agent invitation is shown only when no default agent exists and only once. This lets the user choose a setup, subscription, key, or local model instead of forcing a default choice.
References: install/…/wifi.sh• L1-30 install/…/setup-agent.hook• L5-12
The diagram shows how unattended input and deferred state lead to a ready owner session.
flowchart TD
A[Install input or interactive choices] --> B[System setup]
B --> C{Owner known?}
C -- Yes --> D[Create or prepare owner]
C -- No --> E[Record pending owner state]
E --> F[First boot owner form]
D --> G[Shared user provisioning]
F --> G
G --> H[First login session]
H --> I[Enable user services]
H --> J[Apply live-session settings]
H --> K[Wait for network notices]
I --> L[Normal owner session]
J --> L
K --> L
References: bin/omarchy-provision-first-run• L46-99 install/…/all.sh• L1-21 install/…/enable-user-units.sh• L18-47 install/…/wifi.sh• L6-30
Change checklist
When these files or sections are changed, remember to consider these:
- Keep install/…/all.sh ordered so theme and region defaults are available before dependent user setup runs.
- Keep headless theme setup safe in both image setup and owner provisioning contexts. A live-session-only action must not block unattended setup.
- Keep first-run completion separate from user finalization. A finalization failure must not prevent session-only steps from running or retrying.
- Keep each first-run step independently tracked. One failed service or notice must not prevent the other session work from running.
- Keep network notices detached from the main first-run pass. A missing link must not block the owner session.
- Keep the agent invitation's completion key stable so a user does not receive the same critical prompt repeatedly.
- Treat unattended media names and encryption values as an external contract with VM and image tooling.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| Theme setup assumes a live session during image creation | User setup can fail before the owner reaches first login | Headless theme mode handles non-runtime setup contexts |
| One user service cannot enable or start | Other required first-session services may be skipped | Services are enabled and started one at a time |
| A tracked first-run step fails | The next login repeats the first-run pass | Completion is marked only when all tracked steps pass |
| NetworkManager has not completed its initial checks | The machine can show a false offline state | The Wi-Fi step waits for the initial network result |
| No network link is available | Network setup and later invitations cannot proceed | The Wi-Fi notice opens network controls and waits in the background |
| Deferred provisioning runs while a reset is pending | A new owner can be created on data that will be deleted | The owner service waits until reset state is clear |
| Unattended encrypted media is exposed | The disk passphrase is exposed with it | Treat the cidata media as a secret |
Key files
| File | Why to read it |
|---|---|
bin/omarchy-provision-first-run | First-login order, retry state, and failure handling |
| install/…/all.sh | Shared user setup order |
| install/…/theme.sh | Region-based theme selection and headless setup |
| install/…/region.sh | Region-specific user defaults copied into the home |
| install/…/enable-user-units.sh | First-session service activation and input setup |
| install/…/wifi.sh | Network readiness and detached notices |
install/user/first-run/setup-agent.hook | One-time default-agent invitation |
| manual/51-unattended-installs.md | Configuration-media contract for unattended deployment |
install/provisioning/omarchy-provision-owner.service | Conditions for the first-boot owner flow |
bin/omarchy-provision-owner | Owner creation, retry, and login handoff |
bin/omarchy-provision-hardware | Deferred machine-specific setup and recovery |