# Installation on AWS

**URL:** https://meta.discourse.org/t/installation-on-aws/88711
**Category:** Self-hosting
**Created:** [May 30, 2018, 1:12am UTC](https://meta.discourse.org/t/installation-on-aws/88711 "2018-05-30T01:12:25Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![Tango](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tango/32/97926_2.png) [@Tango](https://meta.discourse.org/u/Tango)
#### Post date: [May 30, 2018, 1:12am UTC](https://meta.discourse.org/t/installation-on-aws/88711/1 "2018-05-30T01:12:25Z")

</div>

Hi,  
Complete newb here trying to get an installation happening on AWS using EC2 (Ubuntu 16.05LTS), PostgreSQL, Redis.  
Im following the under 30 minute guide as well as [http://stroupaloop.com/blog/discourse-setup-using-aws/](http://stroupaloop.com/blog/discourse-setup-using-aws/)

I noticed in the app.yml file, there are no options to specify database. Is it just a point of adding in the following with my settings into the yml file?

Thanks in advance

Todd

```plaintext
  DISCOURSE_DB_SOCKET: ''
  DISCOURSE_DB_NAME: [AWS_POSTGRES_DB_NAME]
  DISCOURSE_DB_POOL: 15
  DISCOURSE_DB_USERNAME: [AWS_POSTGRES_DB_USERNAME]
  DISCOURSE_DB_PASSWORD: [AWS_POSTGRES_DB_PASSWORD]
  DISCOURSE_DB_HOST: [AWS_POSTGRES_ENDPOINT]
  DISCOURSE_REDIS_HOST: [AWS_REDIS_ENDPOINT]

```

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [May 30, 2018, 3:26am UTC](https://meta.discourse.org/t/installation-on-aws/88711/2 "2018-05-30T03:26:01Z")

</div>

Pretty much and then not mixing in the database.yml file cause you do now want it in the container.

---

<div class="post-metadata">

### Author: ![Tango](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tango/32/97926_2.png) [@Tango](https://meta.discourse.org/u/Tango)
#### Post date: [May 30, 2018, 4:48am UTC](https://meta.discourse.org/t/installation-on-aws/88711/3 "2018-05-30T04:48:55Z")

</div>

Thanks @sam,

Would it t be better to add in the database.yml file?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [May 30, 2018, 4:53am UTC](https://meta.discourse.org/t/installation-on-aws/88711/4 "2018-05-30T04:53:35Z")

</div>

No, we use GlobalSettings which are either in discourse.conf or ENV for configuration of production.

---

<div class="post-metadata">

### Author: ![AbhishekVerma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/abhishekverma/32/125053_2.png) [@AbhishekVerma](https://meta.discourse.org/u/AbhishekVerma)
#### Post date: [May 30, 2018, 5:30am UTC](https://meta.discourse.org/t/installation-on-aws/88711/5 "2018-05-30T05:30:46Z")

</div>

> [@Tango](#):
>
> AWS

Discourse on AWS marketplace is provided by Bitnami. You can go to their [official forum](https://community.bitnami.com) and ask your questions.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [May 30, 2018, 5:41am UTC](https://meta.discourse.org/t/installation-on-aws/88711/6 "2018-05-30T05:41:42Z")

</div>

> [@AbhishekVerma](#):
>
> Discourse on AWS marketplace id provided by Bitnami.

Clarification: unsupported Discourse on AWS is provided by Bitnami, if you choose to go that path you must get all your support from Bitnami not [meta.discourse.org](http://meta.discourse.org).

---

<div class="post-metadata">

### Author: ![Tango](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tango/32/97926_2.png) [@Tango](https://meta.discourse.org/u/Tango)
#### Post date: [May 30, 2018, 9:04am UTC](https://meta.discourse.org/t/installation-on-aws/88711/7 "2018-05-30T09:04:05Z")

</div>

That doesn’t look like it’s using RDS & Elasticache.

---

<div class="post-metadata">

### Author: ![Tango](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tango/32/97926_2.png) [@Tango](https://meta.discourse.org/u/Tango)
#### Post date: [May 30, 2018, 11:58am UTC](https://meta.discourse.org/t/installation-on-aws/88711/8 "2018-05-30T11:58:27Z")

</div>

@sam how do you “not mix in the database.yml file”

Is it just a point of removing the following lines in the app.yml file?

- “templates/postgres.template.yml”
- “templates/redis.template.yml”

could you please expand

Thanks

Todd

---

<div class="post-metadata">

### Author: ![Cameron\_D](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cameron_d/32/97535_2.png) [@Cameron\_D](https://meta.discourse.org/u/Cameron_D)
#### Post date: [May 30, 2018, 12:08pm UTC](https://meta.discourse.org/t/installation-on-aws/88711/9 "2018-05-30T12:08:02Z")

</div>

That should be it, yes. The [web\_only sample](https://github.com/discourse/discourse_docker/blob/master/samples/web_only.yml) should be your basis for the container.

---

<div class="post-metadata">

### Author: ![Tango](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tango/32/97926_2.png) [@Tango](https://meta.discourse.org/u/Tango)
#### Post date: [May 30, 2018, 12:53pm UTC](https://meta.discourse.org/t/installation-on-aws/88711/10 "2018-05-30T12:53:32Z")

</div>

After making said changes & running ./discourse setup again I am getting error messages

```
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 192 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:108:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"bundle_exec", "cmd"=>["su discourse -c 'bundle install --deployment --verbose --without test --without development --retry 3 --jobs 4'", "su discourse -c 'bundle exec rake db:migrate'", "su discourse -c 'bundle exec rake assets:precompile'"]}
2cd1970d5dc16462b89df28ebbd6b880c5640d0b21f8f2283d3b59d8e8695a9f
**FAILED TO BOOTSTRAP** please scroll up and look for earlier error messages, there may be more than one

```

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [May 30, 2018, 12:57pm UTC](https://meta.discourse.org/t/installation-on-aws/88711/11 "2018-05-30T12:57:00Z")

</div>

Can this be of some help for you?

> [@Configure Discourse to use a separate PostgreSQL server](https://meta.discourse.org/t/running-discourse-with-a-separate-postgresql-server/46375):
>
> Let’s say you’re using AWS RDS, or an existing PostgreSQL server managed elsewhere. It’s fairly straightforward to get Discourse to use such a setup, without needing to grant superuser privileges to anything that Discourse itself runs. Here’s how. Prerequisites Discourse requires PostgreSQL’s major version to [match what we ship with in our docker images](https://github.com/discourse/discourse_docker/blob/main/image/base/Dockerfile#L37); if you try to run on a newer or older version, it might work, but we don’t guarantee it, and if something breaks in the future, you get to …

---

<div class="post-metadata">

### Author: ![Tango](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tango/32/97926_2.png) [@Tango](https://meta.discourse.org/u/Tango)
#### Post date: [May 30, 2018, 1:02pm UTC](https://meta.discourse.org/t/installation-on-aws/88711/12 "2018-05-30T13:02:15Z")

</div>

Thanks @itsbhanusharma but this is what ive done but still getting errors

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [May 30, 2018, 1:04pm UTC](https://meta.discourse.org/t/installation-on-aws/88711/13 "2018-05-30T13:04:16Z")

</div>

I’d suggest revisiting the guide point by point once, I followed the guide I linked above and it works for me without much tinkering.

However, if you still get errors, there can be (potential) issues with amazon’s security groups as well! please check them as well.

---

<div class="post-metadata">

### Author: ![Tango](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tango/32/97926_2.png) [@Tango](https://meta.discourse.org/u/Tango)
#### Post date: [May 30, 2018, 9:24pm UTC](https://meta.discourse.org/t/installation-on-aws/88711/14 "2018-05-30T21:24:19Z")

</div>

@itsbhanusharma can you share your app.yml file?

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [May 31, 2018, 6:37am UTC](https://meta.discourse.org/t/installation-on-aws/88711/15 "2018-05-31T06:37:52Z")

</div>

Apologies! I don’t have it in hand, it was just a test that went well and I destroyed the node!
