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

# How to stop and restart a Devlab

> Stop a Devlab to pause billing for computing resources while preserving it, and restart it later.

If you don't currently need your Devlab but want to preserve it, you can stop it and restart it later. You are not billed for computing resources while the Devlab is stopped, but you are still billed for the disk of the underlying [Compute virtual machine](https://docs.nebius.com/compute/index.md) (VM) and any mounted volumes. Data under the workspace path persists across stop and restart operations.

## Prerequisites

> [tab] Web console
>
> Make sure that you are in a [group](https://docs.nebius.com/iam/authorization/groups/index.md) that has the
> role within your
> .
> You can check this in the [Administration → IAM](https://console.nebius.com/iam) section of the web console.

> [tab] CLI
>
> * [Install and configure](https://docs.nebius.com/cli/install.md) the Nebius AI Cloud CLI.
>
>   Check that your project ID is saved in the Nebius AI Cloud CLI profile configuration:
>
>   ```bash theme={null}
>   cat ~/.nebius/config.yaml
>   ```
>
> * Make sure that you or the service account that you use is in a [group](https://docs.nebius.com/iam/authorization/groups/index.md) that has the
>   role within your
>   .
>   You can check this in the [Administration → IAM](https://console.nebius.com/iam) section of the web console.

> [tab] Go SDK
>
> * [Install and initialize the Nebius SDK for Go](https://docs.nebius.com/sdk/go/install-auth.md).
> * Make sure that you or the service account that you use is in a [group](https://docs.nebius.com/iam/authorization/groups/index.md) that has the
>   role within your
>   .
>   You can check this in the [Administration → IAM](https://console.nebius.com/iam) section of the web console.

> [tab] Python SDK
>
> * [Install and initialize the Nebius SDK for Python](https://docs.nebius.com/sdk/python/install-auth.md).
> * Make sure that you or the service account that you use is in a [group](https://docs.nebius.com/iam/authorization/groups/index.md) that has the
>   role within your
>   .
>   You can check this in the [Administration → IAM](https://console.nebius.com/iam) section of the web console.

> [tab] JavaScript SDK
>
> * [Install and initialize the Nebius SDK for JavaScript](https://docs.nebius.com/sdk/javascript/install-auth.md).
> * Make sure that you or the service account that you use is in a [group](https://docs.nebius.com/iam/authorization/groups/index.md) that has the
>   role within your
>   .
>   You can check this in the [Administration → IAM](https://console.nebius.com/iam) section of the web console.

## Steps

> [tab] Web console
>
> 1. In the sidebar, go to  **Serverless AI** → **Devlabs**.
> 2. Find the Devlab and then click  → **Stop** or **Restart**.
> 3. In the window that opens, confirm the action.

> [tab] CLI
>
> 1. List Devlabs and copy the ID of the Devlab that you want to stop:
>
>    ```bash theme={null}
>    nebius ai devlab list
>    ```
>
> 2. To stop a Devlab, run the following command:
>
>    ```bash theme={null}
>    nebius ai devlab stop <devlab_ID>
>    ```
>
> 3. To restart a Devlab, run the following command:
>
>    ```bash theme={null}
>    nebius ai devlab restart <devlab_ID>
>    ```

> [tab] Go SDK
>
> 1. List Devlabs:
>
>    ```go theme={null}
>    listDevlabService := sdk.Services().Ai().V1().Devlab()
>    listDevlabsRequest := &ai.ListDevlabsRequest{
>        ParentId: "<project_ID>",
>    }
>    for {
>        devlabs, err := listDevlabService.List(
>            ctx, listDevlabsRequest,
>        )
>        if err != nil {
>            return fmt.Errorf("list devlabs: %w", err)
>        }
>        fmt.Println(devlabs)
>        if devlabs.GetNextPageToken() == "" {
>            break
>        }
>        listDevlabsRequest.PageToken = devlabs.GetNextPageToken()
>    }
>    ```
>
>    In `ai.ListDevlabsRequest`, set `ParentId` to the [project ID](https://docs.nebius.com/iam/manage-projects.md#go-sdk-3). In the response, copy the `Metadata.Id` of the Devlab to stop.
>
> 2. Stop the Devlab:
>
>    ```go theme={null}
>    stopDevlabService := sdk.Services().Ai().V1().Devlab()
>    stopDevlabOperation, err := stopDevlabService.Stop(
>        ctx,
>        &ai.StopDevlabRequest{Id: "<devlab_ID>"},
>    )
>    if err != nil {
>        return fmt.Errorf("stop devlab: %w", err)
>    }
>    if _, err = stopDevlabOperation.Wait(ctx); err != nil {
>        return fmt.Errorf("wait for devlab stop: %w", err)
>    }
>    ```
>
>    In `ai.StopDevlabRequest`, set `Id` to the Devlab ID. The sample waits for the stop operation to complete.
>
> 3. When you need the Devlab again, restart it:
>
>    ```go theme={null}
>    restartDevlabService := sdk.Services().Ai().V1().Devlab()
>    restartDevlabOperation, err := restartDevlabService.Restart(
>        ctx,
>        &ai.RestartDevlabRequest{Id: "<devlab_ID>"},
>    )
>    if err != nil {
>        return fmt.Errorf("restart devlab: %w", err)
>    }
>    if _, err = restartDevlabOperation.Wait(ctx); err != nil {
>        return fmt.Errorf("wait for devlab restart: %w", err)
>    }
>    ```
>
>    In `ai.RestartDevlabRequest`, set `Id` to the same Devlab ID. The sample waits for the restart operation to complete.

> [tab] Python SDK
>
> 1. List Devlabs:
>
>    ```python theme={null}
>    list_devlab_service = DevlabServiceClient(sdk)
>    list_devlabs_request = ListDevlabsRequest(
>        parent_id="<project_ID>",
>    )
>    while True:
>        devlabs = await list_devlab_service.list(
>            list_devlabs_request,
>        )
>        print(devlabs)
>        if not devlabs.next_page_token:
>            break
>        list_devlabs_request.page_token = devlabs.next_page_token
>    ```
>
>    In `ListDevlabsRequest`, set `parent_id` to the [project ID](https://docs.nebius.com/iam/manage-projects.md#python-sdk-3). In the response, copy the `metadata.id` of the Devlab to stop.
>
> 2. Stop the Devlab:
>
>    ```python theme={null}
>    stop_devlab_service = DevlabServiceClient(sdk)
>    stop_devlab_operation = await stop_devlab_service.stop(
>        StopDevlabRequest(id="<devlab_ID>"),
>    )
>    await stop_devlab_operation.wait()
>    ```
>
>    In `StopDevlabRequest`, set `id` to the Devlab ID. The sample waits for the stop operation to complete.
>
> 3. When you need the Devlab again, restart it:
>
>    ```python theme={null}
>    restart_devlab_service = DevlabServiceClient(sdk)
>    restart_devlab_operation = await restart_devlab_service.restart(
>        RestartDevlabRequest(id="<devlab_ID>"),
>    )
>    await restart_devlab_operation.wait()
>    ```
>
>    In `RestartDevlabRequest`, set `id` to the same Devlab ID. The sample waits for the restart operation to complete.

> [tab] JavaScript SDK
>
> 1. List Devlabs:
>
>    ```ts theme={null}
>    const listDevlabService = new DevlabService(sdk);
>    const listDevlabsRequest = ListDevlabsRequest.create({
>      parentId: "<project_ID>",
>    });
>    while (true) {
>      const devlabs = await listDevlabService.list(
>        listDevlabsRequest,
>      );
>      console.log(devlabs);
>      if (!devlabs.nextPageToken) {
>        break;
>      }
>      listDevlabsRequest.pageToken = devlabs.nextPageToken;
>    }
>    ```
>
>    In `ListDevlabsRequest`, set `parentId` to the [project ID](https://docs.nebius.com/iam/manage-projects.md#javascript-sdk-3). In the response, copy the `metadata.id` of the Devlab to stop.
>
> 2. Stop the Devlab:
>
>    ```ts theme={null}
>    const stopDevlabService = new DevlabService(sdk);
>    const stopDevlabOperation = await stopDevlabService.stop(
>      StopDevlabRequest.create({ id: "<devlab_ID>" }),
>    ).result;
>    await stopDevlabOperation.wait();
>    ```
>
>    In `StopDevlabRequest`, set `id` to the Devlab ID. The sample waits for the stop operation to complete.
>
> 3. When you need the Devlab again, restart it:
>
>    ```ts theme={null}
>    const restartDevlabService = new DevlabService(sdk);
>    const restartDevlabOperation =
>      await restartDevlabService.restart(
>        RestartDevlabRequest.create({ id: "<devlab_ID>" }),
>      ).result;
>    await restartDevlabOperation.wait();
>    ```
>
>    In `RestartDevlabRequest`, set `id` to the same Devlab ID. The sample waits for the restart operation to complete.
