ObjectBox Admin
The ObjectBox Admin web app (formerly Data Browser) is an easy way to view what's happening in your database of your app using a web browser. Browse your app's data and gain insights.
Last updated
The ObjectBox Admin web app (formerly Data Browser) is an easy way to view what's happening in your database of your app using a web browser. Browse your app's data and gain insights.
Last updated
The ObjectBox Admin web app allows you to
view data objects and schema of your database inside a regular web browser,
display additional information,
and download objects in JSON format.
Admin comes in two variants: as a standalone desktop app (Docker image) and embedded in the Android library.
The web app runs directly on your device or on your development machine. Behind the scenes, this is done by embedding a lightweight HTTP server into ObjectBox. It runs completely local (no Cloud whatsoever) and you can simply open the Admin in your Browser.
To run Admin on a desktop operating system, e.g. your development machine, you can launch ObjectBox Admin instantaneously using the official ObjectBox Admin Docker image objectboxio/admin
.
This requires a running Docker Engine or Docker Desktop. If not done, install and start Docker Engine (Linux, Windows/WSL2) or Docker Desktop (Windows, macOS) capable of running a Linux/x86_64 image.
Recommended, but the below script needs to be run from a Linux distribution (for example Ubuntu through WSL2 on Windows) or macOS. To run from Windows PowerShell, see the "Run Docker manually" tab.
Download the script objectbox-admin.sh
via the link above. Make it executable (e.g. chmod +x objectbox-admin.sh
). Copy it to some place (e.g./usr/local/bin
) and then run it.
Then you can have a quick look at the options of the script:
Basically you can optionally select the path to an ObjectBox database and the mapping of the local HTTP port (e.g. to open multiple Admins to analyze multiple databases).
So to run the script, either change to the directory where the objectbox
directory with the database file data.mdb
exists:
Or pass the path to it as an argument:
If you see the error failed: port is already allocated.
try to use a different local port. E.g. to use port 8082
:
Note: If you run the script for the first time Docker will download the ObjectBox Admin image automatically from Docker Hub. If run again the download is skipped as the image has been cached in your local image repository.
Once Admin has started, open the local URL printed by the script (typically http://127.0.0.1:8081
) in your browser. You should see the Data page for an entity type.
Works for Android apps built with ObjectBox for Java or Flutter
We strongly recommend using Admin only for debug builds as it ships with additional resources and configuration not intended for production code.
Modify the app's Gradle build file to add the dependency and change the “io.objectbox” plugin to be applied after the dependencies block:
If the plugin is not applied afterwards, the build will fail with a duplicate files error (like Duplicate files copied in APK lib/armeabi-v7a/libobjectbox.so
) because the plugin fails to detect and adds the objectbox-android
library.
Finally, after creating the store, to start Admin:
Create an Admin
instance and call start
:
When Admin is started it will print the URL where to access the web app to the logs, e.g. something like:
The URL can be opened on the device or emulator. To open the web app on your dev machine, see the instructions below.
For ObjectBox for Java, the app also displays a notification to access Admin. (Don't see the notification on Android 13 or newer? Try to manually turn on notifications for the app!) Tapping it will launch a service to keep the app alive and opens the Admin web app in the web browser on the device.
Stop the keep-alive service from the notification.
To open the web app on your development machine find the Admin URL log message as noted above.
Then, on your dev machine, use the ADB command to forward the port (or whichever you like) to that port of your device. If the default port 8090 is used, the command looks like this:
Then open the web app URL in a web browser on your dev machine.
To download all objects of the currently viewed box tap the download all button at the very bottom. The exported data is in JSON format.