
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:
"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?

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

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

As of 8.2.1, vars in the appwrite.json are no longer supported
Recommended threads
- Explore uploaded images directly from lo...
Is there any option to explore/dwonload uploaded files to from local machine? I connected through WinScp to my vps and to files from docker volume 'appwrite_app...
- Migrate Appwrite
I have appwrite setup in Coolify, where my dev and production both are running on coolify due to upgrade issues and multiple issues when deployed with coolify. ...
- After the new appwrite update, I am havi...
I am having difficulties with Creating and listing documents from appwrite database. It doesn't create the document or list the document from the database altho...
