# Self hosting for free (with caveats!) with Oracle Cloud

**URL:** https://meta.discourse.org/t/self-hosting-for-free-with-caveats-with-oracle-cloud/139184
**Category:** Self-hosting
**Tags:** hosting
**Created:** [January 20, 2020, 12:51pm UTC](https://meta.discourse.org/t/self-hosting-for-free-with-caveats-with-oracle-cloud/139184 "2020-01-20T12:51:55Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Hector](https://avatars.discourse-cdn.com/v4/letter/h/43a26b/32.png) [@Hector](https://meta.discourse.org/u/Hector)
#### Post date: [January 20, 2020, 12:51pm UTC](https://meta.discourse.org/t/self-hosting-for-free-with-caveats-with-oracle-cloud/139184/1 "2020-01-20T12:51:55Z")

</div>

[https://blogs.oracle.com/developers/install-run-discourse-for-free-in-the-oracle-cloud](https://blogs.oracle.com/developers/install-run-discourse-for-free-in-the-oracle-cloud)

This blog post is from last year. I didn’t see any mention here; I think Oracle as a hosting company is off the radar for most people.

So, before I posted I decided to try it myself to see if it’s really viable. I created a demo site:

[https://www.opendiscussion.pw](https://www.opendiscussion.pw)

I signed up for an account on Oracle Cloud. It said it would take 15 minutes to validate the account but I had to wait two days because of a problem with my credit card (you are asked for a credit card for validation).

I followed the instructions on the blog post and then I followed the normal docker installation instructions of Discourse. It almost worked on first try! I had a problem with the e-mail set up. I think it’s the only part that is not correctly explained in the blog post. I had to read the documentation. The Oracle documentation is very good.

Here is what this tier includes:

- 2 (two) VMs  
The VM has 1/8th of an OCPU with the ability to use additional CPU resources. VM.Standard.E2.1.Micro. 2.0 GHz AMD EPYC 7551  
Memory: 1 GB

- Bandwith: 10 TB

- Storage: 100 GB block volume

- ~~E-mail: 1,000 / month~~ (SMTP is not included)

---

<div class="post-metadata">

### Author: ![elijah](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elijah/32/104055_2.png) [@elijah](https://meta.discourse.org/u/elijah)
#### Post date: [April 23, 2020, 1:30am UTC](https://meta.discourse.org/t/self-hosting-for-free-with-caveats-with-oracle-cloud/139184/2 "2020-04-23T01:30:15Z")

</div>

Noteworthy is the configuration Oracle gives you has ~40gb disk (for OS and userdata) plus 8gb swap partition. No need for a swap file. And since you can get two VMs on the “always free” level, separating the database container is a scaling option.

(For some reason the free database PaaS there isn’t Postgres. 😉 )

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [April 23, 2020, 2:51pm UTC](https://meta.discourse.org/t/self-hosting-for-free-with-caveats-with-oracle-cloud/139184/3 "2020-04-23T14:51:03Z")

</div>

Thank you for this interesting information!

> [@Hector](#):
>
> It said it would take 15 minutes to validate the account but I had to wait two days because of a problem with my credit card (you are asked for a credit card for validation).

I also had a problem. I tried multiple times without any success (“wrong cryptogram” message from my bank, though the cryptogram was right).  
I tried in another browser and it worked, I just used another email address… And now it has been several hours that I’m waiting for my account to be validated.

It’s free but the registration process is a bit annoying… 😅

---

<div class="post-metadata">

### Author: ![Lopro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lopro/32/180120_2.png) [@Lopro](https://meta.discourse.org/u/Lopro)
#### Post date: [May 18, 2020, 7:48pm UTC](https://meta.discourse.org/t/self-hosting-for-free-with-caveats-with-oracle-cloud/139184/4 "2020-05-18T19:48:11Z")

</div>

What exactly was wrong with the email part ? I have managed to install Discourse on Oracle Cloud but can’t for the life of me get Email Delivery to work. When I am about to register the admin user on the Discourse install I never get an email.

Discourse-doctor gets contact with the oracle smtp server but the mail is not sent.

I have set up many approved senders just in case. My admin email, `noreply@[forum domain]` and `noreply@[main domain]`. What is the important one?

I´ve also added a txt record to my domain’s DNS settings with the recommended SPF string.

---

<div class="post-metadata">

### Author: ![Hector](https://avatars.discourse-cdn.com/v4/letter/h/43a26b/32.png) [@Hector](https://meta.discourse.org/u/Hector)
#### Post date: [May 19, 2020, 3:17am UTC](https://meta.discourse.org/t/self-hosting-for-free-with-caveats-with-oracle-cloud/139184/5 "2020-05-19T03:17:33Z")

</div>

It was tricky. If I remember correctly what make it work for me was changing containers/app.yml:

```
  ## If you want to set the 'From' email address for your first registration, uncomment and change:
  ## After getting the first signup email, re-comment the line. It only needs to run once.
  - exec: rails r "SiteSetting.notification_email='noreply@opendiscussion.pw'"

```

---

<div class="post-metadata">

### Author: ![Lopro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lopro/32/180120_2.png) [@Lopro](https://meta.discourse.org/u/Lopro)
#### Post date: [May 19, 2020, 6:36am UTC](https://meta.discourse.org/t/self-hosting-for-free-with-caveats-with-oracle-cloud/139184/6 "2020-05-19T06:36:39Z")

</div>

Thanks for the reply!

Unfortunately that didn’t help (after rebuilding the app too).

Can I ask how your TXT records look ?

You didn’t uncomment the “START TLS” setting as well ?

---

<div class="post-metadata">

### Author: ![spirobel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/spirobel/32/170908_2.png) [@spirobel](https://meta.discourse.org/u/spirobel)
#### Post date: [May 19, 2020, 6:41am UTC](https://meta.discourse.org/t/self-hosting-for-free-with-caveats-with-oracle-cloud/139184/7 "2020-05-19T06:41:53Z")

</div>

So what did you do about the email? do you have to pay for it? (because you said SMTP not included)

---

<div class="post-metadata">

### Author: ![Lopro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lopro/32/180120_2.png) [@Lopro](https://meta.discourse.org/u/Lopro)
#### Post date: [May 19, 2020, 7:07am UTC](https://meta.discourse.org/t/self-hosting-for-free-with-caveats-with-oracle-cloud/139184/8 "2020-05-19T07:07:30Z")

</div>

SMTP _is_ included. At a time it wasn’t so in all regions. It’s just bloody hard to set up … 😐

---

<div class="post-metadata">

### Author: ![Lopro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lopro/32/180120_2.png) [@Lopro](https://meta.discourse.org/u/Lopro)
#### Post date: [May 19, 2020, 8:45am UTC](https://meta.discourse.org/t/self-hosting-for-free-with-caveats-with-oracle-cloud/139184/9 "2020-05-19T08:45:12Z")

</div>

Do you know if there’s an SMTP log somewhere in Oracle Cloud ? I would like to know why the email is not sent when I can contact the SMTP server fine. Why I am not authorized or whatever the problem is.

---

<div class="post-metadata">

### Author: ![Hector](https://avatars.discourse-cdn.com/v4/letter/h/43a26b/32.png) [@Hector](https://meta.discourse.org/u/Hector)
#### Post date: [May 19, 2020, 12:16pm UTC](https://meta.discourse.org/t/self-hosting-for-free-with-caveats-with-oracle-cloud/139184/10 "2020-05-19T12:16:26Z")

</div>

Oracle Cloud has an SMTP service, **but it’s not included in the always free tier**. It’s very cheap (USD 0.085 / 1000 emails) so I use it anyway. They haven’t charged me anything yet.

[https://www.oracle.com/cloud/networking/email-delivery.html#pricing](https://www.oracle.com/cloud/networking/email-delivery.html#pricing)

[https://docs.cloud.oracle.com/en-us/iaas/Content/Email/Concepts/overview.htm](https://docs.cloud.oracle.com/en-us/iaas/Content/Email/Concepts/overview.htm)

---

<div class="post-metadata">

### Author: ![Lopro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lopro/32/180120_2.png) [@Lopro](https://meta.discourse.org/u/Lopro)
#### Post date: [May 21, 2020, 9:52am UTC](https://meta.discourse.org/t/self-hosting-for-free-with-caveats-with-oracle-cloud/139184/11 "2020-05-21T09:52:37Z")

</div>

My bad, you are correct. I didn’t realise I was put on a trial for the paid version as I signed up for the free tier.

Are there any free alternative SMTP services which works with Discourse, while keeping Discourse itself on Oracle Cloud ?

---

<div class="post-metadata">

### Author: ![spirobel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/spirobel/32/170908_2.png) [@spirobel](https://meta.discourse.org/u/spirobel)
#### Post date: [May 21, 2020, 10:06am UTC](https://meta.discourse.org/t/self-hosting-for-free-with-caveats-with-oracle-cloud/139184/12 "2020-05-21T10:06:09Z")

</div>

I think the only one left is [Pricing | Mailjet](https://www.mailjet.com/pricing/) its really a shame that the silicon valley mafia stole free emails from the internet 😃

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [May 22, 2020, 8:38pm UTC](https://meta.discourse.org/t/self-hosting-for-free-with-caveats-with-oracle-cloud/139184/14 "2020-05-22T20:38:51Z")

</div>

After **1 month** trying to get my trial account working, having the chat support saying that couldn’t help me, the email support that didn’t help either and didn’t reply but once, saying they’d grab some info about my account and get in touch but they never did…

I asked a friend to open an account for me and it worked like a charm in less than 15 minutes.

Then I tried to install Discourse and I struggled a lot. I followed the [Oracle Discourse installation tutorial](https://blogs.oracle.com/developers/install-run-discourse-for-free-in-the-oracle-cloud) but for some reasons, I couldn’t connect to the port 443.

I tried installing Discourse on a regular Ubuntu image, but I couldn’t get connect through port 80 nor 443 for unknown reasons.

I went back to the official instructions, it wouldn’t work at first (both ports connection failed), but I restarted docker and then it magically connected to both port.

So my experience isn’t the best, whether the issues comes from me or Oracle.

But in the end, I do now have a free, online, obviously not the fastest, but working Discourse installation. 👍🏿

For those who want to follow the same tutorial, there is a small mistake in the server firewall part.

Instead of:  
`sudo firewall-cmd —reload`  
You must write:  
`sudo firewall-cmd --reload`

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [May 27, 2020, 3:09pm UTC](https://meta.discourse.org/t/self-hosting-for-free-with-caveats-with-oracle-cloud/139184/15 "2020-05-27T15:09:33Z")

</div>

By default, you can’t install Discourse because connections to port 80 and 443 aren’t allowed. You need to allow them both in the **security list** (in the Oracle control panel) and the **instance firewall** (via SSH).

Here’s how to do that on a regular Ubuntu installation (it’s slightly different from their official guide which uses another Linux image).

### In the Oracle panel:

After creating your Ubuntu instance, go to **Instance Details** and click the **Subnet link** :

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

Click the Security List:

 ![image](https://global.discourse-cdn.com/meta/original/3X/4/7/471b4ee58a68418df61fc22868b8a2b916320c4a.png)

Click **Add Ingress Rules** , select the **TCP protocol** , set Source CIDR as `0.0.0.0/0`, and **Destination port range** as `80,443`.  
Validate by clicking “Add Ingress Rules”.

 ![image](https://global.discourse-cdn.com/meta/original/3X/1/d/1df4f1e399281dcb5e1412317bc1da9f9c087746.png)

Verify that the rules are added in the security list:

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

### In your server command line through SSH:

Add these rules to iptables :

```plaintext
iptables -I INPUT 5 -i ens3 -p tcp --dport 80 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -I INPUT 5 -i ens3 -p tcp --dport 443 -m state --state NEW,ESTABLISHED -j ACCEPT

```

The command will add the rules in the right place. If you simply append them to existing rules without specifying the line number (5), that won’t work because they’ll be overriden by a previous existing “reject all” rule.

Save the rules so they’ll still be here after a reboot:

```plaintext
netfilter-persistent save

```

Now you can install Discourse! 🎉

---

<div class="post-metadata">

### Author: ![nory](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nory/32/173397_2.png) [@nory](https://meta.discourse.org/u/nory)
#### Post date: [June 24, 2020, 7:43pm UTC](https://meta.discourse.org/t/self-hosting-for-free-with-caveats-with-oracle-cloud/139184/16 "2020-06-24T19:43:30Z")

</div>

Hi, do you recommend Oracle Cloud for a site in production, busy enough?  
Thanks

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [June 24, 2020, 7:55pm UTC](https://meta.discourse.org/t/self-hosting-for-free-with-caveats-with-oracle-cloud/139184/17 "2020-06-24T19:55:41Z")

</div>

I think you can host a small community if you and your users don’t care much about the forum speed.  
But I wouldn’t recommend as you can find cheap host (~5$/month) with way better specs.

@Hector, is [https://www.opendiscussion.pw](https://www.opendiscussion.pw) still hosted on a free server?

---

<div class="post-metadata">

### Author: ![nory](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nory/32/173397_2.png) [@nory](https://meta.discourse.org/u/nory)
#### Post date: [June 24, 2020, 8:01pm UTC](https://meta.discourse.org/t/self-hosting-for-free-with-caveats-with-oracle-cloud/139184/18 "2020-06-24T20:01:18Z")

</div>

Hi, for cheap host ~5$/month you mean Digital Ocean 5$ droplet?

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [June 24, 2020, 8:15pm UTC](https://meta.discourse.org/t/self-hosting-for-free-with-caveats-with-oracle-cloud/139184/19 "2020-06-24T20:15:48Z")

</div>

Yes, for example.

Personally, I like Hetzner because they are not expensive and their servers are billed per hour so it’s great to try stuff for short durations. But I believe they only have servers in Europe.

---

<div class="post-metadata">

### Author: ![Hector](https://avatars.discourse-cdn.com/v4/letter/h/43a26b/32.png) [@Hector](https://meta.discourse.org/u/Hector)
#### Post date: [June 24, 2020, 9:34pm UTC](https://meta.discourse.org/t/self-hosting-for-free-with-caveats-with-oracle-cloud/139184/20 "2020-06-24T21:34:36Z")

</div>

> [@Canapin](#):
>
> @Hector, is [https://www.opendiscussion.pw](https://www.opendiscussion.pw) still hosted on a free server?

Yes, still on the free server. It has zero traffic, so I can’t say what it’s capable of. I also use it for development. So far so good.

---

<div class="post-metadata">

### Author: ![nory](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nory/32/173397_2.png) [@nory](https://meta.discourse.org/u/nory)
#### Post date: [June 27, 2020, 9:34am UTC](https://meta.discourse.org/t/self-hosting-for-free-with-caveats-with-oracle-cloud/139184/21 "2020-06-27T09:34:47Z")

</div>

For Hetzner VPS will I also have to install LAMP, server updates, be careful of hackers etc?

On Digital Ocean, on the other hand, everything is ready, I don’t have to secure the server, do I just have to install and manage Discourse? Is this the real difference between Digital Ocean and any other VPS?

Is Digital Ocean like a managed VPS?

Thank you!  
Deb

[Next page](https://meta.discourse.org/t/self-hosting-for-free-with-caveats-with-oracle-cloud/139184.md?page=2)
