Want to deploy a single Server Openstack Cloud on Ubuntu 18.04 for Development and test purposes?. This guide is fit for Developers and SysAdmins looking for a simple Openstack Deployment for Learning, PoC, and Development. DevStack is a collection of scripts which enables you to deploy a complete OpenStack environment from git master, in Virtual Machine, Home Desktop or your Laptop.

For CentOS, check: How To Deploy OpenStack Cloud on CentOS 7 With Packstack RDO

DevStack Minimum Requirements

  • Fresh installation of Ubuntu 18.04
  • Minimum memory of 4 GB
  • At least 2 vCPU
  • The storage capacity of 10 GB should be sufficient.
  • Internet connection
  • User with sudo

Step 1: Update Ubuntu system

Login to your Ubuntu system – Can be Desktop or VM in the Cloud and update it.

sudo apt update
sudo apt -y upgrade
sudo apt -y dist-upgrade

Reboot it after an upgrade.

sudo reboot

Step 2: Add Stack User

Devstack should be run as a non-root user with sudo enabled. If you’re running your instance in the cloud, standard logins to cloud images such as “centos” or “ubuntu” or “cloud-user” are usually fine.

For other installations of Ubuntu 18.04, run the commands below to create DevStack deployment user.

sudo useradd -s /bin/bash -d /opt/stack -m stack

Enable sudo privileges for this user without need for a password.

echo "stack ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/stack

Switch to stack user to test.

[email protected]:~$ sudo su - stack
[email protected]:~$ sudo su -
[email protected]:~#

Step 3: Download DevStack

Clone Destack deployment code from Github.

su - stack
sudo apt -y install git
git clone https://git.openstack.org/openstack-dev/devstack

Create a local.conf file with 4 passwords and Host IP address.

cd devstack
nano local.conf



# Password for KeyStone, Database, RabbitMQ and Service

# Host IP - get your Server/VM IP address from ip addr command

Step 4: Start Openstack Deployment on Ubuntu 18.04 with DevStack

Now that you’ve configured the minimum required config to get started with DevStack, start the installation of Openstack.

cd devstack

DevStack will install;

  • Keystone – Identity Service
  • Glance – Image Service
  • Nova – Compute Service
  • Placement – Placement API
  • Cinder – Block Storage Service
  • Neutron – Network Service
  • Horizon – Openstack Dashboard

This will take a 15 – 20 minutes, largely depending on the speed of your internet connection. At the end of the installation process, you should see output like this:

This is your host IP address:
This is your host IPv6 address: 2a01:4f8:c2c:308e::1
Horizon is now available at
Keystone is serving at

The default users are: admin and demo
The password: StrongAdminSecret

Using lib/neutron-legacy is deprecated, and it will be removed in the future

Services are running under systemd unit files.
For more information see: https://docs.openstack.org/devstack/latest/systemd.html
DevStack Version: stein
Change: 8bdbf850967b90ebdca428247bb93ad2eb6478c0 Merge "Set ownership of /etc/pki/ files for TLS" 2019-03-26 08:07:26 +0000
OS Version: Ubuntu 18.04 bionic
2019-03-26 21:32:56.743 | stack.sh completed in 1761 seconds.

Step 5: Access OpenStack Dashboard

Copy the Horizon URL shown on the installation output and paste it into your web browser:

Use the default users demo or admin and configured password to login.

deploy openstack devstack ubuntu login

You should see Openstack Management Web console after logging in.

deploy openstack devstack dashboard

If you want to use Openstack command-line tool to manage your devstack. You’ve to source openrc in your shell.

source openrc

You can now add instance images to Glance to use when creating Virtual Machines with Nova. We have a comprehensive guide on Adding images to Openstack Glance.

Adding Cirros Test Image

Download Virtual Image.

wget http://download.cirros-cloud.net/0.4.0/cirros-0.4.0-x86_64-disk.img

Upload it to Glance.

openstack image create \
    --container-format bare \
    --disk-format qcow2 \
    --file cirros-0.4.0-x86_64-disk.img \

