How to set custom environment variables?

When immigrating an app from develop to production, I could find many different settings, such as the linking address, each time I have to modify them one by one, which is annoying and quite easy to make mistakes. Can I set them as variables, so that the develop and production can share the same page with different settings? Or are there any other ways to solve it? Thanks!

Hi @Daniel_Wu

Thanks for reaching out! We currently have this feature available in Private Beta.

It allows you to define a variable for each Retool environment & then you can reference those env vars in your resource set up.

You could create the same env var that has different values in staging vs production. Then, you only have to reference the env var in your resource & it'll update according to which environment the user is in when they access the app

Do you think that would be helpful for your use case? If so, is it on shoplazza.retool.com? I can add your team to the private beta.

Here's some screenshots for an example.

In the environments set up (same for staging & production, except that the value of testvariable in production is "prod"):

In the resource (same set up for staging & prod):

In the app:

Vs when in staging:

Thanks! I think that's the feature we need, but since we are self-hosted, do I need to upgrade the current version of retool? If so, which version should I select? Thanks.

Hi @Daniel_Wu My apologies! I didn't realize you had an on premise instance. You only need to be on v2.95+. Since it's in Private Beta, it's not available by default, but I went ahead and added the feature flags to your instance.

You should see the feature upon restarting your containers

Let me know if any questions come up

Thanks in advance, I will have a try.

Hi Tess,

I am on a cloud instance of retool.

Would it be possible to be added to this beta?

I would really like to be able to rotate API keys quickly with an environment variable for my API call authorization.

Many thanks!

@Tess Can we get this added to our account as well?

Hi @Amar_Desai and @Ryan_Brennan added for both of your Retool orgs!

Hi Tess

Can you please add this feature to my account as well?

Thanks
BR
Ahmad

@Ahmad_Tantawy done! :white_check_mark:

Hello Tess

This feature will help us a lot.
Could you add it to our account ?
browserless.retool.com

thanks

@Adrian_Antonio_Molina Done!

1 Like

Hi @Tess would it be possible to get this added to my org? https://dustlabsx.retool.com

Hello Tess, how you enabled to self hosting instance?

Hi @agregis Added!

@zeroray, I was able to find your org from your email & add the flags. Since you're self-hosting, you'll see the feature available when the next automated license check occurs (they happen every ~6hrs) or when you restart your containers

Let me know if either of you run into any issues

1 Like

Hi Tess,

Can we also get access to the environment variables features in our org

Thank you

Added! @Isaac_Markus

@Tess Could you please add it also to my instance?