Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Solved Cannot set environment variables

    N8N
    2
    7
    58
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      garza last edited by

      Hello everyone,
      I'd like to know what is the way to set custom env variables in this app.
      I tried setting them in the /app/data/env and restarting the app, but that didn't seem to work. Specifically, I exported N8N_BLOCK_ENV_ACCESS_IN_NODE as false (that should be the default), but still no luck.
      How could this be achieved?

      girish 1 Reply Last reply Reply Quote 0
      • girish
        girish Staff @garza last edited by

        @garza Did you put the export in the front? Like this:

        export N8N_BLOCK_ENV_ACCESS_IN_NODE=false
        
        G 1 Reply Last reply Reply Quote 0
        • G
          garza @girish last edited by

          @girish Yes, I put it that way, but that doesn't seem to work.

          girish 1 Reply Last reply Reply Quote 0
          • girish
            girish Staff @garza last edited by

            @garza Do other variables work ? Maybe try to change something which is easy to check and check if that works. How are you reproducing the issue ? I can check in a test installation and we can see if it's a package issue or upstream bug.

            G 1 Reply Last reply Reply Quote 0
            • G
              garza @girish last edited by

              @girish Yes, at least I tried with N8N_LOG_LEVEL to change it to the debug level and that worked without any problem.

              I'm testing the env updates the regular way, changing the /app/data/env (now /app/data/env.sh in today's app update) and restarting the app. Then, specifically for the N8N_BLOCK_ENV_ACCESS_IN_NODE flag, I'm testing in node fields that accept an expression, but still without access (please refer to the screenshot attached).

              9c76f151-b1f1-4c42-9406-ad92f86611fd-image.png

              girish 1 Reply Last reply Reply Quote 0
              • girish
                girish Staff @garza last edited by

                @garza Looks like this is a known issue. See https://community.n8n.io/t/no-access-to-env/20665/ . Using the environment variable will work it seems, just the preview in the UI does not work.

                G 1 Reply Last reply Reply Quote 0
                • Topic has been marked as solved  girish girish 
                • G
                  garza @girish last edited by

                  @girish Thank you, I can corroborate it works even if it's showing an error in the node field.

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Powered by NodeBB