Forem Creators and Builders 🌱

Cover image for Development: Installing Forem using Docker on Ubuntu

Development: Installing Forem using Docker on Ubuntu

Akhil Naidu on August 20, 2020

> Update: There is no requirement of Elasticsearch in the new Forem Enter fullscreen mode Exit fullscreen mode S...
Collapse
 
ntkien2192 profile image
Nguyễn Trung Kien • Edited

This is all i have after follow your tutorial, but don't know why i alway get blank page after i try to login with admin@forem.local/password

forem.dev/remoteimages/uploads/art...

Collapse
 
akhil profile image
Akhil Naidu

From the looks of it, I guess you are hosting your Forem on a VPS. So, in the .env file, replace the localhost:3000 with <yourIP>:3000

And also, make sure that port 3000 is open to public => some configurations.

If you still have any issues, I suggest you configure nginx proxy server, so that you can get rid of that port 3000.

Collapse
 
ntkien2192 profile image
Nguyễn Trung Kien • Edited

thanks, another question is there any way to increase image size when upload? i receive "The string did not match the expected pattern." every time. And can i Block permission to write a new post to user, only Admin can write and user can comment only? I use Dokku, t2d

Thread Thread
 
akhil profile image
Akhil Naidu

And can i Block permission to write a new post to user, only Admin can write and user can comment only?

You can create a feature request post upon this query, but for now, it is not possible without the modifications of the code base.

Collapse
 
ntkien2192 profile image
Nguyễn Trung Kien

Can i display this on my Home Page Forever?

forem.dev/remoteimages/uploads/art...

Collapse
 
ingeniumdesign profile image
Sebastian

here the same, what can i do with the port 3000 ?

Collapse
 
ingeniumdesign profile image
Sebastian

After Login with (admin@forem.local/password) i have a blank page.
Yes i edit the "localhost" to the the VPS IP:

APP_DOMAIN="173.xxx.xxx.xxx:3000"
APP_PROTOCOL="http://"
Enter fullscreen mode Exit fullscreen mode

And the port "3000" is free:

sudo ufw enable
sudo ufw allow 3000
Enter fullscreen mode Exit fullscreen mode

and then i restart the server and start "forem" new.
But the Blank Site start again :(

Collapse
 
varhal profile image
Varhal

Please tell me how to solve the problem with blank page after trying to login? CentOS Linux 7.8. Thank you!

Collapse
 
akhil profile image
Akhil Naidu

Blank page? Can I have a look at the error screenshot?

Collapse
 
tmedivh profile image
tmedivh
Thread Thread
 
akhil profile image
Akhil Naidu

Configure your env variables, especially

  1. APP_DOMAIN
  2. APP_PROTOCOL
Thread Thread
 
tmedivh profile image
tmedivh
Collapse
 
udoyhasanorko profile image
MD UDOY HASAN • Edited

A very nice post.
I've follow you all instruction in this post to install forem. But I'm getting an error. Can you give me an way to fix this error? The error is when I type bin/container-setup I'm getting this error:

Starting the Forem container stack...
The vendor/bundle directory is empty or does not exist.
This will cause bundle install to run which takes a long time with docker.
Depending on your hardware specs, the initial setup can take
30 to 45 minutes. Please stand by...
ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.
Enter fullscreen mode Exit fullscreen mode
Collapse
 
akhil profile image
Akhil Naidu

use these commands in order.

sudo groupadd docker
sudo usermod -aG docker $USER

logout and login if PC or if it is a VM restart your VM or VPS

newgrp docker
sudo systemctl enable docker
sudo service docker restart
run this command to verify your docker: docker run hello-world

Collapse
 
noeltim profile image
Noeltim

Hey @akhil , thanks for this awesome guide.

Just one question, I'm planning to use docker to selfhost, but i see that the git clone command is not the self host repo.

Would this cause any issues?

Thanks

Collapse
 
akhil profile image
Akhil Naidu

You can use the official repo: github.com/forem/forem

Collapse
 
reyesvicente profile image
Vicente Antonio G. Reyes

Hey Akhil, awesome article you have!

How much server resources do you estimate forem would need for a couple hundred users? I'm planning on deploying my own Forem to DO. 😄

Collapse
 
akhil profile image
Akhil Naidu • Edited

Today, most of the services provided by many cloud hosting companies are scalable, keeping this fact in mind it is always better to start with the minimum requirements for any project; at least this is my opinion.

So, I would suggest you start with 4GB Ram, 2Core CPU droplet, for initial production, it can easily maintain 100 users. If you feel like cost doesn't matter, you can prefer 8GB ram and 4Core CPU, anything above this will be an overkill. After all after a particular stage in open sources projects like Forem, the main issue will be in regarding storing data and backing them up safely.

Hope you got some useful info and let me know if you have your Forem instance :)

Collapse
 
reyesvicente profile image
Vicente Antonio G. Reyes

Thanks, Akhil!

Collapse
 
ntpa16 profile image
ntpa16 • Edited

When I login to my Forem, with admin@forem.local/password, I get blank page. I only copy .env_sample to .env. In .env file, I replaced all localhost with myIP, changed FOREM_OWNER_SECRET, COMMUNITY_NAME, DEFAULT_EMAIL, SESSION_KEY.
Beside that, some containers auto stop.

Collapse
 
akhil profile image
Akhil Naidu

Hey, I cannot suggest you any alternative without looking into the logs.

Anyways, I'm actually working on a SaaS project to make the instllation process more user friendly. Even though the SaaS is not ready for offcial release, it can be used to install Forem. (The core working principles were ready and under working condition)

If you are interested in installing Forem, let me know, I will provide you access and necessary guidance to use the SaaS to install your Forem.

The only requirements are a VPS and filling out necessary ENV varibles.

Collapse
 
f2k2game profile image
F2K2 Game

How to tranfer devlopment env to production env?

Collapse
 
tmedivh profile image
tmedivh
Collapse
 
akhil profile image
Akhil Naidu

Presently the Dev or Forem team is working on it, I would suggest you to wait for a while.