Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
O

ofbiz-framework

> 数据库
Open source

Apache OFBiz is an open source product for the automation of enterprise processes. It includes framework components and business applications for ERP, CRM, E-Bu

1.1K stars0 likes4 views
WebsiteGitHub

About

Apache OFBiz is an open source product for the automation of enterprise processes. It includes framework components and business applications for ERP, CRM, E-Bu

Apache OFBiz®


Welcome to Apache OFBiz! A powerful top level Apache software project. OFBiz is an Enterprise Resource Planning (ERP) System written in Java and houses a large set of libraries, entities, services and features to run all aspects of your business.

For more details about OFBiz please visit the OFBiz Documentation page:

OFBiz documentation

OFBiz License

Notes

Note - If you want to use Eclipse, read the Setup eclipse project for OFBiz section to set it up.

Note - If you want to use an external database like MySQL or PostgreSQL, read the Setup an external database section.

Note - If you want to run OFBiz without an internet connection, read the Running gradle tasks without an internet connection section.

Note - The directory structure and repositories have changed. For more information read the Repository and directory structure section.

Note - If you are in China you may encounter network issues or proxy settings. This is unrelated to OFBiz.

System requirements

The only requirements to run OFBiz are

  • to have the Java Development Kit (JDK) version 17 installed on your system (not just the JRE, but the full JDK) that you can download from the link below. Make sure to set the $JAVA_HOME environment variable. JDK download. To know more about the JDK

Warning - On Windows, do not install OFBiz in a directory whose path contains spaces.

  • If on Windows, a Powershell version >= 7.1.3 installed that you can download from the below link. Powershell

Quick start

To quickly install and fire-up OFBiz, please follow the below instructions from the command line at the OFBiz top level directory (folder).

Download the Gradle wrapper

MS Windows: init-gradle-wrapper

Important

  • If you encounter an error

"Powershell is not recognized as an internal or external command, operable program or batch file"

follow the advice at: https://s.apache.org/vdcv8. If you want more details see: https://s.apache.org/urnju

  • If you run into problems, check the execution policy of PowerShell. See https://s.apache.org/urnju for details. By setting the execution policy to "unrestricted", you'll be prompted to run the script once you run the init-gradle-wrapper command.

Note - If you wonder where are stored the PowerShell Executables, here are the answers: https://s.apache.org/w5dye

Unix-like OS: ./gradle/init-gradle-wrapper.sh

Prepare OFBiz

Clean system and load the complete OFBiz data

Note - Depending on your Internet connection speed it might take a long time for this step to complete if you are using OFBiz for the first time as it needs to download all dependencies. So please be patient!

MS Windows: gradlew cleanAll loadAll

Unix-like OS: ./gradlew cleanAll loadAll

Warning - This command deletes all previous data and resets it to the initial demo data.

Start OFBiz

MS Windows: gradlew ofbiz

Unix-like OS: ./gradlew ofbiz

Note - Ignore the % progress indicator because this task does not end as long as OFBiz is running.

Visit OFBiz through your browser

Order Back Office interface

Accounting Back Office interface

Administrator interface

You can log in with the user admin and password ofbiz.

Note - In case if problems visit our Further reading section.

Docker

If you want to set and use Docker, here is the documentation.

Production setup

Note - Currently, deployment configuration is tied to the source code. If you want to separate deployment configuration from production code we recommend using Docker, see Docker section above.

Following is a simple production setup. For more detailed information visit Apache OFBiz Technical Production Setup Guide.

Package OFBiz

MS Windows: gradlew distZip

Unix-like OS: ./gradlew distTar

Copy to server

Copy the archive from build/distributions directory to the server and unarchive them with tar xf or unzip.

Run OFBiz

From the unarchived directory you can run either bin/ofbiz shell script or bin/ofbiz.bat batch script.

Install as a service

MS Windows: you can use nssm.

Unix-like OS: This article might give you an idea, although it seems to be outdated. Either way, you can use the standard mechanism of your distribution, like for example creating an /etc/systemd/system/ofbiz.service file.

Troubleshooting

On Windows you might get the following error when trying to run the ofbiz.bat script: The input line is too long. The syntax of the command is incorrect.

The current workaround is to clone the repository and run gradlew commands from the root folder instead.

Security

Caution - You can find more information about security in OFBiz at the site security page

Build system syntax

All build tasks are executed using the Gradle build system which is embedded in OFBiz. To execute build tasks go to OFBiz top-level directory (folder) and execute tasks from there.

Operating System Syntax

The syntax for tasks differ slightly between windows and Unix-like systems

  • Windows: gradlew
  • Unix-like: ./gradlew

For the rest of this document, we will use the windows syntax, if you are on a Unix-like system, you need to add the ./ to gradlew.

Types of tasks in Gradle

There are two types of tasks designed for OFBiz in Gradle:

  • Standard tasks: To execute general standard Gradle tasks
  • OFBiz server tasks: To execute OFBiz startup commands. These tasks start with one of the following words:
    • ofbiz : standard server commands
    • ofbizBackground : server commands running in a background forked process

