[Yandex Cloud documentation](../../../index.md) > [Yandex Managed Service for GitLab](../../index.md) > [Step-by-step guides](../index.md) > Stopping and starting an instance

# Stopping and starting a GitLab instance

You can stop and restart a [GitLab instance](../../concepts/index.md#instance) as needed. When stopped, an instance retains all its data.

While your instance is idle, you only pay for the stored instance data and the size of backups stored in Yandex Object Storage as per the [pricing policy](../../pricing.md#prices-storage).

## Stopping an instance {#stop-instance}

{% list tabs group=instructions %}

- Management console {#console}

  1. Navigate to **Managed Service for&nbsp;GitLab**.
  1. Find the instance in the list, click ![options](../../../_assets/console-icons/ellipsis.svg), and select **Stop**.
  1. In the dialog box that opens, confirm that you want to stop the instance by clicking **Stop**.

- CLI {#cli}

  If you do not have the Yandex Cloud CLI yet, [install and initialize it](../../../cli/quickstart.md#install).

  The folder used by default is the one specified when [creating](../../../cli/operations/profile/profile-create.md) the CLI profile. To change the default folder, use the `yc config set folder-id <folder_ID>` command. You can also specify a different folder for any command using `--folder-name` or `--folder-id`. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.

  To stop a GitLab instance, run this command:

  ```bash
  yc managed-gitlab instance stop <instance_name_or_ID>
  ```

  You can [get](instance-list.md#list) the instance ID or name with the list of instances in the folder.

  Result:

  ```text
  done (20s)
  id: c17ab1ehdfag********
  folder_id: b1gmm82dtdb3********
  created_at: "2024-01-29T16:11:45.859Z"
  updated_at: "2025-06-25T20:38:41.325Z"
  name: inst-gitlab
  resource_preset_id: s2.micro
  disk_size: "32212254720"
  status: STOPPED
  admin_login: <admin_login>
  admin_email: <email_address>
  domain: example.gitlab.yandexcloud.net
  subnet_id: e9bp8qmchqh2********
  backup_retain_period_days: "7"
  approval_rules_id: NONE
  gitlab_version: 17.11.4
  ```

  For more information about this command, see the [CLI reference](../../cli-ref/instance/stop.md).

- API {#api}

  Use the [Stop](../../api-ref/Instance/stop.md) REST API method for the [Instance](../../api-ref/Instance/index.md) resource or the [InstanceService/Stop](../../api-ref/grpc/Instance/stop.md) gRPC API call.

{% endlist %}

## Starting an instance {#start-instance}

You can restart **Stopped** instances.

{% list tabs group=instructions %}

- Management console {#console}

  1. Navigate to **Managed Service for&nbsp;GitLab**.
  1. Find the stopped instance in the list, click ![options](../../../_assets/console-icons/ellipsis.svg), and select **Start**.
  1. In the dialog box that opens, confirm that you want to start the instance by clicking **Start**.

- CLI {#cli}

  If you do not have the Yandex Cloud CLI yet, [install and initialize it](../../../cli/quickstart.md#install).

  The folder used by default is the one specified when [creating](../../../cli/operations/profile/profile-create.md) the CLI profile. To change the default folder, use the `yc config set folder-id <folder_ID>` command. You can also specify a different folder for any command using `--folder-name` or `--folder-id`. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.

  To start a GitLab instance, run this command:

  ```bash
  yc managed-gitlab instance start <instance_name_or_ID>
  ```

  You can [get](instance-list.md#list) the instance ID or name with the list of instances in the folder.

  Result:

  ```text
  done (1m44s)
  id: c17ab1ehdfag********
  folder_id: b1gmm82dtdb3********
  created_at: "2024-01-29T16:11:45.859Z"
  updated_at: "2025-06-25T20:38:41.325Z"
  name: inst-gitlab
  resource_preset_id: s2.micro
  disk_size: "32212254720"
  status: RUNNING
  admin_login: <admin_login>
  admin_email: <email_address>
  domain: example.gitlab.yandexcloud.net
  subnet_id: e9bp8qmchqh2********
  backup_retain_period_days: "7"
  approval_rules_id: NONE
  gitlab_version: 17.11.4
  ```

  For more information about this command, see the [CLI reference](../../cli-ref/instance/start.md).

- API {#api}

  Use the [Start](../../api-ref/Instance/start.md) REST API method for the [Instance](../../api-ref/Instance/index.md) resource or the [InstanceService/Start](../../api-ref/grpc/Instance/start.md) gRPC API call.

{% endlist %}