
I need to automate the deploymnet/recreation of appwrite and need a way to create automatically the administrator of AppWrite using the CLI.
I tried to check the config files, .env and everything I saw around, also inspected the appwrite-cli but apparently the only way to create the administration user (the very first account) is only possible with the webpage.
How can I do that?

Even the Appwrite Console uses Appwrite's APIs. So, you can look at the network traffic to see what requests are made and then manually make those network requests with curl or whatever you prefer

so I guess there is no CLI command for that, and the recommendation is to use the (undocumented?) API... @Steven is it reliable and stable to trust not to change in future versions?

What do you mean by undocumented APIs? All the APIs are documented. For example: https://appwrite.io/docs/server/databases?sdk=dart-default

To my knowledge, there’s no (documented) API for managing Console users? Or is the Console it’s own Project, and @Victor can just use the regular Users API?

Yes, it's the same API but for the console project

what I mean is that there is no pointer on how to create the very first user, the admin

and I found no pointer nowhere on how to create the organization it belongs to, which is apparently part of the teams API already

e.g to create anew admin I needed to use v1/account
and assign to it on a team with a POST to v1/teams
using the cookie. If I repeat the operation no proper error is coming, just a 500 saying Server Error etc

additionally, console is not accessible from the cli, and with rest... basically I did login and reused the cookie

(and observed the interactions on the browser)

What do the docker logs for the appwrite container say for the 500 error?

It should be accessible 🧐

should retry next week

still now, to find out how to upload variables to each function apparently the way to go is to inspect which REST API is using the web and copy it to my scripts, but would have been nicer to be in the appwrite.json etc...

would be any use for the appwrite team to report such things?

For function variables, you should add it in your appwrite.json and use the CLI to deploy: https://appwrite.io/docs/command-line-deployment#configurable-options
As for the API, that's documented here: https://appwrite.io/docs/server/functions?sdk=nodejs-default#functionsCreateVariable

not sure how I missed that... will test asap
Recommended threads
- No mails from Appwrite
Hello, Since severals days, i have a problem : i d'ont received any mails from Appwrite. I'm using the auth by mail and i don't any code so any mails from App...
- Constant 404 Pages
Whenever I am navigating through items and pages to go through my collections and database I end up at a page that sends me a 404 error, if i refresh it remains...
- how many Teams can be created?
I am creating an app where I will let users create groups. This could mean there will be many groups created by user, to isolate those groups properly I am thin...
