[SOLVED] Error setting fly secret for database_url with ?sslmode=disable

Hi guys,

I am trying to set a fly secret for my postgres database url with sslmode=disabled.

flyctl secrets set DATABASE_URL=postgres://user:pass@host:5432/db?sslmode=disable

I get the following error:

zsh: no matches found: DATABASE_URL=postgres://user:pass@host:5432/db?sslmode=disable

setting the database_url secret without ?sslmode=enable works fine. However, when I do that, when deploying my application I get this error:

Error: P1011: Error opening a TLS connection: unexpected EOF

Any help is appreciated :slight_smile: Thank you!

You may need to add quotes around the db url as it contains ? -

flyctl secrets set DATABASE_URL="postgres://user:pass@host:5432/db?sslmode=disable"
1 Like

Awesome, that seems to have worked, thank you :slight_smile:

1 Like