Install and upgrade
Before you start
Prepare the following:
- A promoted release containing
Install.ps1,Upgrade.ps1,Uninstall.ps1,Deployment.Common.ps1,Services.jsonand adrop-<version>folder withAPI.zip,UI.zip,Queue.zipandTEE.zip. Keep the scripts and manifest together. - A Windows server and local administrator access, plus installation, log and configuration-backup locations.
- An installed SQL Server and connection details for the API's application and audit-log databases, or the optional local database setup described below. Grant database access only to the API service identity.
- DNS names, ports and a trusted TLS certificate for the UI and API.
- The Windows accounts the services will run as, and access to their required files and storage. See Windows folder permissions.
- Any vendor software needed by adapters on the TEE machine, and provider details if using an external identity provider or integration.
The installer opens firewall ports 80, 443, 5050, 5051, 5055, 5060, 5075 and 5000–5010 by default. Expose only what the environment needs; actor ports normally need access only between OT Backup services and TEE agents.
Install
Open PowerShell as Administrator and run the released install script. For example:
.\Install.ps1 ` -SourceBasePath 'C:\Install\TRUE OT Backup\drop-2026.07.0' ` -DestinationPath 'C:\Empir Industry\OTBackup' ` -LogsPath 'C:\Empir Industry\Logs'
At the Windows service account prompt, press Enter to use Local System or enter a Windows account to run the services under. See Windows folder permissions. Then choose Self-signed, CSR for PKI, or None / already provided. The default is Self-signed. Enter the primary DNS name for the API and UI. Certificate selection happens before deployment changes so a CSR can be submitted and signed before installation or upgrade continues. When the API is included in the installation or update, setup uses it for the API's local-account setup URI, external authentication callback URIs and UI CORS origin, even if you choose None / already provided. This option leaves the existing certificate and HTTPS settings unchanged; it does not import a certificate or disable HTTPS. The public UI URLs use HTTPS port 443 and the API callback uses HTTPS port 5050. Adjust these settings and any identity provider callback registrations if a reverse proxy or other ports are used. A UI-only update does not change the API settings.
For Self-signed, enter any additional DNS names, validity and an optional PFX password.
localhostis always included as a DNS name. The certificate is stored underDestinationPath\Certs, and the API and UIappsettings.jsonfiles are updated to use it. A single-service update uses a separate certificate for that service. In interactive setup, an existing certificate is replaced only if confirmed. Choose CSR for PKI to enter the subject details and request a CA-issued certificate as described below, or None / already provided to manage HTTPS yourself.-IgnoreConfirmation(also available as-SkipConfirmation) skips the DNS and certificate prompts unless-GenerateCertificateor-CertificateMode Noneis supplied. After generation, setup asks whether to add the public certificate to the local machine's trusted root store; the default is Yes. This trusts it system-wide on that machine only. Other client machines must trust it separately, and a CA-issued certificate is preferable where available. Replacing a certificate does not remove any previously trusted certificate; review and remove retired trust entries when appropriate. Protect and back up the PFX and settings files: the settings contain the PFX password if supplied, and setup restricts their access to administrators, SYSTEM and the relevant service identities. Without a PFX password, file permissions are the only protection for the private key. Environment-, machine- and user-specific settings can override values inappsettings.json; verify the effective HTTPS configuration and URIs before starting the services.At the startup prompt, configure the services as described in Configuration, including authentication, and verify Windows folder permissions. Do not use
-IgnoreConfirmationunless configuration is already prepared and no account or permission changes are needed before startup.Press Enter to start the services. Check the API log for successful startup and database migration.
Provision the first administrator, sign in, and configure Configuration → Settings → Backup Storage. Save the settings and run Test Connection. See Backup Storage settings.
Complete the checks below. Install optional integrations explicitly with
-AppName 'OTB Maintenance Integration'when needed.
The install script selects the four core services by default and refuses to
overwrite an existing service or application directory. Use -AppName to
install one service. If a service name exists but points to a different
installation, the scripts stop rather than modifying it.
Service detection uses the exact names in Services.json; review separately
installed services with different names before migrating them.
Obsolete certificate-renewal arguments such as -Domain and
-CertificatePassword are no longer accepted by Install.ps1. For certificate
generation, use -CertificateDnsName and, if needed, -PfxPassword instead.
When automatically discovering release drops, or choosing a ZIP with
-UseArtifact, setup offers a choice if multiple folders contain the required
archives. The highest version appears first and is the default. New releases
use drop-YYYY.MM.hotfix; older unpadded dotted and dashed versions, including
continued hotfixes such as drop-2026-07.5, are also recognized.
-IgnoreConfirmation selects the default without prompting. Archives directly
in the source folder take precedence. Without -UseArtifact, an explicit
-SourceBasePath is used directly without searching for nested drops.
Windows folder permissions
Interactive setup defaults to the built-in Local System account. Press
Enter or type LocalSystem to use it without a password prompt. Manage the
installation from an elevated administrator session; setup does not grant
the person running setup separate folder permissions. Local System does
not inherit that person's access to network shares.
Enter a Windows user account only if the services need to run under it.
Setup checks that Windows recognizes the account before asking for its
password. If Windows cannot resolve the name, check the spelling and domain
connectivity and try again. A supplied -ServiceCredential that Windows
cannot resolve stops setup before deployment. This lookup does not verify the
password or the Log on as a service right.
The same account is used for service registration and folder access for all
services selected in the install run.
If the account has no password, press Enter at the password prompt. Windows still decides whether the account can log on as a service. If Windows rejects the logon, choose an account with a password rather than weakening the machine's security policy.
To supply the credential directly, use:
.\Install.ps1 -ServiceCredential (Get-Credential)
For an account with no password, pass
[pscredential]::new('.\user', [System.Security.SecureString]::new())
to -ServiceCredential instead, replacing .\user with the account name.
Enter DOMAIN\user, user@example.com, or .\user for a local account.
For production, prefer a dedicated, non-administrator account with the
Log on as a service user right. It can read the settings and secrets of
every service it runs. The script does not save the password in deployment
files or logs. If a PKI request is resumed in a later session, pass
-ServiceCredential with the same account again. -IgnoreConfirmation
without a supplied credential uses Local System. Optional local SQL setup
requires Local System; otherwise configure SQL access separately.
When setup installs services under a Windows user account, it sets the permissions below before starting them. You normally do not need to grant these permissions manually.
| Location | Access for the service account |
|---|---|
DestinationPath (the installation root) |
Read & execute on this folder only; this entry is not inherited by its children. |
The service's application folder, for example DestinationPath\API |
Read & execute on the folder, subfolders and files. |
DestinationPath\tusfiles |
Modify for the API and server TEE accounts, including files and subdirectories. A full install normally uses the same account for both. If they differ, grant the TEE account access separately; also configure both accounts' access separately for a custom upload directory. |
The service's packaged application log folder, for example DestinationPath\Logs\API |
Modify. -LogsPath does not change where the services write their application logs. |
DestinationPath\API\appsettings.<machine-name>.json |
Read and Write for the API account. The API can write its generated integration key here. |
DestinationPath\DataProtection |
On a new folder, Modify for the API account, with access otherwise restricted to SYSTEM and local administrators. The API creates its protection certificate and persists its key ring here. Setup does not change an existing folder or its contents. |
DestinationPath\Integration.MaintenanceSystem\Simulation |
Modify for the Maintenance Integration account, for the packaged simulated provider's default data file. Configure access separately for a custom data location. |
These grants do not remove or restrict existing inherited permissions. Review the effective access inherited from parent folders, especially any write or modify permissions on service binaries and secret-bearing files.
Setup also creates the UI's wwwroot\.well-known folder so the UI does not
need write access to its application directory. When setup provisions HTTPS,
it grants the relevant accounts read access to the generated PFX and updated
HTTPS settings.
If you change an account manually, stop the service and set the new account
in Services (services.msc) under Properties > Log On. Before
starting it again:
- In File Explorer, open Properties > Security > Advanced > Effective
Access on each relevant folder or file. Select the account from
Log On, not the administrator running setup. To add missing access,
use Security > Edit > Add on the specific folder or file. Do not grant
Full control on
DestinationPathor replace child permissions. - For an existing or restored Data Protection folder,
check the protected items individually: the API needs Read & execute
on
DataProtection, Modify onkeys, and Read onprotection.pfx. For a fresh install that must initialize Data Protection manually, create the folder with access limited to SYSTEM, local administrators and the API account, and grant the API account Modify there instead of granting write access to the installation root. - Check any custom log or upload directories, externally managed certificates, databases and backup storage separately. Remove the old account's access if no other service needs it.
Upgrade keeps the existing service account and applies the root-folder grant and reapplies setup's standard application-folder grant if the latter is still present for that account. Recheck manually customized permissions at the upgrade's startup prompt: setup recreates the application folders. Setup stops before removing an application folder if it finds an explicit deny rule alongside its service-account grant; review those rules before retrying.
Optional local SQL setup
For a fresh interactive installation containing the API, accept Local System
at the Windows service account prompt to be offered local SQL setup; the
default for SQL setup is No. Alternatively,
-SetupSql can create a new application database on an already installed
local SQL Server instance. It uses Windows
authentication and local shared memory, grants the API's default LocalSystem
identity db_owner on that database for migrations, and configures both the
application and audit connections to use it. These local shared-memory
connections do not use SQL network TLS:
.\Install.ps1 -SetupSql -SqlDatabaseName 'OTBackup'
The instance and database names default to MSSQLSERVER (the default SQL
Server instance) and OTBackup. To use a named instance instead, specify
for example -SqlInstanceName 'SQLEXPRESS'. The selected instance must be
installed before setup and accessible locally using shared memory. The account
running setup must have permission to create a database and
Windows login and grant database permissions. Setup starts the instance if it
is stopped. It does not install or upgrade SQL Server, reuse an existing
database, or grant the API login SQL Server sysadmin.
The database and any SQL permissions created by setup are retained if deployment fails; inspect and remove or repair partial resources before retrying. Existing databases are never overwritten. SQL setup writes protected API service-account settings; if the API service identity is changed later, configure its SQL access and effective connection strings separately. The audit table is created by API migrations in the same database.
SQL setup is opt-in; -IgnoreConfirmation skips the prompt unless
-SetupSql is supplied. The feature is unavailable
in upgrade and uninstall. -PreflightOnly -SetupSql validates the names,
selected API and presence of the SQL instance without starting it or creating
databases; it does not verify SQL permissions or database availability.
For CSR-based installs, SQL options are saved with the request and applied
when the signed certificate is supplied.
If local SQL setup is not selected, configure the API's connection settings yourself; the script does not check for a local instance in that case, allowing the API to use a separately managed SQL Server.
Generate a certificate with parameters
Both Install.ps1 and Upgrade.ps1 accept -GenerateCertificate. For
example, run the following as Administrator to generate a self-signed
certificate without interactive prompts:
.\Install.ps1 -IgnoreConfirmation -GenerateCertificate ` -CertificateDnsName 'otb.example.com' ` -AdditionalDnsNames 'api.example.com','ui.example.com' ` -CertificateValidityYears 2
Use the same options with Upgrade.ps1. The primary DNS name is required;
additional DNS names are optional, localhost is included automatically, and
validity defaults to one year (allowed range: 1–10). An optional
-PfxPassword accepts a PowerShell SecureString; omit it for a passwordless
PFX or obtain one with Read-Host -AsSecureString. Do not put plaintext
passwords in commands or logs. When generation is explicitly requested, the
script replaces the existing destination PFX and automatically trusts the
public self-signed certificate in the local machine root store, even with
-IgnoreConfirmation. Review old trust entries separately. API URIs are
updated from the primary DNS name.
To skip certificate creation while updating the selected API's URLs in an unattended install or upgrade, use:
.\Upgrade.ps1 -IgnoreConfirmation -CertificateMode None ` -CertificateDnsName 'otb.example.com'
Do not combine None with -GenerateCertificate, PFX import, CSR resume,
additional DNS names, certificate validity or a PFX password. No certificate
is created, replaced, imported or trusted. Configure a usable HTTPS certificate
separately before starting services; None does not validate an existing one.
Use an existing PFX
Install or upgrade with a CA-issued PFX containing exactly one private-key certificate, for example:
$pfxPassword = Read-Host 'PFX password' -AsSecureString .\Upgrade.ps1 -IgnoreConfirmation -PfxPath 'C:\Install\server.pfx' ` -CertificateDnsName 'otb.example.com' -PfxPassword $pfxPassword
Omit -PfxPassword for a passwordless PFX. The certificate must be currently
valid for server authentication, include the primary name and any
-AdditionalDnsNames in its DNS subject alternative names, and chain to a
trusted CA in the local machine context. Single-label wildcards are accepted.
Install trust roots beforehand using your organization's procedures: setup
does not add the supplied certificate or its chain to a trust store. The
original PFX is copied to the protected certificate directory and the selected
API and UI HTTPS settings are updated. The PFX password, if provided, is
stored in the protected settings. Verify trust from client machines separately.
An explicitly supplied PFX is applied even with -IgnoreConfirmation.
Preflight checks
Use -PreflightOnly with either Install.ps1 or Upgrade.ps1 to check the
selected packages, deployment paths, existing service ownership, requested
certificate inputs and configured listener ports without stopping or creating
services, changing application files, or creating a CSR or machine key. For
example:
.\Upgrade.ps1 -IgnoreConfirmation -PreflightOnly ` -SourceBasePath 'C:\Install\TRUE OT Backup\drop-2026.07.0' ` -DestinationPath 'C:\Empir Industry\OTBackup'
The port check uses package settings and, for an upgrade, preserved settings, plus machine and service environment settings. It checks configured Kestrel endpoint URLs and the core services' actor ports against current TCP listeners; ports owned by selected services being upgraded are allowed. Wildcard binds are treated conservatively. Dynamic ports, command-line or other custom configuration sources, user environment variables, and listeners started after the check cannot be verified. A passing preflight is not a guarantee of successful startup. Setup does not perform post-start readiness verification; check service status and application logs after deployment.
Preflight can create a protected deployment log and temporarily extract a selected artifact ZIP; extracted artifact staging files are removed on exit. Normal install and upgrade runs also perform these checks before changing services, and clean up their temporary artifact staging files.
Request a PKI-signed certificate
Choose -CertificateMode Csr to request a certificate from your PKI instead:
.\Upgrade.ps1 -IgnoreConfirmation -GenerateCertificate -CertificateMode Csr ` -CertificateDnsName 'otb.example.com' ` -AdditionalDnsNames 'trueotbackup.example.com' ` -CertificateOrganization 'Example organization' ` -CertificateOrganizationalUnit 'Operations' ` -CertificateLocality 'Uddevalla' ` -CertificateState 'Västra Götaland' ` -CertificateCountry 'SE'
The same parameters work with Install.ps1. All five subject inputs are
required for new CSRs: the legally incorporated organization (O), requesting
department (OU), city or town (L), fully spelled-out state/province (ST), and
two-letter country code (C). The primary DNS name becomes the common name (CN)
and is also included in the DNS subject alternative names (SAN). Unicode
names and punctuation in subject fields are supported. These subject options
apply only to CSR generation, not self-signed certificates or PFX import.
Existing unattended CSR commands must supply the five new parameters.
Interactive setup offers the same CSR choice and prompts for missing subject
inputs and additional DNS names. When using -IgnoreConfirmation, missing or
invalid inputs fail before creating a request or changing services.
The script creates a CSR and a private key in the Windows machine key store
before stopping services or changing application files. Submit the CSR
to the CA. Unlike the self-signed option, localhost is included only when
explicitly listed. Requests use RSA 2048-bit keys and SHA-256 signatures.
The CA determines the issued certificate's validity. No OpenSSL installation
is required. To inspect the request on Windows, run:
certutil.exe -dump 'C:\path\to\request.csr'
Check the subject, DNS SANs, key size and signature algorithm before submission.
Without -IgnoreConfirmation, the script waits for the signed certificate
file path; press Enter to stop and resume later. With -IgnoreConfirmation, it
prints the resume command and exits without deploying. The command is also
saved as resume.txt beside the CSR and request.json, under
DestinationPath\Certs\Requests\<id>. Replace the certificate-file
placeholder and run it as Administrator on the same machine. The saved
request state retains the original deployment options, but not a PFX password:
provide -PfxPassword again when resuming if needed.
The issued certificate must match the request's private key, include all
requested DNS names, be valid for server authentication, and chain to a
trusted CA on this machine. Install the PKI root and any intermediates using
your organization's procedures first; the script does not add PKI certificates
to the trusted root store. It exports the matching certificate and key as a
PFX, configures HTTPS, and continues deployment. Verify trust from clients and
the availability of intermediate certificates. The pending key and request
state are removed after a successful deployment; retain the CSR and resume
instructions until then. An abandoned request leaves a machine private key
named OTBackup-CSR-<id> that an administrator must remove separately.
To discard an abandoned request, use its 32-character folder name as $id
and remove that specific machine key:
$id = '<request-id>' $key = [System.Security.Cryptography.CngKey]::Open( "OTBackup-CSR-$id", [System.Security.Cryptography.CngProvider]::MicrosoftSoftwareKeyStorageProvider, [System.Security.Cryptography.CngKeyOpenOptions]::MachineKey) try { $key.Delete() } finally { $key.Dispose() }
Upgrade
Replace previous Setup.ps1 upgrade commands with Upgrade.ps1. The upgrade
script updates installed core services and installs missing core services.
An installed optional integration is upgraded when its archive is available;
install a new optional integration explicitly with -AppName.
The script validates selected packages before stopping services and removes
application directories before extracting the new release. Existing
appsettings*.json files are automatically saved to a unique, access-restricted
Configuration-<timestamp>-<id> directory under BackupPath and restored
after extraction. Newly installed services do not receive old configuration.
When an upgrade includes the API, setup stops it and backs up the Data
Protection recovery set before removing files. Each snapshot is stored in a
new DataProtection-<timestamp>-<id> directory under BackupPath; setup
restricts it to the current account, administrators and SYSTEM. The default
backup location is RootPath\Files\Config backups. A missing Data Protection
directory is skipped; an incomplete set or failed copy stops the upgrade.
Backup paths and recovery-set contents cannot contain symbolic links or
junctions. A failed copy may leave a protected .partial directory for review;
it is not a complete recovery set.
Back up the application database and configuration separately, and keep a protected copy of the Data Protection snapshot and its configured PFX password off the host. If multiple hosts share the key ring, stop all other writers before the snapshot. Setup does not automatically restore the key ring or protection certificate. Keep the configuration snapshot, including machine-specific files containing the API key, in protected storage:
.\Upgrade.ps1 ` -SourceBasePath 'C:\Install\TRUE OT Backup\drop-2026.07.0'
The upgrade automatically snapshots and restores configuration for existing
services. The previous -SaveConfiguration and -RestoreConfiguration
switches are no longer supported; update any scripts that used them.
An unfinished upgrade certificate request made with -RestoreConfiguration
cannot be resumed; start a new request instead. The old request and its machine
private key remain on the host and require secure cleanup.
Keep the backup until the system and integrations are verified. Do not rotate the API key during an upgrade unless all integrations are updated together.
To update one service, add -AppName 'OTB API' (or OTB UI, OTB Queue,
OTB TEE) and confirm compatibility with the other installed services first.
Uninstall
Run .\Uninstall.ps1 as Administrator to remove installed services listed in
the manifest, including installed integrations. Add -AppName 'OTB API' to
remove just one. Specify -DestinationPath if the installation is not in the
default location. Application directories are removed; the shared Data
Protection, certificate, backup and log directories are left in place. Back up
any data you need before uninstalling.
Verify the installation
Confirm the services are running:
Get-Service 'OTB API', 'OTB UI', 'OTB Queue', 'OTB TEE'
- Check the API log for startup and migration, and the Queue and TEE logs for connectivity.
- Open the UI over HTTPS, sign in, and confirm it can load data from the API.
- Test backup storage and run a controlled test job through the TEE.
- Verify each installed integration and confirm logs are being written without secrets.
Record the version, paths, service accounts, URLs, database servers, certificate expiry and backup location in the site's handover. Do not record secret values.