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 is an open source product for the automation of enterprise processes. It includes framework components and business applications for ERP, CRM, E-Bu
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:
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.
The only requirements to run OFBiz are
$JAVA_HOME environment variable.
JDK download.
To know more about the JDKWarning - On Windows, do not install OFBiz in a directory whose path contains spaces.
To quickly install and fire-up OFBiz, please follow the below instructions from the command line at the OFBiz top level directory (folder).
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
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.
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.
Accounting Back Office interface
You can log in with the user admin and password ofbiz.
Note - In case if problems visit our Further reading section.
If you want to set and use Docker, here is the documentation.
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.
MS Windows: gradlew distZip
Unix-like OS: ./gradlew distTar
Copy the archive from build/distributions directory to the server and unarchive them with tar xf or unzip.
From the unarchived directory you can run either bin/ofbiz shell script or bin/ofbiz.bat batch script.
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.
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.
Caution - You can find more information about security in OFBiz at the site security page
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.
The syntax for tasks differ slightly between windows and Unix-like systems
gradlew ./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.
There are two types of tasks designed for OFBiz in Gradle:
Tips:
gradlew "ofbiz --help"gradlew loadAdminUserLogin -PuserLoginId=myadmin =
gradlew lAUL -PuserLoginId=myadmingradlew build -x test does not run the tests within the build.gradlew build
gradlew cleanAll loadAll testIntegration
gradlew "ofbiz --help"
gradlew "ofbiz --test" --debug-jvm
gradlew "ofbizBackground --start --portoffset 10000"
gradlew "ofbiz --shutdown --portoffset 10000"
gradlew ofbiz (default is --start)
gradlew cleanAll loadAll "ofbiz --start --portoffset 10000"
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
List all available commands to control the OFBiz server
gradlew "ofbiz --help"
List all available tasks from the build system
gradlew tasks
List all available projects in the build system
gradlew projects
Show usage and options for the Gradle build system
gradlew --help
gradlew "ofbiz --start"
start is the default server task so this also works:
gradlew ofbiz
gradlew "ofbiz --shutdown"
gradlew "ofbiz --status"
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
Starts OFBiz in remote debug mode and waits for debugger or IDEs to connect on port 5005
gradlew ofbiz --debug-jvm
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 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"
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.
OFBiz contains the following data reader types:
Available options for the --load-data server command are the following:
No open issues yet, or sync has not completed.