Back

[CLOSED] Forget Password and No SMTP Setup

  • 0
  • Self Hosted
  • Accounts
  • Web
Suiii
26 Aug, 2023, 05:30

How to recovery password if I forget it and didn't setup the SMTP in self-hosting

TL;DR
Title: [CLOSED] Forgot Password and No SMTP Setup - User followed a video tutorial on mailgun but emails are not being sent out. - User is now able to reset their password and sees the reset link in the log. - Solution: 1. Navigate to the appwrite directory. 2. Edit the `.env` file and change the value of `_APP_SMTP_HOST` to any truthy value. 3. Restart the appwrite containers. 4. Trigger the Forgot Password function from the login screen and check the logs for the generated email with the reset link. - Another
Drake
26 Aug, 2023, 06:35

Trigger the forgot password and then check the docker logs for the appwrite-worker-mails container for the url. You might have to set the SMTP host env var to some non empty string

Suiii
26 Aug, 2023, 08:05

SMTP Error: Could not connect to SMTP host.

Suiii
26 Aug, 2023, 08:06
safwan
26 Aug, 2023, 10:13

This looks like the output of docker compose exec appwrite doctor

safwan
26 Aug, 2023, 10:19

What you need to do is

Step 1

Make sure you're in the appwrite directory where the docker-compose.yml stays by doing

TypeScript
$ cd appwrite

Step 2

Edit the .env file in the appwrite directory.

TypeScript
$ nano .env

Step 3

Change the value of _APP_SMTP_HOST to any truthy value

TypeScript
_APP_SMTP_HOST=abc

Step 4

Restart appwrite containers to use the new environment variables by doing

TypeScript
$ docker compose up -d

P.S. Make sure you're in the appwrite directory

Step 5

Trigger the Forgot Password from the login screen, and then check the logs for the container by doing

TypeScript
docker logs appwrite-worker-mails

You should then see the email that was generated, which will include the link to reset the password. Copy it, and reset your password.

Suiii
26 Aug, 2023, 10:26

I can see the reset link in log

Suiii
26 Aug, 2023, 10:27

And able to reset now

Suiii
26 Aug, 2023, 10:27

But it won’t send email out

Suiii
26 Aug, 2023, 10:27

I followed the video of mailgun created by community

hamed
27 Aug, 2023, 00:30

This is a separate story. Since your issue has been resolved, you should create another post.

safwan
27 Aug, 2023, 05:46

[CLOSED] Forget Password and No SMTP Setup

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