Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task done
holow29 opened this issue Mar 7, 2025 · 3 comments
Closed
1 task done
Labels
bug bw-unified-deploy An Issue related to Bitwarden unified deployment

Comments

@holow29
Copy link
Contributor

holow29 commented Mar 7, 2025

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.
@holow29 holow29 added bug bw-unified-deploy An Issue related to Bitwarden unified deployment labels Mar 7, 2025
@holow29 holow29 closed this as completed Mar 8, 2025
@gruffatremi
Copy link

Did you fixed the issue ?
I tried to update recently my onprem bitwarden and I have the same issue and I can't fix it

@holow29
Copy link
Contributor Author

holow29 commented May 17, 2025

@gruffatremi In my case, I had messed up my installation ID and it was being read as null, so that was my error.

@gruffatremi
Copy link

Yhea it happened my installation ID was 0000, so I just generated new ID and it worked out well
I still wonder how it was wroking before ahhaha

Thanks for the help !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bw-unified-deploy An Issue related to Bitwarden unified deployment
Projects
None yet
Development

No branches or pull requests

2 participants