Multiline environment variable

Is there a way to add a multiline environment variable to render? We’ve tried \n, single quote \n, and double quote \n with no luck so far.

Render doesn’t have direct support for multiline environment variables, but there’s a workaround with secret files. If you create a secret file called .my-multiline-env-var with contents:

line one
line two
line three

Then you can store it in an environment variable in your build and/or start scripts like so:

export FOO=$(cat .my-multiline-env-var)

@david, is it possible to enable double quotes for render environment variables? This would resolve the multi-line issue.

Hi @Tstepro, can you say more about how this would resolve the multi-line issue? It is already possible to put double quotes in a Render environment variable.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Render now supports multiline environment variables!

1 Like