Skip to content

Change in v2025.2.1-beta to using globalSettings vs. BW_ env variables? #5479

@holow29

Description

@holow29

Steps To Reproduce

  1. Set up server with installation ID set as BW_INSTALLATION_ID in settings.env.
  2. Start server

Expected Result

Server (and services) starts without error.

Actual Result

Every service does not start with error:

Unhandled exception. System.InvalidOperationException: Installation Id must be set for self-hosted installations.
   at Bit.SharedWeb.Utilities.ServiceCollectionExtensions.AddDefaultServices(IServiceCollection services, GlobalSettings globalSettings) in /source/src/SharedWeb/Utilities/ServiceCollectionExtensions.cs:line 287
   at Bit.Admin.Startup.ConfigureServices(IServiceCollection services) in /source/src/Admin/Startup.cs:line 90
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)
   at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.InvokeCore(Object instance, IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.UseStartup(Type startupType, HostBuilderContext context, IServiceCollection services, Object instance)
   at Microsoft.Extensions.Hosting.HostBuilder.InitializeServiceProvider()
   at Microsoft.Extensions.Hosting.HostBuilder.Build()
   at Bit.Admin.Program.Main(String[] args) in /source/src/Admin/Program.cs:line 9

Screenshots or Videos

No response

Additional Context

There has always been a disconnect between the globalSettings and the unified-specific env variables defined here (starting with BW_): https://bitwarden.com/help/install-and-deploy-unified-beta/

Has something changed with how these unified-specific settings are treated? What is the proper migration to globalSettings if so?

Githash Version

N/A

Environment Details

No response

Database Image

No response

Issue-Link

#2480

Issue Tracking Info

  • I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugbw-unified-deployAn Issue related to Bitwarden unified deployment

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions