OFBiz from scratch: Install and run OFBiz

Share this post

Apache OFBiz is an open source suite of business applications that companies can use to manage customer relationships, order processing, warehouse management, HR and lots of other functions.

Feature rich software such as OFBiz does require some up-front configuration which can seem complicated to new users. To remedy this, the project will normally recommend new users load demonstration data into OFBiz to have a number of configuration items already in place.

Although helpful to get up and running faster, the demo data will likely contain items that are not relevant to your business and may confuse your users.

In this OFBiz from scratch series of articles, we will walk through various scenarios using minimal set up to get you using OFBiz. No demo data will be used.

Need OFBiz Support?

Watford Consulting staff are members of the Apache OFBiz Project Management Committee, regularly creating, reviewing and testing changes to the project’s software.

Contact us for consulting, development and support for Apache OFBiz.

Using Docker to run OFBiz

To get you up and running with OFBiz as quickly as possible, in this article we walk through installing and running OFBiz, with a PostgreSQL database, using Docker containers.

Docker containers are popular software deployment mechanism as they encapsulate all the dependencies of an application. This means we don’t need to install additional components, such as Java Software Development Kits and build tools, to get OFBiz running.

However we will need to get Docker installed on our server.

If you are just trying out OFBiz, there is no need to deploy to server grade hardware.

The resource requirements are quite low so you should find OFBiz runs perfectly fine for testing and light use on your desktop computer.

However if your organisation comes to depend on OFBiz as business critical software then you should consider hosting on a server with an appropriate backup regime.


Deploying OFBiz using Docker containers will reduce the complexity of setting up your server machine, but you will need to get Docker running first.

If you are going to host OFBiz on a Windows 10 or Windows 11 computer, we recommend you have the following installed:

  • Windows Terminal
  • WSL
  • Docker Desktop

This is the configuration we will assume for this article.

If you decide to use a different configuration, ensure you have an environment with a unix-like terminal – e.g. bash – as this will be needed to run the scripts used to launch OFBiz.

Install Windows Terminal

See this page for instructions on installing Windows Terminal: Windows Terminal installation | Microsoft Learn

Install WSL

Visit this page for instructions on installing WSL: Install WSL | Microsoft Learn

Install Docker Desktop

Install Docker Desktop by following the instructions on this page: Download Docker Desktop | Docker

Depending on your circumstances you may need a paid subscription to use Docker.

As of January 2023, Docker Desktop is free to use for organisations with fewer than 250 employees and less than $10 million in annual revenue. See the Docker website for up to date information on subscriptions.

This Docker help article – Install on Windows | Docker Documentation – goes into more detail on installing Docker Desktop. The important step to note is:

2. When prompted, ensure the Use WSL 2 instead of Hyper-V option on the Configuration page is selected or not depending on your choice of backend.

If your system only supports one of the two options, you will not be able to select which backend to use.

Once installed launch Docker Desktop by tapping the Windows key and typing docker. Docker Desktop can be launched from the filtered list of applications.

Installing and running OFBiz

Now that Docker is running we are ready to install OFBiz.

Open Windows Terminal by tapping the Windows key and typing terminal. Terminal can be selected from the filtered list of applications. [Note: do not select Command Prompt]

Windows Terminal will load and display an instance of its default terminal.

We will need an Ubuntu terminal to run the bash scripts used in this article. If this is not loaded by default, an Ubuntu terminal can be created by selecting the relevant item from the drop-down menu in the title bar.

Next we’ll create a directory to store our OFBiz deployment files. For our example we will create a directory at $HOME/ofbiz. Make the directory and change to it using the following commands in the Ubuntu terminal:

					mkdir ofbiz
cd ofbiz

Get the configuration files and scripts

A GitHub repository containing the scripts and docker configuration files needed to get up and running can be found here: danwatford/docker-postgres-ofbiz (github.com)

If you are comfortable with git, you can clone this repository. Otherwise use the following commands to download and extract the repository’s files:

					wget https://github.com/danwatford/docker-postgres-ofbiz/archive/refs/heads/main.zip
unzip main.zip

Initialise OFBiz

Change to the docker-postgres-ofbiz-main directory created with unzipping the repository files above:

					cd docker-postgres-ofbiz-main/

Our Docker configuration for OFBiz will make use of two containers, one for a PostgreSQL database which will store all of OFBiz’ data, and the other for the OFBiz application.

The first step in initialising OFBiz is to load seed data into the database. This can be done by running:


This script will do the following:

  • Retrieve the latest project source code for the 22.01 release of Apache OFBiz. [Note: as of writing, 22.01 has not yet been released but no changes, other than bug fixes, are permitted to the sources.]
  • Extract those sources to directory, ofbiz/apache-ofbiz.
  • Retrieve the docker container image for PostgreSQL.
  • Build a docker image for OFBiz, based on the downloaded sources.
  • Launch the PostgreSQL container.
  • Launch the OFBiz container with instructions to load seed data.

The above process can take several minutes, but once complete OFBiz will be up and running.

You can access ofbiz at https://localhost:8443/partymgr

Username: localadmin

Password: ofbiz

The localadmin user has access to all parts of OFBiz.

Shutdown OFBiz

For large applications, such as OFBiz, it is a good idea to trigger a clean shutdown before you turn off your computer.

To shutdown OFBiz and the PostgreSQL containers, run:


Starting OFBiz

The initialisation steps above should only be run the first time launch OFBiz.

For subseqent OFBiz launches, change to the ofbiz/docker-postres-ofbiz-main directory and run:


Next steps

No demonstration data has been loaded, so configuration and reference data will need to be created depending on the task we want to perform.

See other articles in the OFBiz from scratch series as they are published for walkthroughs on configuring and using OFBiz.

OFBiz consulting, development and support

Apache OFBiz is an open source Enterprise Resource Planning (ERP) tool with modules for accounting, ecommerce, order processing, warehouse management and staff management.

The functionality offered in OFBiz is vast, but most businesses will need to customise OFBiz to meets their needs. We can help make those changes and assist with OFBiz roll-out within your business.

Watford Consulting are committers to the Apache OFBiz project, regularly creating, reviewing and testing changes to the project’s software.

Share this post

Daniel Watford

Daniel Watford

A Software Consultant with over 20 years experience building solutions to help organisations solve problems and improve their business processes with both bespoke software and off-the-shelf IT.