Skip to content
Back

appwrite.json - "variables" not deploying

  • 0
  • Self Hosted
walbob
22 Jul, 2025, 21:01

Hi, I have self-hosted Appwrite v1.7.4 and the latest Appwrite CLI. I cannot get the "variables" in the appwrite.json to deploy. I am using this format:

TypeScript
        "path": "functions/my-node-function",
        "variables": {
            "API_KEY": "your-secret-api-key",
            "DATABASE_URL": "your-database-connection-string",
            "NODE_ENV": "production"
        }

So, yes, specifying the variables as an object and not an array. Everything else from the appwrite.json deploys fine.

I have seen that this was previously a bug reported by others. Has the bug been reintroduced?

I am using Node.js v22.0 and JavaScript for functions (Node 22 support added in the Appwrite, self-hosted docker .env file)

As a workaround, I have set the variables in the Project Settings - Global variables, which then apply to all functions, but I would like to set these granularly per function on initial deployment (without subsequently applying variables with the CLI and needing another deployment to apply them).

Have I missed anything by chance?

TL;DR
Appwrite has stopped supporting the "variables" section in appwrite.json files starting from version 8.2.1. Developers should now set variables in the Project Settings - Global variables or use CLI to apply them granularly per function.
Kenny
22 Jul, 2025, 21:06

I don't think this is how variables should be deployed? Looking here in the docs it's far different.

https://appwrite.io/docs/tooling/command-line/functions#appwritejson

walbob
22 Jul, 2025, 21:24

Thanks, I missed that as I was looking in the docs under functions and older support posts. I'll give that format a try.

Steven
22 Jul, 2025, 21:28

As of 8.2.1, vars in the appwrite.json are no longer supported

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more