Migration to Docker fails

I am running version 6.10. This is the error I am receiving

Bootstrapping DB…
unexpected character “}” in variable name near “}\nDATABASE_PASSWORD="RK87TiHG"\nDEFAULT_ADMIN_PASSWORD="nMx12G1"\n”

Can you paste your $HOME/.firezone/.env? Looks like you may have a typo with a swapped } and " characters.

EXTERNAL_URL=“https://vpn.lfppa.com
ADMIN_EMAIL=“firezone@localhost”
GUARDIAN_SECRET_KEY=# redacted
DATABASE_ENCRYPTION_KEY=# redacted
SECRET_KEY_BASE=# redacted
LIVE_VIEW_SIGNING_SALT=# redacted
COOKIE_SIGNING_SALT=# redacted
COOKIE_ENCRYPTION_SALT=# redacted
DATABASE_NAME=“firezone”
DATABASE_HOST=postgres
DATABASE_PORT=5432
DATABASE_POOL=“10”
DATABASE_SSL=“false”
DATABASE_SSL_OPTS=“{}”
DATABASE_PARAMETERS=“{}”
EXTERNAL_TRUSTED_PROXIES=“[]”
PRIVATE_CLIENTS=“[]”
WIREGUARD_PORT=“51820”
WIREGUARD_DNS=“1.1.1.1, 1.0.0.1”
WIREGUARD_ALLOWED_IPS=“0.0.0.0/0, ::/0”
WIREGUARD_PERSISTENT_KEEPALIVE=“0”
WIREGUARD_MTU=“1280”
WIREGUARD_ENDPOINT=“40.130.56.6”
WIREGUARD_IPV4_ENABLED=“true”
WIREGUARD_IPV4_MASQUERADE=“true”
WIREGUARD_IPV4_NETWORK=“10.3.2.0/24”
WIREGUARD_IPV4_ADDRESS=“10.3.2.1”
WIREGUARD_IPV6_ENABLED=“true”
WIREGUARD_IPV6_MASQUERADE=“true”
WIREGUARD_IPV6_NETWORK=“fd00::3:2:0/120”
WIREGUARD_IPV6_ADDRESS=“fd00::3:2:1”
DISABLE_VPN_ON_OIDC_ERROR=“false”
SECURE_COOKIES=“true”
ALLOW_UNPRIVILEGED_DEVICE_MANAGEMENT=“true”
ALLOW_UNPRIVILEGED_DEVICE_CONFIGURATION=“true”
OUTBOUND_EMAIL_FROM="firezone@lfppa.com"
OUTBOUND_EMAIL_PROVIDER=“smtp”
OUTBOUND_EMAIL_CONFIGS=“{"smtp":{"relay":"smtp.example.com","port":587,"username":"","password":"","ssl":true,"tls":"always","auth":"always","no_mx_lookup":false,"retries":2},"mailgun":{"apikey":null,"domain":null},"mandrill":{"api_key":null},"sendgrid":{"api_key":null},"post_mark":{"api_key":null},"sendmail":{"cmd_path":"/usr/bin/sendmail","cmd_args":"-N delay,failure,success"}}”
AUTH_OIDC_JSON=“{}”
LOCAL_AUTH_ENABLED=“true”
MAX_DEVICES_PER_USER=“10”
CONNECTIVITY_CHECKS_ENABLED=“true”
CONNECTIVITY_CHECKS_INTERVAL=“3600”
TLS_OPTS=tls {
on_demand
}
DATABASE_PASSWORD=# redacted
DEFAULT_ADMIN_PASSWORD=# redacted

Issue persists with version 0.6.11

@wms8688 Thanks for the update. Upgrading doesn’t touch your .env file, so you’ll need to fix it manually.

Simply wrap the value for TLS_OPTS in double-quotes, like the rest of the variables. Like so:

...
TLS_OPTS="tls {
on_demand
}"
...

Manually editing the .env file does not work because the script creates a new .env every time.

What I did is download the script then edit line 172

changed
echo “TLS_OPTS=$tlsOpts” >> $installDir/.env
to
echo “TLS_OPTS=\”$tlsOpts\“” >> $installDir/.env

The modified script completed the migration successfully.

Thanks for the fix! I must have overlooked that in the migration script. Should be fixed now.