How to best setup staging environment in Community Edition?

Hi Community,

I am currently using the self-hosted community edition of n8n.
In my current project, I am working with different environments for developing, staging and production for some applications I use.

However, for n8n I thought I don’t need that and just use one installation for both staging and production (won’t need it for local).

My intention was to use CustomAuth Credentials and setup the Token + URL per environment in separate credentials for staging and production - and then, in the flows just use whatever is needed.
Example:

The idea was to access these variables in a HTTP node by referencing them like this:

Unfortunately, this does not pull the values. They remain [undefined] in the flow and cannot be used for execution.

Is there any different workaround to use URLs and other fields (besides actual credentials) in CustomAuth credentials? Am I missing something?


I know there is a feature for multi-environments in n8n, but this requires an Enterprise License, which is simply not in the budget at this stage (my project is still in development and not live yet).

Happy about any tipps and recommendations. Maybe I’m overthinking this.

Hey! The URL can’t be stored for dynamic use like that on the community edition AFAIK. However, you could always create a simple DB or a Google Sheet for example that has all the URLs. You can start each workflow with getting the URLs from the DB, then using whichever one you need.

Hope this helps, feel free to mark it as solution if it did :slight_smile:

1 Like

That is actually a great idea. Thanks!

For the sake of completeness, I found another workaround:

  1. Store any variable, token, encryption key , etc. and .env variable of n8n installation
  2. Access in n8n flow using "a "Execute Command” node

e.g.
echo “$STAGING_URL”

1 Like

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