# OAK4 Advanced

## Connect to the camera through SSH or ADB

#### SSH

### Connecting with ethernet

### Enabling SSH

By default SSH access via password is disabled on devices running OS version 1.18 and newer. There are two ways of enabling it:

 * Setting up the camera with [Luxonis
   Hub](https://docs.luxonis.com/hardware/platform/deploy/oak4-deployment-guide/oak4-getting-started.md) or
   [locally](#OAK4%2520Advanced-Local%2520Setup) enables SSH access with the given password,
 * executing oakctl device unlock on host computer while device is connected on the same network ([download and install
   oakctl](https://docs.luxonis.com/software-v3/oak-apps/oakctl.md)).

### Usage

To access the device via SSH, you will need to know its IP address. You can find it by connecting the device to your network and
checking the DHCP leases on your router, or using a network scanning tool like nmap or some IP scanner app. Alternately you can
also run oakctl list to find OAK devices in your local network.

```bash
# SSH into the the device
$ ssh root@IP_ADDRESS
```

To transfer a file to the device you can use scp:

```bash
$ scp folder/file.txt root@IP_ADDRESS:/data/
# Or a folder
$ scp -r folder/ root@IP_ADDRESS:/data/
```

#### ADB

### Connecting with USB (only for ADB debug connection)

### Power:

OAK4 can draw up to 25W (peaks), so connecting it directly to a computer USB port may cause crashes and is not supported. Our
[Y-Adapter](https://docs.luxonis.com/hardware/products/Y-adapter.md) is also incompatible due to the high power demand. We
recommend powering via PoE+ (802.3at, 30W) injector/switch.

### Communication:

When connected to the computer via USB-C, OAK4 will be detected as a USB device and will be accessible via ADB ([Android Debug
Bridge](https://developer.android.com/tools/adb)). This is useful for debugging and development purposes, but does not allow
running depthAI and oakctl scripts.

> **ADB connection tip**
> ADB can intermittently fail if the camera is connected through
> **a USB hub**
> or a
> **low-quality USB cable**
> . Use a
> **good quality USB-C cable**
> and plug the camera
> **directly into the computer**
> with no hub in between for most reliable performance.

### Preparation

Install the [oakctl tool](https://docs.luxonis.com/software-v3/oak-apps/oakctl.md) on your host computer as it bundles the adb
commands you'll need.

### Usage

To access the device via ADB you will need to run the following commands from the host computer:

```bash
$ oakctl adb devices
```

If the device is listed, you can proceed with the following commands to open a shell on the device:

```bash
$ oakctl adb shell
```

To transfer a file to the device you can use oakctl adb push:

```bash
$ oakctl adb root
$ oakctl adb push folder/file.txt /data/
# Or a folder
$ oakctl adb push folder/ /data/
```

## Set static IP

> Setting a static IP on OS version
> **1.20.5**
> will not work due to a fault in that release. If you're using this version, we strongly recommend
> [upgrading to a newer OS](https://docs.luxonis.com/software-v3/sw-stack/luxonis-os.md)
> before attempting to configure a static IP.

A static IP is helpful when the camera must maintain a constant, predictable address that other systems can reliably reference.
This configuration assumes you already have an active connection to the camera.

> **No DHCP**
> If no DHCP server is available, please refer to the
> [**No DHCP section in
Troubleshooting**](https://docs.luxonis.com/hardware/platform/deploy/oak4-deployment-guide/oak4-getting-started.md)
> .

You can set static IP manually in:

 * advanced settings when setting up the camera either with [Luxonis
   Hub](https://docs.luxonis.com/hardware/platform/deploy/oak4-deployment-guide/oak4-getting-started.md) or
   [locally](#OAK4%2520Advanced-Local%2520Setup).
 * by connecting to the camera (either
   [ADB/SSH](#OAK4%2520Advanced-Connect%2520to%2520the%2520camera%2520through%2520SSH%2520or%2520ADB) ) and using agentconfd
   configure tool:

```bash
agentconfd configure --help
Usage: agentconfd configure [OPTIONS] [NETWORK_CONFIG]

Arguments:
  [NETWORK_CONFIG]  Either "dhcp" or "ipv4,ipv4_mask,ipv4_gateway"
```

So you can either set a static IP address or revert to DHCP:

```bash
# ADB/SSH into the device first, then on device set static IP:
agentconfd configure 192.168.10.15,255.255.255.0,192.168.10.1
# Revert back to DHCP:
agentconfd configure dhcp
```

## Configure DNS

When using DHCP, you can still override the DNS server that the device uses. This is helpful in closed networks, when the DHCP
server does not provide DNS, or when you need to point the device to a specific resolver.

Connect to the camera first (via SSH or ADB), then run:

```bash
# ADB/SSH into the device first, then on device run:
agentconfd configure dhcp --dns 10.12.102.2
```

If name resolution still fails, try a known public resolver (only if your network policy allows it):

```bash
agentconfd configure dhcp --dns 8.8.8.8
```

Example session:

```bash
~ # agentconfd configure dhcp --dns 10.12.102.2
[2026-02-06T13:49:15Z INFO  agentconfd] Success!
~ # ping google.com
ping: bad address 'google.com'
~ # agentconfd configure dhcp --dns 8.8.8.8
[2026-02-06T13:49:30Z INFO  agentconfd] Success!
~ # ping google.com
PING google.com (142.250.203.142): 56 data bytes
64 bytes from 142.250.203.142: seq=0 ttl=251 time=11.978 ms
64 bytes from 142.250.203.142: seq=1 ttl=251 time=14.046 ms
```

If ping by hostname fails but ping by IP succeeds, DNS is misconfigured. Adjust the DNS server or verify that outbound DNS is
allowed on your network.

## Local Setup

This section covers an advanced path for setting up an OAK device using oakctl, including cases where internet access is not
available. This method can be used when you need full local control of the setup process—for example:

 * Setting up the camera without connecting to the Luxonis Hub.
 * Enabling SSH access for development or debugging.
 * Resetting the device password locally.
 * Configuring advanced network settings, such as assigning a static IP when DHCP is unavailable.

Use local setup in these scenarios or any environment where network restrictions or workflow requirements prevent using the
standard cloud-based setup.

### 1. Power device

Connect the PoE/ETH cable to power up the device

### 2. Verify oakctl version

Ensure you have oakctl version 0.16.2 or higher installed by executing oakctl version. If necessary, update with oakctl
self-update.

### 3. Put device in Setup Mode

Ensure the device is ready for setup (status light on camera blinking blue) by setting it in Setup Mode:

```bash
oakctl start-setup
```

### 4. Setup your device

#### Using setup.luxonis.com

Use this option if you want a simple, guided local setup experience. The web-based wizard automatically generates configuration
values for your deployment. Go to [setup.luxonis.com](https://setup.luxonis.com) and select Setup Locally, then follow the
on-screen instructions to configure your camera.

#### Using command line

This option is useful if you don't have internet access and/or want to setup your camera using command-line. The minimal command
to set a password and enable ssh:

```bash
oakctl setup -p <INSERT_PASSWORD_HERE> --dont-check-internet
```

And make sure you replace <INSERT_PASSWORD_HERE> in the command with your preferred password. To see other options execute oakctl
setup --help.

> If multiple devices are connected to the same network,
> `oakctl`
> may prompt you to select which device to configure.

> **Need WiFi connectivity?**
> See
> [OAK4 WiFi](https://docs.luxonis.com/hardware/platform/deploy/oak4-wifi.md)
> for supported USB-C WiFi dongles and setup instructions.

## Frequently asked questions

Can USB and PoE be used simultaneously?

Yes, if your goal is to:

 * provide power over USB and use a non-PoE cable for communication.
 * provide power over PoE and use USB for ADB communication

### Need assistance?

Head over to [Discussion Forum](https://discuss.luxonis.com/) for technical support or any other questions you might have.