Confirm image upload.

$ openstack image list
| ID | Name | Status |
| 3c1e6e1e-a997-4f1a-a70d-06c4a6dafc37 | cirros-0.4.0-x86_64-disk | active |

It should be visible from the Web UI

openstack glance images

To learn more about DevStack customization, check the system configuration guide. This includes making adjustments to the default networking. Also refer to Openstack Documentation for administration guide.

We have Production deployment guides based on CentOS: Installation of Openstack three Node Cluster on CentOS 7

More on OpenStack:

How To Create OpenStack Instance With a Fixed / Static IP Address

How To Create OpenStack projects, users and roles

How To Migrate OpenStack Instance from one Compute Host to Another

How To Resize OpenStack Instance / Virtual Machine

Adding ssh key pair to Openstack using cli

How to add flavors to openstack using cli

Your support is our everlasting motivation,
that cup of coffee is what keeps us going!

As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

Thank You for your support as we work to give you the best of guides and articles. Click below to buy us a coffee.


  1. Hello all,
    My installation failed after running the ./stack.sh, it runs for a while and then throws this error –>
    Traceback (most recent call last):
    File “/opt/stack/requirements/.venv/lib/python3.6/site-packages/pip/basecommand.py”, line 215, in main
    status = self.run(options, args)
    File “/opt/stack/requirements/.venv/lib/python3.6/site-packages/pip/commands/install.py”, line 342, in run
    File “/opt/stack/requirements/.venv/lib/python3.6/site-packages/pip/req/req_set.py”, line 380, in prepare_files
    File “/opt/stack/requirements/.venv/lib/python3.6/site-packages/pip/req/req_set.py”, line 554, in _prepare_file
    File “/opt/stack/requirements/.venv/lib/python3.6/site-packages/pip/req/req_install.py”, line 281, in populate_link
    self.link = self._wheel_cache.cached_wheel(self.link, self.name)
    File “/opt/stack/requirements/.venv/lib/python3.6/site-packages/pip/wheel.py”, line 68, in cached_wheel
    self._cache_dir, link, self._format_control, package_name)
    File “/opt/stack/requirements/.venv/lib/python3.6/site-packages/pip/wheel.py”, line 129, in cached_wheel
    wheel_names = os.listdir(root)
    PermissionError: [Errno 13] Permission denied: ‘/opt/stack/.cache/pip/wheels/80/34/1c/3967380d9676d162cb59513bd9dc862d0584e045a162095606’
    +inc/python:pip_install:1 exit_trap
    +./stack.sh:exit_trap:503 local r=2
    ++./stack.sh:exit_trap:504 jobs -p
    +./stack.sh:exit_trap:504 jobs=
    +./stack.sh:exit_trap:507 [[ -n ” ]]
    +./stack.sh:exit_trap:513 ‘[‘ -f ” ‘]’
    +./stack.sh:exit_trap:518 kill_spinner
    +./stack.sh:kill_spinner:413 ‘[‘ ‘!’ -z ” ‘]’
    +./stack.sh:exit_trap:520 [[ 2 -ne 0 ]]
    +./stack.sh:exit_trap:521 echo ‘Error on exit’
    Error on exit
    +./stack.sh:exit_trap:523 type -p generate-subunit
    +./stack.sh:exit_trap:524 generate-subunit 1617965718 61 fail
    +./stack.sh:exit_trap:526 [[ -z /opt/stack/logs ]]
    +./stack.sh:exit_trap:529 /usr/bin/python3.6 /opt/stack/devstack/tools/worlddump.py -d /opt/stack/logs
    World dumping… see /opt/stack/logs/worlddump-2021-04-09-105620.txt for details
    +./stack.sh:exit_trap:538 exit 2

    Could anyone please help me fix this issue ?
    Thank you

  2. PermissionError: [Errno 13] Permission denied: ‘/opt/stack/.cache/pip/wheels/80/34/1c/3967380d9676d162cb59513bd9dc862d0584e045a162095606’


Please enter your comment!
Please enter your name here