How to Install Unleash on Ubuntu 24.04
If you’re looking to host your own Unleash feature management platform on Ubuntu 24.04 this guide walks through everything you need to set up Unleash manually, complete with PostgreSQL and UFW firewall configuration.
What is Unleash?
Unleash is an open-source feature management solution that lets teams control feature rollouts, enable A/B testing, and deploy features safely. Hosting Unleash yourself ensures full control over your data and infrastructure.
Step 1: Update and Prepare the System
Start by updating your system packages to ensure everything is current:
sudo apt update && sudo apt upgrade -y
Then install required dependencies:
sudo apt install -y git curl build-essential libssl-dev python3 python3-pip python3-venv postgresql postgresql-contrib libpq-dev python3-psycopg2
Step 2: Set Up PostgreSQL
Ensure PostgreSQL is active:
sudo systemctl enable --now postgresql
Create the Unleash database and user:
sudo -u postgres psql
CREATE USER unleash_user WITH PASSWORD 'unleash_password_123' CREATEDB LOGIN;
CREATE DATABASE unleash OWNER unleash_user;
GRANT ALL PRIVILEGES ON DATABASE unleash TO unleash_user;
\q
Step 3: Install Node.js and Yarn
Unleash requires Node.js and Yarn. Add NodeSource and install Node.js 20:
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo bash -
sudo apt install -y nodejs
Then install Yarn globally:
sudo npm install -g yarn
Step 4: Clone and Build Unleash
Download the Unleash repository and switch to version v5.6.2:
sudo git clone https://github.com/Unleash/unleash.git /opt/unleash
cd /opt/unleash
sudo git checkout v5.6.2
Install dependencies and build:
yarn install
cd frontend && yarn install && yarn build && cd ..
yarn build:backend
yarn copy-templates
Step 5: Configure Unleash
Create a configuration file for the server:
sudo mkdir -p /etc/unleash
sudo nano /etc/unleash/config.js
Paste in:
lmodule.exports = {
db: {
user: 'unleash_user',
password: 'unleash_password_123',
host: 'localhost',
port: 5432,
database: 'unleash',
ssl: false,
},
server: {
port: 4242,
host: '0.0.0.0',
},
logLevel: 'info',
};
Create a startup script:
sudo nano /etc/unleash/start-unleash.js
Paste:
const { start } = require('/opt/unleash/dist/lib/server-impl');
const { createConfig } = require('/opt/unleash/dist/lib/create-config');
const config = require('/etc/unleash/config.js');
start(createConfig(config)).then(instance => {
console.log(`Unleash running on port ${instance.app.get('port')}`);
});
Step 6: Create a Systemd Service
Create a service unit file:
sudo nano /etc/systemd/system/unleash.service
Check generated files:
[Unit]
Description=Unleash Feature Toggle Server
After=network.target postgresql.service
[Service]
Type=simple
WorkingDirectory=/opt/unleash
ExecStart=/usr/bin/node /etc/unleash/start-unleash.js
Restart=always
RestartSec=5
Environment="NODE_ENV=production"
Environment="PORT=4242"
Environment="DATABASE_URL=postgres://unleash_user:unleash_password_123@localhost:5432/unleash"
[Install]
WantedBy=multi-user.target
Reload and start Unleash:
sudo systemctl daemon-reload
sudo systemctl enable --now unleash
Check the status:
sudo systemctl status unleash
Step 7: Configure UFW Firewall
Allow SSH and Unleash’s web port (4242):
sudo ufw allow 22
sudo ufw allow 4242
sudo ufw enable
sudo ufw status
Step 8: Access Your Unleash Dashboard
Once the service is running, open your browser and visit:
http://<your_server_ip>:4242
Default credentials:
-
Username: admin
-
Password: unleash4all
Conclusion
With this setup, Unleash is running natively on Ubuntu 24.04 — powered by PostgreSQL and secured by UFW. You now have a full-featured, self-hosted feature flag system to manage releases, experiments, and toggles.
This allows teams to deploy features safely, test configurations, and control rollouts with complete infrastructure autonomy.

