> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nodepick.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# VPC Networks & Public IPs

> Understand isolated VPC private networks, subnet isolation, and attaching dynamic public IPs.

All nodepick compute nodes are provisioned on an isolated Virtual Private Cloud (VPC) network by default. Each node receives a private IPv4 address on the VPC subnet and is protected from direct public internet exposure.

## Virtual Private Cloud (VPC)

A VPC provides an isolated private network for your compute nodes. Nodes deployed into the same VPC can communicate privately over low-latency internal networking.

### Managing VPC Networks

<Tabs>
  <Tab title="Python CLI">
    Create a new VPC network:

    ```bash theme={null}
    np network create production-vpc --region fmt1
    ```

    List all active VPC networks:

    ```bash theme={null}
    np network list
    ```

    Inspect details of a specific VPC:

    ```bash theme={null}
    np network get production-vpc
    ```

    Delete a VPC network (must have no active nodes):

    ```bash theme={null}
    np network delete production-vpc
    ```
  </Tab>

  <Tab title="Python SDK">
    ```python theme={null}
    from nodepick import NodePickClient

    client = NodePickClient(api_key="YOUR_API_KEY")

    # Create a VPC
    vpc = client.vpc_create(name="production-vpc", region="fmt1")
    vpc_id = vpc["id"]

    # List VPCs
    vpcs = client.vpc_list()

    # Get VPC details
    details = client.vpc_get(vpc_id)

    # Delete VPC
    client.vpc_delete(vpc_id)
    ```
  </Tab>
</Tabs>

### Deploying Nodes to a VPC

Attach nodes to a specific VPC using the `--vpc` flag in the CLI or the `vpc` parameter in the SDK:

<Tabs>
  <Tab title="Python CLI">
    ```bash theme={null}
    np node create --name web-1 --vpc production-vpc
    ```
  </Tab>

  <Tab title="Python SDK">
    ```python theme={null}
    node = client.node_create(display_name="web-1", vpc="production-vpc")
    ```
  </Tab>
</Tabs>

***

## Public IP Addresses

Public IPv4 and IPv6 addresses are dynamic add-ons assigned post-provisioning. When you need direct public ingress or external service exposure, attach a public IP address.

### Attaching a Public IP

The CLI and SDK automatically detect whether an address is IPv4 or IPv6:

<Tabs>
  <Tab title="Python CLI">
    Attach an auto-allocated public IPv4:

    ```bash theme={null}
    np node attach-ip web-1
    ```

    Attach an auto-allocated public IPv6 prefix:

    ```bash theme={null}
    np node attach-ip web-1 --ip auto-ipv6
    ```

    Attach a specific reserved IP:

    ```bash theme={null}
    np node attach-ip web-1 --ip 184.105.163.137
    ```
  </Tab>

  <Tab title="Python SDK">
    ```python theme={null}
    # Auto-allocate IPv4
    client.attach_ip("web-1")

    # Auto-allocate IPv6
    client.attach_ip("web-1", version=6)

    # Attach specific IP
    client.attach_ip("web-1", ip="184.105.163.137")
    ```
  </Tab>
</Tabs>

### Detaching a Public IP

When public internet access is no longer required, detach the public IP. The node remains running on its private VPC address:

<Tabs>
  <Tab title="Python CLI">
    ```bash theme={null}
    np node detach-ip web-1
    ```
  </Tab>

  <Tab title="Python SDK">
    ```python theme={null}
    client.detach_ip("web-1")
    ```
  </Tab>
</Tabs>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.