Skip to content

First-run setup

Harbor suiteNo sign-in neededDescribes Onboard 0.58.0 / Health 0.21.0

A Harbor console always needs a sign-in. The very first time a console starts with no way to sign in, it is in first-run mode: you create the emergency (break-glass) admin account, and nothing else answers until it exists. After that, an admin finishes the setup with the setup wizard.

The demo profile is the exception: it signs every local caller in as the demo operator, so it has no first run.

Only someone who can see the console’s setup code, which means someone on the Harbor machine itself:

  • the person who started the console (the code is in its window);
  • an administrator (the code is also in a file only SYSTEM, Administrators and the console’s account can read);
  • anyone who can run Set-HarborWebLogin on the machine, which needs write access to Harbor’s configuration store.

The setup screen is answered only on the local machine (loopback).

  1. Start the console: double-click Harbor.cmd (or Harbor-Health.cmd).

  2. The console window prints:

    FIRST RUN -- no sign-in is set up for this console yet.
    Create the emergency (break-glass) admin account with this one-time setup code:
    <setup code>

    The launcher opens your browser with the code already in the address (after the #, so it never reaches a server, a proxy or a log). The page removes it from the address bar at once.

  3. On the Welcome to Harbor screen (First run: create the emergency (break-glass) admin account), check the Setup code, then fill in Username, Password and Repeat password.

  4. Select Create the account and sign in. You are signed in as admin.

Property Behaviour
Lifetime 30 minutes. After that, a new code is shown in the console window.
Use Once. It is void as soon as any sign-in method exists.
Wrong codes Never use up the code. Repeated wrong codes from one machine slow down: “Too many wrong setup codes from this machine. Try again in …”.
Where else In the Harbor store, in %ProgramData%\Harbor\bootstrap.HarborOnboard.code (Harbor Health: bootstrap.HarborHealth.code).

The emergency account’s password must:

  • be at least 12 characters;
  • use at least 5 different characters;
  • not be the username;
  • not be built from a common password (for example passwordpassword or Welcome2026!).

The username is 1 to 64 letters, digits, ., _, @ or -. Choose your own: there is no default name.

Anyone with access to the Harbor machine’s configuration can create the account without the code:

Terminal window
Import-Module .\HarborOnboard\HarborOnboard.psd1
Set-HarborWebLogin -Username <account name> # prompts for the password

A running console picks the change up within a couple of seconds; no restart.

The emergency account is stored in the shared configuration, so creating it on one console covers the other. A second console that is still on its setup screen reloads to its sign-in page.

On an install whose tenant is not configured yet, the setup wizard opens for the first admin after sign-in. Later you can run it again from the gear menu: Run setup wizard….

Step Fields Result
Welcome to Harbor Select Start.
Step 1 · Tenant & service account Profile name, Tenant name, Tenant ID, OAuth service user, OAuth secret Save & connect saves the tenant (Harbor derives https://<tenant>.privilegecloud.cyberark.cloud and https://<tenant id>.id.cyberark.cloud), declares the OAuth service account with its secret stored for this Windows account (DPAPI) and connecting when the console starts, then connects.
Step 2 · Single sign-on (recommended) Client ID, Issuer URL, Admins, Operators, Viewers Save SSO turns on CyberArk single sign-on with those role lists (anyone not listed is a viewer). See SSO (OIDC).
Last step All set, Partly set up or Setup skipped, then Enter Harbor.

Every step except the first can be skipped. Whatever you skip stays under the gear menu: Tenant & service account and CyberArk SSO setup.

A console running as SYSTEM has no visible window for the setup code. Install-HarborService therefore asks for the emergency account itself, in the elevated console, before it registers the task. See Run as a Windows service.

Message Fix
“The setup code expired.” / “No setup code is active.” Read the new code in the console window, or in the code file in the Harbor store.
“That setup code is not valid.” Copy the code again from the console window. Wrong codes do not use it up.
“The two passwords differ.” Type the same password twice.
“That password is too common …” Choose a password that is not built from a well-known one.
The setup screen reloads to a sign-in page The first run was completed meanwhile (on the other console, or with Set-HarborWebLogin). Sign in with that account.
“Harbor is not set up yet. An admin needs to run the setup wizard (gear menu).” You signed in as a non-admin on an unconfigured install. An admin runs the wizard.

Covers Harbor Onboard 0.59.0 / Harbor Health 0.22.0. On an older release? Upgrading and the release notes list what changed.