Skip to main content
Environment Variables are persistent variables that are available across your entire workspace. Typically, these are used to store things like external API keys or other sensitive information that you need to use across multiple function stacks, without storing it in a database table.

Adding Environment Variables

1

From the left-hand navigation, click Settings

2

On the next screen, click 'Manage' to edit your environment variables

3

Click '+ Variable' to add a new environment variable.

Give your environment variable a name that you can easily recognize; this is how you’ll identify it when calling it in function stacks.Provide a value for the variable.
Environment variables can only be updated from your workspace settings.
4

Use environment variables in your function stacks

They’ll be available in the dropdown under ENV

Xano-generated Environment Variables

Xano maintains several environment variables you can use.
Variable NameContents
$remote_ipContains the IP address the request came from
$http_headersContains the headers of the request
$request_uriContains the URL of the request
$request_querystringContains any URL parameters attached to the request URL
$datasourceContains the datasource the request is targeting
$branchContains the branch the request is targeting
$request_methodContains the request method (GET, POST, DELETE, etc…)
I