Leewardslope

Evil Morty
Evil Morty

Posted on • Updated on

Self hosting Forem on your VPS

Introduction to t2d

This is a post that describes how Leewardslope is using Forem by self-hosting it. I @akhil personally believe that every niche should have its own community, i.e, a separate domain specific community. This helps both the users and upcoming community members to actively take part in the ongoing events.

It doesn't matter:

  • How big or small your community stands out now,
  • Whether you have technical experience or not,
  • or even the domain specifications

So, I made a script called t2d, which helps me run this community and support many other communities spur life.

Keep in Mind

To make the installation process simple and more user friendly, I re-adjusted the initial ENV dependencies. Once you have successful installed your Forem, it is always advised to add few ENV variables to complete your Installation.

Post installation tips

I'm intentionally adding the post-installation guidance before installation screenshots. The very reason for this was, many tend to skip this part.

  1. Take a look at the admin documentation.
  2. Look about the supported ENV variables, to configure them for your self.
  3. Create your admin account and configure the necessary
  4. Before uploading any images, configure s3 bucket
  5. Adding Honey Badger API key will give you info about any errors, if exists.
  6. Once in a while, delete the existing script and download the latest version.

Watch this post-installation admin setup video for basic understanding, this video was created for Forem Cloud members, but if you have a successful installation, the post-admin-setup steps are almost similar. But before following this admin setup video, configure your s3 Bucket.

Now, keep these things in mind and continue your installation. The below mentioned video tutorial is about how to use t2d script to install Forem.

Tutorial

Screen Shots of t2d v2.1

1
2
3
4
5
6
Press "Enter", to automate the Dokku installation. More information can be seen in the video above.


Once the installation was done, sometimes you need to update your ENV variables or Update your entire Forem instance with the latest changes.

You can also use t2d for post deploy configuration. Right now, I added only few very necessary options. This section of the t2d will update daily.

7
8
9

Repository

GitHub logo leewardslope / t2d

TUI for Dokku-CLI

What is t2d?

t2d aka Talk to Dokku; is a beautiful Terminal User Interface(TUI) powered by dokku. With t2d you will be able to deploy apps in most popular programming languages, link them to most popular databases and all that with almost zero configuration from your side. Apart from all these amazing features it will also save you money along the way.

Our Vision

We started to work on this because current deployment solutions were expensive or hard to configure. With t2d we plan to provide a solution where deployment experience is smooth, enjoyable and affordable.

What is Dokku?

Dokku is Docker-powered Heroku-like tool that allows you to deploy complex applications by simply pushing it via Git repository. Behind the scenes it runs on herokuish, which essentially is emulating same functionalities that you are using when you deploy your apps on Heroku. As it supports all the Heroku buildpacks, it…

Discussion (16)

Collapse
suraj profile image
Suraj Thakur

Nice post. I am a begineer in this dev community, so can you please clear one of my doubts. I have recently installed Forem using Dokku on my Digital Ocean VM or so called droplet by following this tutorial.

Now my question is how can I deploy new code changes into the installed forem. Or how will I update my installed forem with the latest codebase. Please suggest.

Collapse
morty profile image
Evil Morty Author

If you look at the second screenshot; within it the second option was Update an Existing App. First choose it => It will redirect you to another menu section, where you can see Update to the Latest Version (the second option). Click on it, the update will start and will keep you at the latest version.

The update of the app will be taken from this Github Repo, you can start and watch the repo, so that you will get notifications when there are changes in the repository.

I will update the repository on daily basis.

Collapse
suraj profile image
Suraj Thakur

Thankyou for the response. I am just wondering what if I have my own Git repo forked from original form repo and then I made some code changes and commited them.

So how can I update that codebase in the hosted Forem.

Thread Thread
morty profile image
Evil Morty Author • Edited on

I'm actually working closely with ledokku to make that possible. You can check this website once in while for my new posts regading updates to t2d script or watch the Github repo

GitHub logo leewardslope / t2d

TUI for Dokku-CLI

What is t2d?

t2d aka Talk to Dokku; is a beautiful Terminal User Interface(TUI) powered by dokku. With t2d you will be able to deploy apps in most popular programming languages, link them to most popular databases and all that with almost zero configuration from your side. Apart from all these amazing features it will also save you money along the way.

Our Vision

We started to work on this because current deployment solutions were expensive or hard to configure. With t2d we plan to provide a solution where deployment experience is smooth, enjoyable and affordable.

What is Dokku?

Dokku is Docker-powered Heroku-like tool that allows you to deploy complex applications by simply pushing it via Git repository. Behind the scenes it runs on herokuish, which essentially is emulating same functionalities that you are using when you deploy your apps on Heroku. As it supports all the Heroku buildpacks, it…

Once it is done, you will even have a webui to configure your ENV varibales and your Github repository.

Trying achive this via bash script is possible, but I feel like a web ui will be a better option.

Thread Thread
suraj profile image
Suraj Thakur

Thankyou. I will try using the bash script, although I am not very familiar to these things, but it will be a learning for me. Thanks for the guide, I will keep checking for your updates.

Thread Thread
morty profile image
Evil Morty Author • Edited on

Few Suggestions

I tried to comment the t2d script as much as possible, but commenting at every position is not a viable option; so you have to find things by yourself, if I haven't commented.

Also, I would suggest you not to change too much within the script. As it consists of so many functions which are interlinked with one another.

Thread Thread
akhil profile image
Akhil Naidu

t2d script has been updated.

Collapse
nsbabrah profile image
Navjot Babrah

Hi Akhil,

Does t2d use forem codebase repo or selfhost repo?

Collapse
morty profile image
Evil Morty Author

It uses the Forem official repo. But to make it fail proof, I intentionally update the t2d repo a week late. This way, I can figureout the potential bugs specific to t2d; if any.

Collapse
nsbabrah profile image
Navjot Babrah

Hi Evil, thank you for reply, sorry still not sure Forem team call these repos selfhost (github.com/forem/selfhost) or codebase which is github.com/forem/forem.

The one you using is it selfhost I copied the link below.

github.com/forem/selfhost

Thread Thread
morty profile image
Evil Morty Author

The one I use was github.com/forem/forem. It was the actual code base.

the github.com/forem/selfhost contains a set of ansibe scripts that helps deplyoing forem from its code base. t2d was something I introduced before the forem team has relased the forem selfhost scripts.

t2d is like unofficial script to instal Forem but will use the Offcial Forem Codebase. While Forem selfhost is the official script to install Forem which also utillises the forem codebase.

I hope this comment will help you distinguish the differences.

Thread Thread
nsbabrah profile image
Navjot Babrah

Thank you Evil I understand now the difference. 😊

Collapse
nsbabrah profile image
Navjot Babrah

Hello Akhil,

I sent you an email on admin@leewardslope.com is this email works.

thanks,
Nav

Collapse
morty profile image
Evil Morty Author

Hey, you should not take a bacup in such a fashion, unless it is the only way.

Use dokku s3 bacup tools. Those will help you backup your postgress db to the amazon s3 bucked. You can download that and use it. In fact when using dokku s3 backup solution you can take autoated daily, weekly and monthly backups.

Collapse
nsbabrah profile image
Navjot Babrah

Hi, thanks for the help! sure I will use s3 bucket. Currently we are running digital ocean droplet and having backups of droplet will that be enough?

Thread Thread
morty profile image
Evil Morty Author

It will, if cost was not an issue you can move in that way.