# Fresh install does not work

**URL:** https://meta.discourse.org/t/fresh-install-does-not-work/78754
**Category:** Self-hosting
**Created:** [January 23, 2018, 12:49pm UTC](https://meta.discourse.org/t/fresh-install-does-not-work/78754 "2018-01-23T12:49:25Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![nokizorque](https://avatars.discourse-cdn.com/v4/letter/n/e19adc/32.png) [@nokizorque](https://meta.discourse.org/u/nokizorque)
#### Post date: [January 23, 2018, 12:49pm UTC](https://meta.discourse.org/t/fresh-install-does-not-work/78754/1 "2018-01-23T12:49:25Z")

</div>

Hi,

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](https://meta.discourse.org/t/running-other-websites-on-the-same-machine-as-discourse/17247/13) 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:

```plaintext
    FAILED
--------------------
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"]}
9e5e314a1cc05f72408675a4dee667a7fea3e8b0931a84d21ab9313618a9f396

```

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`

---

<div class="post-metadata">

### Author: ![mikechristopher](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mikechristopher/32/89135_2.png) [@mikechristopher](https://meta.discourse.org/u/mikechristopher)
#### Post date: [January 23, 2018, 1:02pm UTC](https://meta.discourse.org/t/fresh-install-does-not-work/78754/2 "2018-01-23T13:02:11Z")

</div>

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

---

<div class="post-metadata">

### Author: ![nokizorque](https://avatars.discourse-cdn.com/v4/letter/n/e19adc/32.png) [@nokizorque](https://meta.discourse.org/u/nokizorque)
#### Post date: [January 23, 2018, 1:08pm UTC](https://meta.discourse.org/t/fresh-install-does-not-work/78754/3 "2018-01-23T13:08:38Z")

</div>

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.

> <https://pastebin.com/uApJ2DCt>

---

<div class="post-metadata">

### Author: ![mikechristopher](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mikechristopher/32/89135_2.png) [@mikechristopher](https://meta.discourse.org/u/mikechristopher)
#### Post date: [January 23, 2018, 1:22pm UTC](https://meta.discourse.org/t/fresh-install-does-not-work/78754/4 "2018-01-23T13:22:39Z")

</div>

```
1. I, [2018-01-23T12:37:23.427322 #13] INFO -- : &gt; /usr/local/bin/ruby -e 'if ENV["DISCOURSE_SMTP_ADDRESS"] == "smtp.example.com"; 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"] == "discourse.example.com"; 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

---

<div class="post-metadata">

### Author: ![nokizorque](https://avatars.discourse-cdn.com/v4/letter/n/e19adc/32.png) [@nokizorque](https://meta.discourse.org/u/nokizorque)
#### Post date: [January 23, 2018, 1:27pm UTC](https://meta.discourse.org/t/fresh-install-does-not-work/78754/5 "2018-01-23T13:27:01Z")

</div>

![](https://global.discourse-cdn.com/meta/original/3X/b/2/b276269850bdf294dbb50d961cb5f94172dec2f8.png)

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.

---

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [January 23, 2018, 1:38pm UTC](https://meta.discourse.org/t/fresh-install-does-not-work/78754/6 "2018-01-23T13:38:47Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![romdos](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/romdos/32/54307_2.png) [@romdos](https://meta.discourse.org/u/romdos)
#### Post date: [January 23, 2018, 2:19pm UTC](https://meta.discourse.org/t/fresh-install-does-not-work/78754/7 "2018-01-23T14:19:29Z")

</div>

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:
  - "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 https://meta.discourse.org/t/17247 for details
expose:
  - "8080:80"
  - "444:443"

```

---

<div class="post-metadata">

### Author: ![nokizorque](https://avatars.discourse-cdn.com/v4/letter/n/e19adc/32.png) [@nokizorque](https://meta.discourse.org/u/nokizorque)
#### Post date: [January 23, 2018, 3:17pm UTC](https://meta.discourse.org/t/fresh-install-does-not-work/78754/8 "2018-01-23T15:17:25Z")

</div>

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

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [January 24, 2018, 1:21am UTC](https://meta.discourse.org/t/fresh-install-does-not-work/78754/9 "2018-01-24T01:21:04Z")

</div>


