Oracle Cloudでの無料自己ホスティング(ただし条件あり)

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

このブログ記事は昨年のもので、ここに言及はありませんでした。ホスティング企業としてのオラクルは、多くの人の関心の外にあると思います。

そこで投稿する前に、実際に試して本当に実用可能かどうかを確認することにしました。デモサイトを作成しました:

https://www.opendiscussion.pw

Oracle Cloud でアカウント登録をしました。アカウントの検証には15分かかるとのことでしたが、クレジットカードの問題(検証のためにクレジットカードの入力が求められます)により、2日間待たされました。

ブログ記事の手順に従い、その後 Discourse の通常の Docker インストール手順に従いました。ほぼ最初から動作しました!メール設定に問題がありました。これはブログ記事で正しく説明されていない唯一の部分だと思います。ドキュメントを読む必要がありました。Oracle のドキュメントは非常に優れています。

このティアに含まれる内容は以下の通りです:

  • 2台の VM
    VM は OCPU の 1/8 を持ち、追加の CPU リソースを利用可能です。VM.Standard.E2.1.Micro。2.0 GHz AMD EPYC 7551
    メモリ:1 GB

  • 帯域幅:10 TB

  • ストレージ:100 GB ブロックボリューム

  • メール:月間 1,000 件(SMTP は含まれません)

「いいね!」 31

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. :wink: )

「いいね!」 6

Thank you for this interesting information!

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… :sweat_smile:

「いいね!」 1

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.

「いいね!」 1

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'"
「いいね!」 2

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 ?

「いいね!」 1

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

「いいね!」 1

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

「いいね!」 2

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.

「いいね!」 1

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://docs.cloud.oracle.com/en-us/iaas/Content/Email/Concepts/overview.htm

「いいね!」 2

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 ?

「いいね!」 3

I think the only one left is Free email marketing software its really a shame that the silicon valley mafia stole free emails from the internet :smiley:

「いいね!」 4

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 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. :+1:t6:

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

「いいね!」 6

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:

Click the Security List:

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”.

Verify that the rules are added in the security list:

In your server command line through SSH:

Add these rules to iptables :

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:

netfilter-persistent save

Now you can install Discourse! :tada:

「いいね!」 8

こんにちは、本番環境で運用されている、ある程度トラフィックの多いサイトにおすすめのクラウドサービスはOracle Cloudでしょうか?
よろしくお願いいたします。

「いいね!」 1

フォラムの速度をあまり気にしないのであれば、あなたとあなたのユーザーが小さなコミュニティをホストすることは可能だと思います。
しかし、より良い仕様の安いホスティング(月額約5ドル)が見つかるため、おすすめはしません。

@Hector さん、https://www.opendiscussion.pw はまだ無料サーバーでホストされていますか?

「いいね!」 4

こんにちは、月額約5ドルの格安ホスティングとは、Digital Oceanの5ドルドロプレットのことでしょうか?

「いいね!」 1

はい、例えばです。

個人的には、Hetzner が気に入っています。価格も手頃で、サーバーの課金が時間単位なので、短期間の試行にも最適です。ただし、サーバーはヨーロッパのみにあると考えています。

「いいね!」 3

はい、まだ無料サーバーです。トラフィックがゼロなので、その性能については言えません。開発用としても利用しています。今のところ問題ありません。

「いいね!」 3

Hetzner VPSの場合、LAMPのインストール、サーバーの更新、ハッカーへの対策なども自分で行う必要がありますか?

一方、Digital Oceanではすべてが準備済みで、サーバーのセキュリティ対策は不要で、Discourseのインストールと管理だけを行えばよいのでしょうか?これがDigital Oceanと他のVPSとの本当の違いなのでしょうか?

Digital Oceanは管理型VPSのようなものですか?

ありがとうございます!
Deb

「いいね!」 1