Discourse installation of Ubuntu

Hello Everyone. This is Discourse installation video on Ubuntu.

This not only deals with installation but also with debugging.

Known issues: This video is about Beginners’ guide to installing discourse on ubuntu along with Debugging.

Follow the link at :

Debugging: Step by step. Now we can try debugging at every step.

There are 6 places things can go wrong.

1) Dependencies are not installed properly.

Cause: These are because of the old version of dependencies installed.

Solution: You can individually install dependencies as per future requirements.

2) Bundle installs not working.

Cause: This is because either of the

→ Dependencies issue or that

→ You installed dependencies in a different user than this

→ You have not entered into discourse repository after cloning


→ Install required dependencies manually

→ Remember to use the same user for entire installation process.

→ cd discourse

3) Bundle rake create, bundle migrate error

Cause: This happens because of the mistake of not executing some commands while copy-pasting multiple commands

Solution: Execute one by one command rather than the entire set of commands

4) Bundle rec exec auto spec error

Cause : This happens because that discourse clone is newer than auto spec configuration.

Solution : Ignore this step and go for the next step. It is just a warning.

5) Couldn’t start discourse after installation

Cause : This is because of which we forgot to create the admin account

Solution : execute the rails_env= budle rails create:admin command


Hi @Sai_Likhith_K,

Thank you for your wonderful video! It has been very helpful and it was comforting to confirm that I had been doing this correctly.

However when I run

sudo -u postgres createuser -s “$USER”

I get

I thought that this might be because I already had postgres installed. So I uninstalled it and started the process all over again.

I still got the error. So then I installed postgres and still received the same error.

I have also tried this but I still cannot get my server running. It asks me for my postgres password, which since I uninstalled everything, I shouldn’t have to put in. Yet, even my would be password does not work.

If anyone has any recommendations please let me know. Thank you for your help in advance!

Hello @Melissa,

It looks like your postgresql has not been started. Try to start them with:

# start postgresql
 sudo service postgresql start

# start redis server
redis-server --daemonize yes

See, if you can run these commands and if it fixes the issue.

If you are using Ubuntu within your Windows machine via WSL, postgres and redis needs to be started manually after every reboot. The easy get around might be to create a script and auto-execute that script on Ubuntu boot-up.

Thanks, Bijay

1 Like

Thank you so much @bmaharjan! That fixed it. I had posted on the Discourse forums and asked this question, and no one seemed to know. I really appreciate it. Thank you!