This document explains how to start Openblocks server locally.
Java - OpenJDK 17 Maven - Version 3+ (preferably 3.8+)
If you don't have an available MongoDB, you can start a local MongoDB service with docker:
docker run -d --name openblocks-mongodb -p 27017:27017 -e MONGO_INITDB_DATABASE=openblocks mongoConfigure the MongoDB connection URI in the application-openblocks.yml
If you don't have an available MongoDB, you can start a local Redis service with docker:
docker run -d --name openblocks-redis -p 6379:6379 redisConfigure the Redis connection URI in the application-openblocks.yml
- Clone Openblocks repository
- Next, execute the following commands in sequence
cd server
mvn clean package
java -Dpf4j.mode=development -Dspring.profiles.active=openblocks -Dpf4j.pluginsDir=openblocks-plugins -jar openblocks-server/target/openblocks-server-1.0-SNAPSHOT.jarConfigure the Run/Debug configuration as shown in the screenshot below, the version used in the screenshot is IntelliJ
IDEA 2021.3.2 (Community Edition):

| JDK version | Java 17 |
| -cp | openblocks-server |
| VM options | -Dpf4j.mode=development -Dpf4j.pluginsDir=openblocks-plugins -Dspring.profiles.active=openblocks -XX:+AllowRedefinitionToAddDeleteMethods --add-opens java.base/java.nio=ALL-UNNAMED |
| Main class | com.openblocks.api.ServerApplication |
Next, execute the following commands in sequence
cd server
mvn clean packageAfter Maven package runs successfully, you can start the Openblocks server with IntelliJ IDEA.




