Hey, I set up the default discourse on a linux machine using this guide. It went super smoothly, and the site came up perfectly.
I decided to allow users to connect via facebook, so I went through the facebook instructions linked to from the above link (I’d link again but new users can only post 2 links apparently). That ended up not working, but the site was still up and running (I don’t remember the error I got when trying to log in via facebook).
While going through the facebook docs I saw something about needing to have https enabled, so I started going through these docs.. That all went well until the ./launcher rebuild app, where I got a postgres error. Which surprised me, because I hadn’t done anything to the postgres config (to the best of my knowledge). The first error is below:
INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
rake aborted!
PG::ConnectionBad: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
I didn’t stop the postgres service, but I tried running service start postgres and it said it wasn’t installed. So I assume it’s installed automatically some other way than I’m used to. Any ideas on what I could have done wrong? Thanks
Yes, that’s correct. And those are the instructions I followed. I did move to the facebook login connect guide first, but I am doubtful that that’s the issue. I went through the guide that you posted, and moved on to https, and now I’m having the issues listed above.
Ok, well when I finished the first guide, the site was up, but it wasn’t https. I assumed it wouldn’t be https until I enabled it. I’ll go back through the instructions, maybe I didn’t understand something, then I’ll report back.
Ok, I got the app back up, but I don’t see anywhere in these instructions that could possibly setup the site as https as there’s nowhere that involves a cert other than the Let’s Encrypt method at the bottom. What am I missing? Can you point me to where exactly in those instructions it would set up https?
I bet I hit ENTER to skip and didn’t even realize it. If that’s the case, would it just be best to re-run the config, or go through the let’s encrypt instructions. Keeping in mind, I have a little bit of content on the site right now and I don’t want it wiped. (Thanks again for your help)
I think so. I’m pretty experienced working on servers, but I haven’t been very active since Let’s Encrypt came out, so I just assumed that there would be a section on getting a cert in the documentation if that was something that would work out of the box. Since there wasn’t, I assumed I would have to do it in another step. There’s nothing on that page that evens mentions Let’s Encrypt except for the output from the ./disource-setup command. Maybe mention under the Edit Discourse Configuration (before the command) mention that if you want https, then you’ll have to put something in the Let’s Encrypt field. I knew to look on that page for https, but there were not https string matches (when I ctrl+f), so I assumed it wasn’t there. I searched for “https” and “cert”, and since it wasn’t there, I assumed it was separate.
And honestly, if I worked on website hosting more frequently, I probably would have seen Let’s Encrypt and immediately known what was going on. Maybe if there was a “what you’ll need” section, that included an email associated with Let’s Encrypt?
I don’t want this to come off as insulting, the documentation is great, and it was human error (my human error) that caused my issue.
I can’t tell if you couldn’t see the rest of my response, but maybe I’ll just put in a PR with the fixes I think would be good. But really just mentioning that the docs have certs handled would be good.
Ah,! So the install cloud doc doesn’t make it clear? That sounds right.
I’ll have a look at the language at discourse-setup to see if it should make it clearer just what let’s encrypt is. It’s true that it shouldn’t assume that the user knows.