Tips:

  • OFBiz server commands require "quoting" the commands. For example: gradlew "ofbiz --help"
  • Shortcuts to task names can be used by writing the first letter of every word in a task name. However, you cannot use the shortcut form for OFBiz server tasks. Example: gradlew loadAdminUserLogin -PuserLoginId=myadmin = gradlew lAUL -PuserLoginId=myadmin
  • Dependent tasks can be skipped with the -x switch. Example: gradlew build -x test does not run the tests within the build.

Example standard tasks

gradlew build

gradlew cleanAll loadAll testIntegration

Example OFBiz server tasks

gradlew "ofbiz --help"

gradlew "ofbiz --test" --debug-jvm

gradlew "ofbizBackground --start --portoffset 10000"

gradlew "ofbiz --shutdown --portoffset 10000"

gradlew ofbiz (default is --start)

Example mixed tasks (standard and OFBiz server)

gradlew cleanAll loadAll "ofbiz --start --portoffset 10000"

Quick reference

You can use the below common list of tasks as a quick reference for controlling the system. This document uses the windows task syntax, if you are on a Unix-like system, you need to add the ./ to gradlew i.e. ./gradlew

Help tasks

List OFBiz server commands

List all available commands to control the OFBiz server

gradlew "ofbiz --help"

List build tasks

List all available tasks from the build system

gradlew tasks

List build projects

List all available projects in the build system

gradlew projects

Gradle build system help

Show usage and options for the Gradle build system

gradlew --help

Server command tasks

Start OFBiz

gradlew "ofbiz --start"

start is the default server task so this also works:

gradlew ofbiz

Shutdown OFBiz

gradlew "ofbiz --shutdown"

Get OFBiz status

gradlew "ofbiz --status"

Force OFBiz shutdown

Terminate all running OFBiz server instances by calling the appropriate operating system kill command. Use this command to force OFBiz termination if the --shutdown command does not work. Usually this is needed when in the middle of data loading or testing in OFBiz.

Warning: Be careful in using this command as force termination might lead to inconsistent state / data

gradlew terminateOfbiz

Start OFBiz in remote debug mode

Starts OFBiz in remote debug mode and waits for debugger or IDEs to connect on port 5005

gradlew ofbiz --debug-jvm

Start OFBiz on a different port

Start OFBiz of the network port offsetted by the range provided in the argument to --portoffset

gradlew "ofbiz --start --portoffset 10000"

Start OFBiz in the background

Start OFBiz in the background by forking it to a new process and redirecting the output to runtime/logs/console.log

gradlew "ofbizBackground --start"

OR

gradlew ofbizBackground

You can also offset the port, for example:

gradlew "ofbizBackground --start --portoffset 10000"

Passing JVM runtime options to OFBiz

You can pass JVM runtime options by specifying the project property -PjvmArgs.

gradlew ofbiz -PjvmArgs="-Xms1024M -Xmx2048M" -Dsome.parameter=hello

If you do not specify jvmArgs, a default of -Xms128M -Xmx1024M is set.

Data loading tasks

OFBiz contains the following data reader types:

  • seed: OFBiz and External Seed Data - to be maintained along with source and updated whenever a system deployment is updated
  • seed-initial: OFBiz and External Seed Data - to be maintained along with source like other seed data, but only loaded initially and not updated when a system is updated except manually reviewing each line
  • demo: OFBiz Only Demo Data
  • ext: External General Data (custom)
  • ext-test: External Test Data (custom)
  • ext-demo: External Demo Data (custom)
  • tenant: Data to load into the master tenants database "ofbiztenant". This data is required to identify where a tenant's database is located. For more information you can review the relevant tenant documentation

Available options for the --load-data server command are the following:

  • readers=[name]: only load data from certain readers separated by comma. e.g. seed,seed-initial,ext
  • file=[path]: load a single file from location or several files separated by commas. e.g. /my/file/1,/my/file/2
  • dir=[path]: load all data files found in directory
  • component=[name]: only load data from a specific component. e.g. base
  • delegator=[name]: use the defined delegator. Default is "default". If the value passed is "all-tenants", then OFBiz will load the data for all defined tenants in the system.
  • group=[name]: override the entity group (org.apache.ofbiz). e.g. com.example.something
  • timeout=[millis]: timeout in milliseconds
  • create-pks: create primary keys
  • drop-pks: drop primary keys
  • create-constraints: create indexes and foreign keys after loading
  • drop-constraints: drop indexes and foreign keys before loading
  • create-fks: create dummy (placeholder) foreign keys
  • maintain-txs: maintain timestamps in data file
  • try-inserts: use mostly inserts
  • repair-columns: repair column sizes (default is true w/ drop-constrai

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Javacontentdatabasegeospatialgroovy

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category数据库
PricingOpen source

> Related tools

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库