Configuring domain name and DNS

(Matt) #1

I have Discourse set up on Docker. I can send the activation email and I receive it fine. The link takes me to my site but the site url is broken. It’s configured to be:

Digital Ocean says the domain is active.

I’m able to access the site via the IP address but of course I cannot activate the initial Admin account.

IP is:

Please help!

(Matt) #2

Actually, can you confirm if I’ve done something totally dumb?

I configured Discourse to be at discourse.yciw.COM. I also set up my Droplet to be discourse.yciw.COM.

However, I do not own the domain yciw.COM. I own the domain yciw.NET

Should I have set both the Droplet and Discourse to be for yciw.NET?

thank you

(axil) #3

Yes, use .net in both DO and Discourse. Once you do it rebuild the image.

(Matt) #4

Thanks! Do you happen to know if there is a way to edit my Droplet URL on Digital Ocean or do I need to delete it somehow and create a new one. Which I think would give me a different IP address and I’d have to start the whole process over…
(I’ve submitted a ticket with them but I’m waiting to hear back)

(axil) #5
  1. Click on your droplet
  2. Select Settings
  3. Click on Rename

(James Milligan) #6

You can rename a droplet on DO, just go to the Settings for your droplet, and then the Rename tab. This won’t affect anything on the box, but it will update the PTR record.

You’ll need to rebuild your Discourse instance after editing the configuration file too.

(Matt) #7

Thank you. I made the name change on DO and then rebuilt the Discourse instance after editing it to reflect the correct URL.

I now get a page not found error.

As you say the name change is only for show. Do I need to change the name on a deeper level in DO somehow?

thank you!

(axil) #8

Have you set up the CNAME/A record in your registrar?

(Matt) #9

I’m not sure what that is so I don’t think I have…

(Matt) #10

Digital Ocean said:
"To update the hostname inside the droplet run the following command via SSH or console and replace with your name:

hostname your_name_here "

I tried doing this but I’m not sure what effect it had or if I executed it correctly. I’m definitely a newbie.

(axil) #11

You have to know who owns Where did you buy it from? Usually you are provided with a user interface where you can change these settings and add the subdomains to point to the ip of your DigitalOcean droplet, like

(Matt) #12

Sorry for the confusion. I own and I’ve used Digital Ocean to create a droplet to host Discourse.

I’m having trouble changing the hostname.

I run the command in ssh as follows:


When I look at the /etc/hostname file it still says

(axil) #13

Ask or search the support where you bought the domain. They should tell you how to add an A record to your domain Something like:

Host: discourse
Record Type: A

(Matt) #14

Thanks. I’m still stuck on trying to fix the mistake I made when setting up the droplet with the wrong url.
Trying to edit it reflect

DO wants me to edit this file:

vi /etc/hostname

I don’t really know how to do that.

(axil) #15

Do you know how to ssh in your machine? These are basic steps. Read Frequently Asked Questions and

(Matt) #16

Ok, I think I did it using nano.

I went to nano /etc/hostname and made the edit.

I saved it but I still get an error when I load

(Matt) #17

The edit has now been correctly configured in the droplet. (

site still does not load

The Discourse set up guide does not mention anything about having to add subdomains to point to the Digital Ocean server. Is this just a common step that I should do…?

(Matt) #18

Ah, I see the directions now. Sorry! I need to set up the DNS on Digital Ocean.

(Jeff Atwood) #19

Incorrect, you need to set up the dns with your domain name registrar, the place where you bought the domain name. Unless you bought that domain name from digital ocean…

Also @lake54 the droplet name is not just for show: it changes the reverse ptr record for the ip address. Granted since we tell people to use Mandrill for email this will not affect much but it should be correct, e.g. have the correct domain name.

(Kane York) #20

For future reference, you should have edited that file with sudoedit. sudoedit will save a backup copy, and only overwrite the file if the editor exits normally (I think).

# sudoedit /etc/hostname
("Please pick an editor")