Self Host Format of the initialization string does not conform to specification starting

I am trying to self-host bitwarden following the instructions here Install and Deploy Manually | Bitwarden Help & Support and I am unable to bring up containers that depend on sql due to the following error:

Unhandled exception. System.ArgumentException: Format of the initialization string does not conform to specification starting at index 194.

With the following connection string (newlines added for readability):

Data Source=tcp:mssql,1433;
Initial Catalog=vault;
Persist Security Info=False;
User ID=sa;
Password=x;
MultipleActiveResultSets=False;
Connect Timeout=30;
Encrypt=True;
TrustServerCertificate=True

Looking at documentation from Microsoft SqlConnection.ConnectionString Property (System.Data.SqlClient) | Microsoft Docs
It appears that all of the keys and values are valid so Iā€™m not sure what the source of the error is.

Source: https://www.reddit.com/r/Bitwarden/comments/p3gz0w/connect_to_database_with_manual_install/

I had to go into bwdata/env and change the single quotes on globalSettings__sqlServer__connectionString to double quotes, seemed to fix it for me.

2 Likes