Fresh install does not work



I’m trying to setup a fresh installation of Discourse, with a fresh installation of Docker. Never installed either before. I’m trying to do this on an Ubuntu 16.04.3 installation with 2GB of RAM (should be enough from what I’ve gathered).

I want to run this alongside nginx, so I follow the official guide on doing so (the only difference was nginx was already installed and Discourse not set up).

I’ve tried to rebuild it, bootstrap it and reinstall it multiple times to no avail. I’ve searched and found nothing so far that has solved my problem.

The final error message is as follows:

Pups::ExecError: cd /var/www/discourse && bash -c "ln    -s           /shared/log/rails/{production,production_errors,                                       unicorn.stdout,unicorn.stderr}.log /var/www/discourse/log" failed with return #<Process::Status: pid 6282 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:108:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"code", "cmd"=>["git reset --hard", "git clean -f", "git remote se                                       t-branches --add origin master", "git pull", "git fetch origin $version", "git checkout $version", "mkdir -p tmp/pids"                                       , "mkdir -p tmp/sockets", "touch tmp/.gitkeep", "mkdir -p                    /shared/log/rails", "bash -c \"touch -a                                                  /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr}.log\"", "bash -c \"ln    -s                                                  /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr}.log $home/log\"", "bash -c \"mk                                       dir -p           /shared/{uploads,backups}\"", "bash -c \"ln    -s           /shared/{uploads,backups} $home/public\""                                       , "chown -R discourse:www-data /shared/log/rails /shared/uploads /shared/backups"]}

Any help is appreciated. Thank you!

edit: I should add, I’m not using LetsEncrypt. Docker versions are as follows (from docker version): Version: 18.01.0-ce API version: 1.35


I believe you need to provide the whole logs as there should be more errors further up.


Here is what I have gathered from my terminal window. A lot of it was trash HTTP requests or emojis and not worth putting in here.

1. I, [2018-01-23T12:37:23.427322 #13]  INFO -- : &gt; /usr/local/bin/ruby -e 'if ENV["DISCOURSE_SMTP_ADDRESS"] == ""; puts "Aborting! Mail is not configured!"; exit 1; end'

2. I, [2018-01-23T12:37:23.533130 #13]  INFO -- :

3. I, [2018-01-23T12:37:23.534031 #13]  INFO -- : &gt; /usr/local/bin/ruby -e 'if ENV["DISCOURSE_HOSTNAME"] == ""; puts "Aborting! Domain is not configured!"; exit 1; end'

Looks like that would be your issue - you have nothing in your /containers/app.yml file


This is the content of /var/discourse/containers/app.yml (obviously blurred out password). It’s definitely been filled out.

edit: I should say, I coped this from samples/standalone.yml and changed domain settings, along with email settings and commented out the expose section for the sake of nginx.

(Gerhard Schlager) #6

The templates at the beginning of your app.yml look wrong. You have duplicates in there and the order is probably important too. Take another look at the guide you linked.


I’m running a similar setup (behind an nginx proxy), but in my app.yml I’m using the web.template.yml and web.ratelimited.yml template (which you have listed twice), but not the web.socketed.template template. Also I’ve un-commented the expose: block, and set discourse’s ports manually:

  - "templates/postgres.template.yml"
  - "templates/redis.template.yml"
  - "templates/web.template.yml"
  - "templates/web.ratelimited.template.yml"
## Uncomment these two lines if you wish to add Lets Encrypt (https)
##  - "templates/web.ssl.template.yml"
##  - "templates/web.letsencrypt.ssl.template.yml"
##  - "templates/web.socketed.template.yml"

## which TCP/IP ports should this container expose?
## If you want Discourse to share a port with another webserver like Apache or nginx,
## see for details
  - "8080:80"
  - "444:443"


Thanks. I completely thought that portion of it was fine. Guess I didn’t look hard enough. Thank you all for your help.

(Jeff Atwood) #9