How to Detach an Instance from a Vultr Load Balancer

Updated on 11 September, 2025

Learn how to remove a server instance from your Vultr Load Balancer configuration


Detaching an instance from a Vultr Load Balancer removes it from traffic distribution, allowing you to scale down or perform maintenance without affecting other instances. Before detaching, ensure that the instance is no longer needed for load balancing to prevent disruptions.

Follow this guide to attach an instance to a Vultr Load Balancer on your Vultr account using the Vultr Customer Portal, API, CLI, or Terraform.

  • Vultr Customer Portal
  • Vultr API
  • Vultr CLI
  • Terraform
  1. Navigate to Products and click Load Balancers.
  2. Click your target Load Balancer to open its management page.
  3. In Resources, expand the location to view the Instances in your desired region's table.
  4. Click the + icon, deselect the instance(s) to remove, and save.
  1. Send a GET request to the List Load Balancers endpoint and note the target Load Balancer's ID.

    console
    $ curl "https://api.vultr.com/v2/load-balancers" \
        -X GET \
        -H "Authorization: Bearer ${VULTR_API_KEY}"
    
  2. Send a GET request to the List Instances endpoint and note your currently attached instance IDs.

    console
    $ curl "https://api.vultr.com/v2/instances" \
        -X GET \
        -H "Authorization: Bearer ${VULTR_API_KEY}"
    
  3. Send a PATCH request to the Update Load Balancer endpoint, omitting the instance you want to detach.

    console
    $ curl "https://api.vultr.com/v2/load-balancers/{load-balancer-id}" \
        -X PATCH \
        -H "Authorization: Bearer ${VULTR_API_KEY}" \
        -H "Content-Type: application/json" \
        --data '{
            "instances": [
                "<remaining_instance_1_id>",
                "<remaining_instance_2_id>"
            ]
        }'
    
  4. Confirm the update with a GET request:

    console
    $ curl "https://api.vultr.com/v2/load-balancers/{load-balancer-id}" \
        -X GET \
        -H "Authorization: Bearer ${VULTR_API_KEY}"
    
  1. List all Load Balancers and note the target Load Balancer's ID.

    console
    $ vultr-cli load-balancer list
    
  2. List all instances and note which ones are currently attached.

    console
    $ vultr-cli instance list
    
  3. Detach an instance by omitting it from the --instances flag in the update command.

    console
    $ vultr-cli load-balancer update <load-balancer-id> \
        --instances "<remaining_instance_1_id>" "<remaining_instance_2_id>"
    
  4. Confirm the update.

    console
    $ vultr-cli load-balancer get <load-balancer-id>
    
  1. Open your Terraform configuration file for the existing Load Balancer.

  2. Remove the target instance ID from the nodes list.

    terraform
    resource "vultr_load_balancer" "lb" {
        # ...existing fields (region, forwarding_rules, health_check, etc.)
    
        nodes = [
            vultr_instance.web1.id
            # vultr_instance.web2.id (this instance is detached)
        ]
    }
    
  3. Apply the configuration and observe the following output:

    Apply complete! Resources: 0 added, 1 changed, 0 destroyed.