Eric Guo's

Hoping writing JS, Ruby & Rails and Go article, but fallback to DevOps note

Install Unleash Feature Flag Management OSS Software on Rocky Linux


Unleash only depend on postgresql and recommand installation method including Docker/Docker-compose and pure Node.js. I using pm2 to do the daemon job and using a postgresql server seperatedly.

Install htop and atop

sudo dnf update
sudo dnf install epel-release
sudo dnf install htop
sudo dnf install atop

Setup unleash user account

adduser unleash
sudo su - unleash
mkdir .ssh
chmod 700 .ssh
vi .ssh/authorized_keys # and paste your public key
chmod 600 .ssh/authorized_keys

Install nginx

sudo dnf install nginx

Install node.js v18

Using nodesource distribution

curl -fsSL | bash -
yum install -y nodejs
yum groupinstall 'Development Tools'

Install yarn

curl -sL | sudo tee /etc/yum.repos.d/yarn.repo
sudo yum install yarn

Disable firewall

firewall-cmd --zone=public --add-port=4242/tcp
firewall-cmd --permanent --zone=public --add-port=4242/tcp
firewall-cmd --reload
systemctl restart firewalld

Install Unleash

sudo su - unleash
git clone
yarn run build

Run Unleash

node eric_server.js
const unleash = require('./unleash/dist/lib/server-impl');
db: {
ssl: false,
host: '',
port: 5432,
database: 'unleash_prod',
user: 'unleash',
password: 'password',
server: {
port: 4242,
unleashUrl: '',
baseUriPath: '/'
ui: { flags: { P: true } },
versionCheck: {
enable: false,
.then((unleash) => {
`Unleash started on http://localhost:${'port')}`,

Nginx conf

upstream unleash_proxy {
server {
listen 80;
return 301$request_uri;
server {
listen 443 ssl;
ssl_certificate /etc/ssl/cert/STAR_thape_com_cn_integrated.crt;
ssl_certificate_key /etc/ssl/private/STAR_thape_com_cn.key;
client_max_body_size 10M;
location / {
proxy_pass http://unleash_proxy;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
access_log /var/www/unleash/shared/log/nginx.access.log;
error_log /var/www/unleash/shared/log/nginx.error.log;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;