Skip to content
Back

Appwrite CLI on localhost (MacOS)

  • 0
  • Self Hosted
  • Web
ConceptFusion
26 Feb, 2025, 00:06

I'm trying to use the CLI with a localhost instance on Appwrite running in docker desktop on MacOS and I'm not able to log in via the CLI. When I run appwrite appwrite login --endpoint "http://app.localhost/v1" --verbose I get the login prompt but when I enter my admin details it throws an error:

TypeScript
    at Client.call (/usr/local/Cellar/appwrite/6.2.0/libexec/lib/node_modules/appwrite-cli/lib/client.js:192:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async accountCreateEmailPasswordSession (/usr/local/Cellar/appwrite/6.2.0/libexec/lib/node_modules/appwrite-cli/lib/commands/account.js:1016:16)
    at async loginCommand (/usr/local/Cellar/appwrite/6.2.0/libexec/lib/node_modules/appwrite-cli/lib/commands/generic.js:57:9) {
  code: undefined,
  response: undefined```

I've googled and hunted through discord but can only find vague non-helpful references to the --endpoint flag and issues being resolved on cloud based self-hosted instances (Digital Ocean, AWS etc.).

Has anyone else here experienced or resolved this issue?
TL;DR
Developers trying to use Appwrite CLI on localhost (MacOS) might encounter login issues due to the lack of HTTPS on the endpoint. The fetch error appears when attempting to log in. To resolve this, use HTTPS instead of HTTP in the endpoint.
Steven
26 Feb, 2025, 00:13

could be a problem with not having HTTPS

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