---
title: "ezgh compute instances attach-network-interface"
description: "Attach a network interface to a stopped instance."
---

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

# ezgh compute instances attach-network-interface

{/* Generated by ezgh-cli's internal/tools/clidocs from the ezgh command tree. Don't edit: change the command's help in ezgh-cli and regenerate. */}

```sh
ezgh compute instances attach-network-interface <instance> <network-interface> [flags]
```

Attach a network interface of the project (by ID, UUID or name) to a stopped instance. It keeps its firewalls. `--device-index` places it (1 to 63; default the lowest free).

Part of [`ezgh compute instances`](/cli/reference/compute-instances).

## Flags

| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| `--device-index` | int |  | where it's attached, 1 to 63 (default: the lowest free) |

This command also takes the [global flags](/cli/reference#global-flags).

Source: https://docs.ezghcloud.com/cli/reference/compute-instances-attach-network-interface/index.mdx
