oakctl tool
oakctl is a command-line tool that allows you to interact with your OAK4 cameras. It can be used to create, deploy, and manage apps and devices that are running the oak-agent service and are on the local network.
Note that oak-agent is pre-installed on OAK4 devices (it's baked into the Luxonis OS), so you can start using oakctl right away.Installation
Linux/MacOS
Windows
Linux/MacOS
On 64bit system, run:
Command Line
1bash -c "$(curl -fsSL https://oakctl-releases.luxonis.com/oakctl-installer.sh)"Update
oakctl tool later like this:Command Line
1oakctl self-updateProblems updating on Windows
If you have problems updating the oakctl version on Windows, download the installer from here.
Usage
Connect to a device
Command Line
1oakctl connectCommand Line
1oakctl connect 10.0.1.24--with-password flag. This will prevent you from entering the password every time the session expires.Find devices
oakctl allows you to interact with your devices that have oak-agent installed. You can list all available devices (found on your network) with the following command:Command Line
1oakctl list
2+---+---------------+---------------+------------+----------------+---------------+-------+
3| # | Serial Number | Device | Connection | OS | Agent Version | Setup |
4+=========================================================================================+
5| 1 | 1623452492 | Luxonis, Inc. | 10.0.1.24 | OS RVC4 1.18.0 | 0.13.7 | OK |
6| | | OAK4-D R7 | | | | |
7+---+---------------+---------------+------------+----------------+---------------+-------+App Development
Command Line
1oakctl app run /app/path/to/sourceoakctl app run uses oakapp.toml from the provided app directory. Use --oakapp-file to select an alternative config file (for example oakapp.dev.toml or oakapp.prod.toml), as long as that file is inside the same app directory tree.Optional flags:
| Flag | Description |
|---|---|
-b, --detach | Run the app in detached mode. You can stop it with oakctl app stop <APP_ID>. |
-d, --device [<DEVICE>] | Specify device using IP, IP:PORT, index, or Serial Number from oakctl list. |
-i, --invalidate | Invalidate cache and force rebuild. |
-e, --env <KEY=VALUE> | Export runtime environment variable to the app (can be provided multiple times). |
--env-file <FILE> | Export runtime environment variables from a .env file. |
--oakapp-file [<PATH>] | Use an alternative oakapp.toml file (for example dev/prod variants) from inside the provided app directory tree. |
--preserve-line-endings | Disable automatic CRLF to LF conversion before uploading files to device. |
Example apps
oakapp.toml:Command Line
1git clone https://github.com/luxonis/oak-examples.git
2cd oak-examples
3# Run an app
4oakctl app run ./neural-networks/pose-estimation/human-pose # or some other exampleApp Management
-d, --device <DEVICE> to specify the device to run the command on (IP address or index from the oakctl list).List installed apps
com.luxonis.default).Command Line
1$ oakctl app list
2+---+--------------------------------------+---------------------------+---------+--------------+
3| E | App Id | Identifier | Status | Frontend URL |
4+===============================================================================================+
5| * | f8da56a4-b602-45ec-8fda-7588bf7c473a | com.luxonis.default:1.3.8 | running | 10.0.1.24 |
6+---+--------------------------------------+---------------------------+---------+--------------+E) has asterisk if the app is enabled. Use oakctl app list --long to always show full App IDs. App control commands accept both full App IDs and unique prefixes.Any app can be in one of the following states: installing, building, ready, starting, running, stopping, stopped, deleting, deleted, unknown.Ready means the app is installed and ready to run, but it was not started since the agent was started, while stopped means the app is installed but not running, it was stopped by the user.App control flow
start, stop, and delete. First, let's start the app:Command Line
1$ oakctl app start 612a745c-8d68-4264-a3d6-d06d14275ef5
2Starting app 612a745c-8d68-4264-a3d6-d06d14275ef5 ...
3 App has been started!Command Line
1$ oakctl app start 612a745cCommand Line
1$ oakctl app logs <app-id>
2Reading logs ...
3 Press Ctrl+C to stop reading logs.
4 App output:
5 [2025-02-12T14:37:54Z] Hello cli 1 / Wed Feb 12 14:37:54 UTC 2025-n flag:Command Line
1oakctl app logs <app-id> -n 10Command Line
1oakctl app logs <app-id> --no-followCommand Line
1$ oakctl app stop 612a745c-8d68-4264-a3d6-d06d14275ef5
2Stopping app 612a745c-8d68-4264-a3d6-d06d14275ef5 ...
3 App has been stopped!Command Line
1$ oakctl app delete 612a745c-8d68-4264-a3d6-d06d14275ef5
2Deleting app 612a745c-8d68-4264-a3d6-d06d14275ef5 ...
3 App has been deleted!Command Line
1oakctl app enable <app-id>disable command:Command Line
1oakctl app disable <app-id>exec command:Command Line
1oakctl app exec <app-id> -i /bin/bashNote
Be careful when modifying files or saving data inside the container, as changes can be lost when the container is stopped or removed.Better approach is to mount a persistent folder from the host device into the container using mounts (see
oakapp.toml configuration).Install an app
--enable=false or --keep-others flags.App installation is done by following command:Command Line
1$ oakctl app install com-example-emotion_recognition_1-0-1.oakapp
2Sending data to agent ...
3 Data sent successfully!
4
5✔ Oakapp package built successfully.
6Installed app has ID: ddb8a884-d9e1-4779-a88b-c30d5d1e265f
7
8Start the app: oakctl app start ddb8a884-d9e1-4779-a88b-c30d5d1e265f*.oakapp file, from Hub (by identifier) or from URL.If you want to install app from Hub, do this:Command Line
1# Install app by identifier
2oakctl app install -i com.example.appCommand Line
1# Install app by URL
2oakctl app install -u https://example.com/app.oakappBuild And Publish App
*.oakapp file that can be installed on other devices:Command Line
1oakctl app build ./folder/app/srcoakctl app build uses oakapp.toml from the provided app directory. Use --oakapp-file to select an alternative config file (for example oakapp.dev.toml or oakapp.prod.toml), as long as that file is inside the same app directory tree.Optional flags:-d, --device [<DEVICE>]- specify device using IP,IP:PORT, index, or Serial Number fromoakctl list-k, --keep- keep the container after the build (useful if you want tooakctl app startit right after the build)-p, --publish- publish the app to the Hub after the build (the app will show up in the Hub's OAK4 Apps).-O, --optimized- build the app in optimized mode (smaller size, longer build time)-U, --update-description- update the app description on the Hub if the app is published-N, --no-download- do not download the*.oakappfile to host after build-o, --output [<PATH>]- path to the directory where the built*.oakappfile should be downloaded--oakapp-file [<PATH>]- use an alternativeoakapp.tomlfile from inside the provided app directory tree--preserve-line-endings- disable automatic CRLF to LF conversion before uploading files to device
oakapp.toml file.Hub connection
Command Line
1oakctl hub loginCommand Line
1oakctl hub statusoakctl hub login again and select the team in the web login flow. oakctl hub switch-team is an alias to oakctl hub login.Logout using:Command Line
1oakctl hub logout*.oakapp packages:Command Line
1oakctl hub publish <oakapp-file>Command Line
1oakctl hub run-script <script-file>Device Management
Device Info
Command Line
1$ oakctl device info
2Device Info:
3 OS: Luxonis OS RVC4 1.4.0
4 Agent Version: 2.0.11 (rvc4)
5 Architecture: linux/arm64
6 Serial Number: 2713799968
7 Model: Luxonis, Inc. KalamaP OAK4-D R1Device Update
CHANNEL are stable and beta:Command Line
1oakctl device update --channel=[CHANNEL]--select flag:Command Line
1oakctl device update --select --channel=[CHANNEL]Device Reboot
oakctl:Command Line
1oakctl device rebootDevice Unlock
Command Line
1oakctl device unlockDevice Flash
Command Line
1oakctl device flash [<path-to-tar.xz>]*.tar.xz image is optional; if not specified, the latest stable image will be downloaded and flashed. For detailed flashing and OS update instructions see updating OS page.oak-agent
oak-agent is a service that runs on the OAK4 device and manages the containers. It's responsible:- Managing apps, running containers
- Communicating with the
oakctltool - Communicating with the Hub (cloud platform)
Containers
runc as a lightweight container runtime, which is also what Docker/Podman uses. We opted-in for runc because it's lightweight and gives us full control over the container lifecycle.Release Notes for oakctl and oak-agent
agent v0.18.3, oakctl v0.18.2 (February 17, 2026)
Added
- Image download progress reporting during
oakctl app buildandoakctl app runcommands. - GPU support for self-hosted agent, which allows oak apps to use the host's Nvidia GPU if enabled.
oakctl app [build|run] --oakapp-file [PATH]arg to specify a custom path to theoakapp.tomlfile.oakctl app logs --no-followarg to avoid attaching to the log stream.- Remote command execution from Luxonis Hub.
- Replaced
--*-b64arguments ofoakctl setupwith a new subcommandoakctl setup-b64. - Rejection of relative paths in
oakapp.tomlmount fields:required_mounts,required_devices,optional_mounts,optional_devices,additional_mounts. oakctl device updatesupport for self-hosted oak-agent.
Fixed
Failed to mount overlayfserror onoakctl app buildwhen trying to use a base image with many layers (around 30).oakctl adbon jetson.- Added installation of QDL udev rules to
oakctl self-update.- Fixes some instances of
qdl: Failed to open deviceduringoakctl device flash.
- Fixes some instances of
/etc/resolv.confmissing in container on second app run after editingoakapp.toml.
agent v0.17.4, oakctl v0.17.4 (January 15, 2026)
Added
oakctl app build --output [PATH]argument to indicate where to download the*.oakappfile after building it.- Base64-encoded arguments of
oakctl setupcommand to ensure cross-OS-compatible escaping of special characters for the Hub-generated setup command. - Automated check for new
oakctlversions once per day. oakctl app prune-storagecommand to remove unnecessary app files.oakctl app list --longflag to show full App ID.oak-agenttests WebRTC connection.oakctl device infoandoakctl listshow adoption status.- Welcome ACK factory reset support.
oakctl app installupdates an existing app by default.- Can be modified with
--force-newflag to install as a new app. - Can be modified with
--updateflag to update a specific existing app.
- Can be modified with
oakctl app install --env / --env-fileto set environment variables during app installation.- Multiplatform self-hosted Docker image.
Changed
oakctl app listnow shows App IDs truncated to 3 characters by default; truncation increases automatically when there are collisions.oak-agentsaves new app build metadata.- Self-hosted WebRTC terminal opens host shell instead of container shell.
oakctl app <ACTION> <app-id>commands now accept both full and truncated App IDs.
Fixed
- Fixed an issue where OTA update status deserialization failed if multiple messages were received in a single read.
oakctlon Windows converts CRLF to LF automatically.- Self-hosted
oak-agent/oakctlfixes:- fixed
oakctl device info --check_internet - fixed
oakctl device reboot - fixed
oakctl setupcommand (failed on some devices like RPi) adbbinary for ARM devices was missing (mistakenly included x86 binary instead)
- fixed
- Fixed app publish upload with
OAKCTL_HUB_TOKEN. oakctlbuilds for macOS ARM and Windows were not signed.- Fixed build cache invalidation for
oak-agent. - Fixed an issue where
oakctldid not save and/or readsn-data.jsoncorrectly.
Deprecated
OAKCTL_HUB_LOGIN_TOKENenv renamed toOAKCTL_HUB_TOKEN.oakctl hub switch-teamis now an alias tooakctl hub login(team is selected in web login flow).--enabledflag renamed from-eto-E.
oakctl v0.16.5 (December 15, 2025)
Added
- New flag
--yesfor non-interactiveoakctl device update. - New flag
--check_internetforoakctl device updateto check internet connectivity before updating. oakctl viewercommand to open Viewer is enabled.- New flag
--no-downloadforoakctl app buildto skip downloading built*.oakappfile to host; useful for tests. - New flags
--enableand--disable-othersforoakctl app start.
Changed
oakctl hub loginnow uses web-based authentication flow.- Minor improvements for integration into Viewer.