---
title: How to Use a BYOIP Address with a Load Balancer
description: Assign one of your own BYOIP addresses to a regional load balancer when you create it.
product: Networking
url: https://docs.digitalocean.com/products/networking/load-balancers/how-to/use-byoip/
last_updated: "2026-09-03"
---

> **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](https://docs.digitalocean.com/llms.txt). Markdown versions of pages use the same URL with `index.html.md` in place of the HTML page (for example, append `index.html.md` to the directory path instead of opening the HTML document).

# How to Use a BYOIP Address with a Load Balancer

DigitalOcean fully manages Regional Load Balancers and Global Load Balancers, ensuring they are highly available load balancing services. Load balancers distribute traffic to groups of backend resources in specific regions or across different regions, which prevents the health of a service from depending on the health of a single server, cluster, or region.

When you create an external regional load balancer, you can assign an IP address from one of your [Bring Your Own IP (BYOIP)](https://docs.digitalocean.com/products/networking/reserved-ips/how-to/provision-byoip/index.html.md) prefixes instead of receiving a randomly assigned DigitalOcean IP address. This lets the load balancer keep an address you already own and control.

You can only set a BYOIP address when you create the load balancer. You cannot change the address afterward, and you cannot use BYOIP with global or internal load balancers.

## Prerequisites

- An **Active**, advertised BYOIP prefix in the same region as the load balancer you want to create. To bring a prefix to DigitalOcean, see [How to Provision a BYOIP Prefix](https://docs.digitalocean.com/products/networking/reserved-ips/how-to/provision-byoip/index.html.md).
- An unassigned IP address from that prefix. The first and second IP addresses of a BYOIP subnet are reserved and cannot be assigned.

## Use a BYOIP Address Using the CLI

To assign a BYOIP address when you create a load balancer using `doctl` version `v1.165.0` or higher, pass the address to the `--ip` flag of the [`doctl compute load-balancer create`](https://docs.digitalocean.com/reference/doctl/reference/compute/load-balancer/create/index.html.md) command:

```shell
doctl compute load-balancer create \
  --name example-load-balancer \
  --region nyc3 \
  --forwarding-rules entry_protocol:http,entry_port:80,target_protocol:http,target_port:80 \
  --ip <your-byoip-address>
```

Replace `<your-byoip-address>` with an unassigned address from one of your BYOIP prefixes in the same region as the load balancer. The `--ip` flag is create-only, so omit it when you update a load balancer. Omit the flag entirely to receive a randomly assigned DigitalOcean IP address.

To confirm the assignment, get the load balancer and check that its IP address matches the address you provided:

```shell
doctl compute load-balancer get <load-balancer-id>
```

## Use a BYOIP Address Using the API

To assign a BYOIP address through the API, include the `ip` field in your [load balancer create request](https://docs.digitalocean.com/reference/api/reference/load-balancers/index.html.md#loadBalancers_create). The following example payload creates a load balancer that uses a BYOIP address:

```json
{
  "name": "example-load-balancer",
  "region": "nyc3",
  "ip": "<your-byoip-address>",
  "forwarding_rules": [
    {
      "entry_protocol": "http",
      "entry_port": 80,
      "target_protocol": "http",
      "target_port": 80
    }
  ]
}
```

Replace `<your-byoip-address>` with an unassigned address from one of your BYOIP prefixes in the same region as the load balancer. The `ip` field is create-only. Omit it to receive a randomly assigned DigitalOcean IP address.

## Use a BYOIP Address Using the Control Panel

Follow the standard load balancer creation flow in [How to Create Regional Load Balancers](https://docs.digitalocean.com/products/networking/load-balancers/how-to/create/index.html.md#create-a-load-balancer-using-the-control-panel). On the **Create Load Balancer** page, choose **Regional** as the type and **External** as the network visibility so that the **IP Address** section appears.

In the **IP Address** section, do the following:

1. Select **Bring your own IP (BYOIP)**. The default option is **Randomly assigned**, which provisions a new DigitalOcean IP address automatically.
2. From **Select a BYOIP prefix**, choose one of your BYOIP prefixes. Only **Active** prefixes in the load balancer’s region appear. If none are available, the form displays **No active BYOIP prefixes are available in this region.**
3. In the **IP address** field, enter an unassigned address from the selected prefix, such as `203.0.113.42`.

Complete the rest of the form, then click **Create Load Balancer**. The load balancer provisions with the BYOIP address you selected.