# Edit SMTP username

**URL:** https://meta.discourse.org/t/edit-smtp-username/91013
**Category:** Support
**Created:** [June 29, 2018, 3:31am UTC](https://meta.discourse.org/t/edit-smtp-username/91013 "2018-06-29T03:31:10Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![tyraniczar](https://avatars.discourse-cdn.com/v4/letter/t/f1d935/32.png) [@tyraniczar](https://meta.discourse.org/u/tyraniczar)
#### Post date: [June 29, 2018, 3:31am UTC](https://meta.discourse.org/t/edit-smtp-username/91013/1 "2018-06-29T03:31:10Z")

</div>

Hey all,

I’ve tried running both: /containers/app.yml and ./discourse-setup to fix my SMTP username but neither seem to work for me

 ![03%20PM](https://global.discourse-cdn.com/meta/original/3X/c/4/c4399f9eb903ada5e8f214cfb23963bde36ebc67.png)and instead send me to the attached error page.

What am I doing wrong?

---

<div class="post-metadata">

### Author: ![mpalmer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mpalmer/32/45740_2.png) [@mpalmer](https://meta.discourse.org/u/mpalmer)
#### Post date: [June 29, 2018, 3:32am UTC](https://meta.discourse.org/t/edit-smtp-username/91013/2 "2018-06-29T03:32:01Z")

</div>

Those are command-line paths, not HTTP resource paths.

---

<div class="post-metadata">

### Author: ![tyraniczar](https://avatars.discourse-cdn.com/v4/letter/t/f1d935/32.png) [@tyraniczar](https://meta.discourse.org/u/tyraniczar)
#### Post date: [June 29, 2018, 3:40am UTC](https://meta.discourse.org/t/edit-smtp-username/91013/3 "2018-06-29T03:40:42Z")

</div>

> [@tyraniczar](#):
>
> /containers/app.yml

I had tried it in terminal and got the “no directory message” so I assumed it was a path in browser, sorry 😅  
Would you happen to know which directory I’m meant to run that command in?

---

<div class="post-metadata">

### Author: ![mpalmer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mpalmer/32/45740_2.png) [@mpalmer](https://meta.discourse.org/u/mpalmer)
#### Post date: [June 29, 2018, 3:42am UTC](https://meta.discourse.org/t/edit-smtp-username/91013/4 "2018-06-29T03:42:10Z")

</div>

`/var/discourse`, of course. Note that there is no leading slash on `containers/app.yml`, and that `./discourse-setup` is meant to be run, not edited.

---

<div class="post-metadata">

### Author: ![tyraniczar](https://avatars.discourse-cdn.com/v4/letter/t/f1d935/32.png) [@tyraniczar](https://meta.discourse.org/u/tyraniczar)
#### Post date: [June 29, 2018, 3:44am UTC](https://meta.discourse.org/t/edit-smtp-username/91013/5 "2018-06-29T03:44:50Z")

</div>

I’ve opened terminal, run /var/discourse and again “no directory”  
Do I need to cd into anything beforehand? Sorry

---

<div class="post-metadata">

### Author: ![schleifer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schleifer/32/86416_2.png) [@schleifer](https://meta.discourse.org/u/schleifer)
#### Post date: [June 29, 2018, 3:46am UTC](https://meta.discourse.org/t/edit-smtp-username/91013/6 "2018-06-29T03:46:49Z")

</div>

> [@mpalmer](#):
>
> `./discourse-setup` is intended to be run

&nbsp;&nbsp;

> [@tyraniczar](#):
>
> Do you happen to know which directory I should run that command in?

&nbsp;&nbsp;

> [@mpalmer](#):
>
> `/var/discourse`, of course.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [June 29, 2018, 3:50am UTC](https://meta.discourse.org/t/edit-smtp-username/91013/7 "2018-06-29T03:50:24Z")

</div>

How did you install discourse?

Those instructions have you

```
 cd /var/discourse 
 ./discourse-setup

```

Unless you did something else to install

---

<div class="post-metadata">

### Author: ![tyraniczar](https://avatars.discourse-cdn.com/v4/letter/t/f1d935/32.png) [@tyraniczar](https://meta.discourse.org/u/tyraniczar)
#### Post date: [June 29, 2018, 3:53am UTC](https://meta.discourse.org/t/edit-smtp-username/91013/8 "2018-06-29T03:53:40Z")

</div>

I used the DO tutorial: [Discourse | DigitalOcean Marketplace 1-Click App](https://www.digitalocean.com/community/tutorials/how-to-use-the-discourse-one-click-application-on-digitalocean)

I don’t recall ever cd’ing into /var/discourse

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [June 29, 2018, 1:28pm UTC](https://meta.discourse.org/t/edit-smtp-username/91013/9 "2018-06-29T13:28:41Z")

</div>

Either search here for the install instructions or all digital Ocean for help.

---

<div class="post-metadata">

### Author: ![rorycb](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rorycb/32/423647_2.png) [@rorycb](https://meta.discourse.org/u/rorycb)
#### Post date: [June 29, 2018, 2:09pm UTC](https://meta.discourse.org/t/edit-smtp-username/91013/10 "2018-06-29T14:09:59Z")

</div>

@tyraniczar I believe the DO one-click install uses Docker containers. Does this thread [https://meta.discourse.org/t/how-do-i-change-my-smtp-settings-discourse-docker-install/20067](https://meta.discourse.org/t/how-do-i-change-my-smtp-settings-discourse-docker-install/20067) help you out? I don’t have an instance setup on DO at the moment to try it myself.

note: always make sure you create a snapshot of your droplet before playing with any settings so you have something to revert to if things go wrong 🙂

---

<div class="post-metadata">

### Author: ![tyraniczar](https://avatars.discourse-cdn.com/v4/letter/t/f1d935/32.png) [@tyraniczar](https://meta.discourse.org/u/tyraniczar)
#### Post date: [June 29, 2018, 4:08pm UTC](https://meta.discourse.org/t/edit-smtp-username/91013/11 "2018-06-29T16:08:44Z")

</div>

Nothing has worked so far. Opened a ticket with DO

---

<div class="post-metadata">

### Author: ![rorycb](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rorycb/32/423647_2.png) [@rorycb](https://meta.discourse.org/u/rorycb)
#### Post date: [June 29, 2018, 4:20pm UTC](https://meta.discourse.org/t/edit-smtp-username/91013/12 "2018-06-29T16:20:03Z")

</div>

What version of discourse do you have installed? I am new to Discourse (using Meta to learn it better 🙂 ), but not to DO - I’ve been using them for a couple of years. I might be able to find a couple minutes on my lunch to spin up a Discourse droplet and see if I can help you figure it out.

---

<div class="post-metadata">

### Author: ![tyraniczar](https://avatars.discourse-cdn.com/v4/letter/t/f1d935/32.png) [@tyraniczar](https://meta.discourse.org/u/tyraniczar)
#### Post date: [June 29, 2018, 4:33pm UTC](https://meta.discourse.org/t/edit-smtp-username/91013/13 "2018-06-29T16:33:29Z")

</div>

I’m on 2.1.0.beta2 but there’s really no need to waste your lunch on this lol. I was able to access the Ubuntu server via ssh and I ran ./discourse-setup and changed the username but my emails still aren’t being delivered. I guess there’s another issue. Attached is a screenshot of my email config. Is anything missing/incorrect?

 ![50%20AM](https://global.discourse-cdn.com/meta/original/3X/6/f/6f3853ec83cb9782a97ef1ac3d3012ca04e4554b.png)

---

<div class="post-metadata">

### Author: ![rorycb](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rorycb/32/423647_2.png) [@rorycb](https://meta.discourse.org/u/rorycb)
#### Post date: [June 29, 2018, 4:44pm UTC](https://meta.discourse.org/t/edit-smtp-username/91013/14 "2018-06-29T16:44:56Z")

</div>

Not a waste, curious at heart. But sounds like you are having a different issue than I thought. While I assume you have already found it - it looks like [Configure Mailgun for email when using Digital Ocean for DNS](https://meta.discourse.org/t/connecting-mailgun-with-digital-ocean/40590) deals with your exact combination of setup MailGun + Digital Ocean - though there is a bit to wade through in the discussion. My best guess is after changing the mail config you didn’t reload (./launcher rebuild app)?

edit: actually the last reply may be the most useful to you? [Configure Mailgun for email when using Digital Ocean for DNS - #23 by pfaffman](https://meta.discourse.org/t/connecting-mailgun-with-digital-ocean/40590/23) have you tried using port 2525?

---

<div class="post-metadata">

### Author: ![tyraniczar](https://avatars.discourse-cdn.com/v4/letter/t/f1d935/32.png) [@tyraniczar](https://meta.discourse.org/u/tyraniczar)
#### Post date: [June 29, 2018, 6:39pm UTC](https://meta.discourse.org/t/edit-smtp-username/91013/15 "2018-06-29T18:39:59Z")

</div>

Haha thanks, you are all super helpful. I’ve done the reload twice. I’ll try port 2525 next

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [June 29, 2018, 7:45pm UTC](https://meta.discourse.org/t/edit-smtp-username/91013/16 "2018-06-29T19:45:47Z")

</div>

Now that I’m not on my phone, I can say that [discourse/docs/INSTALL-cloud.md at main · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md) is what you should do to install.

It’s not clear that your port is being blocked, but I always install using port 2525 because Digital Ocean does block outgoing SMTP for lots of their clients and which ones and why is apparently a trade secret.

---

<div class="post-metadata">

### Author: ![tyraniczar](https://avatars.discourse-cdn.com/v4/letter/t/f1d935/32.png) [@tyraniczar](https://meta.discourse.org/u/tyraniczar)
#### Post date: [June 29, 2018, 8:26pm UTC](https://meta.discourse.org/t/edit-smtp-username/91013/17 "2018-06-29T20:26:56Z")

</div>

Thanks, I don’t know if re-installing it would work though. I’ve been able to access and edit my SMTP info via ssh and I ensured that its the same as what I’m using in Discourse. I’ve tried port 2525 and 587 but my emails still aren’t being delivered. Still waiting on ticket @ DO 😪

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [June 29, 2018, 8:31pm UTC](https://meta.discourse.org/t/edit-smtp-username/91013/18 "2018-06-29T20:31:18Z")

</div>

Next is to check the mail logs of the mail service.

---

<div class="post-metadata">

### Author: ![tyraniczar](https://avatars.discourse-cdn.com/v4/letter/t/f1d935/32.png) [@tyraniczar](https://meta.discourse.org/u/tyraniczar)
#### Post date: [June 29, 2018, 8:33pm UTC](https://meta.discourse.org/t/edit-smtp-username/91013/19 "2018-06-29T20:33:35Z")

</div>

My logs @ Mailgun are empty lol.

Im thinking that the original problem was that my username credential in Discourse was the default [user@example.com](mailto:user@example.com) while the username credential in Mailgun was the correct one. The screenshot is from the tutorial you sent over. Could that have permanently broken email?

 ![09%20PM](https://global.discourse-cdn.com/meta/original/3X/b/7/b78c8c5e3806222d58739c6a2122ce5608ebad92.png)

---

<div class="post-metadata">

### Author: ![maheshmnj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/maheshmnj/32/186064_2.png) [@maheshmnj](https://meta.discourse.org/u/maheshmnj)
#### Post date: [November 16, 2020, 3:27pm UTC](https://meta.discourse.org/t/edit-smtp-username/91013/20 "2020-11-16T15:27:46Z")

</div>

you need to run /discourse-setup located in the location where you have clones the discourse application for me I have clones it inr /var/disourse/ so I did  
`cd /var/discourse`  
`/discourse-setup`

this will stop the existing discourse container and then ask the new configuration once everything is set it will rebuild the application
