Yandex Cloud
Search
Discuss with expertTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex Managed Service for GitLab
  • Getting started
    • All guides
    • Getting instance info
    • Creating and activating an instance
    • Setting up security groups and access restrictions for an instance
    • Stopping and starting an instance
    • Updating instance settings
    • Managing backups
    • Migrating from a custom GitLab installation
    • Migrating to a different availability zone
    • Cleaning up full disk space
    • Deleting an instance
    • Creating and adding users to a project
    • Setting up approval rules
    • Instance state monitoring
    • Setting up OmniAuth
    • Integration with Object Storage
    • Working with a managed runner
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Release notes
  • FAQ

In this article:

  • Creating a GitLab instance
  • Activating a GitLab instance
  1. Step-by-step guides
  2. Creating and activating an instance

Creating and activating a Managed Service for GitLab instance

Written by
Yandex Cloud
Improved by
Danila N.
Updated at May 6, 2026
  • Creating a GitLab instance
  • Activating a GitLab instance

Creating a GitLab instanceCreating a GitLab instance

To create a Managed Service for GitLab instance, you need the vpc.user role and the gitlab.editor role or higher. For more information on assigning roles, see this Identity and Access Management guide.

Warning

Once you have created an instance, you cannot change its network configuration, i.e., availability zone and subnet.

Management console
CLI
Terraform
API
  1. In the management console, select the folder where you want to create a GitLab instance.

  2. Go to Managed Service for GitLab.

  3. Click Create instance.

  4. At the top of the page:

    1. Enter a name for your instance. It must be unique within Yandex Cloud.

      • Length: between 3 and 63 characters.
      • It can only contain lowercase Latin letters, numbers, and hyphens.
      • It must start with a letter and cannot end with a hyphen.
    2. Optionally, enter a description for the instance.

    3. Optionally, add labels to break instances into logical groups.

    4. Optionally, set instance protection against accidental deletion by users.

  5. Under Configuration:

    1. Select the instance type. After you create an instance, you can upgrade its type to a higher performing one.

    2. Specify the availability zone. After you create an instance, you cannot change its availability zone.

    3. Specify the subnet to host the instance. Currently, Yandex Cloud technical restrictions do not allow selecting a subnet with the 192.168.0.0/24 address range.

    4. Select a security group or create a new one:

      1. Click Create group.
      2. Enter a name and description for the security group. You can add rules for the security group later in Virtual Private Cloud.
      3. Click Create.

      If you do not specify a separate security group, the default security group created in the instance network will apply.

      Configure your security group so that its rules allow incoming and outgoing traffic on the specified ports and IP addresses.

      Warning

      The security group's setup determines the Managed Service for GitLab instance performance and availability.

      If you have issues with setting up a security group, contact support.

    5. Select the disk size. After you create an instance, you can increase its disk size.

    6. Specify the instance domain name: the system will automatically create the relevant DNS records for it in the .gitlab.yandexcloud.net domain.

      The domain name must be unique within Yandex Cloud.

      • It must be from 5 to 50 characters long.
      • It can include lowercase Latin letters, numbers, and hyphens.
      • It cannot not start or end with a hyphen.
    7. Set up the automatic backup retention period in days.

    8. Optionally, enable approval rules. To do this, select the appropriate configuration for approval rules.

      Note

      The configuration you select affects the cost of using the instance computing resources.

  6. Under Administrator data, specify:

    • Email: Email address of the GitLab instance administrator. This is the address to receive the email with a link to create a password.
    • Login: Administrator login.
  7. Optionally, under Advanced settings, enable deletion of untagged images. This setting affects the amount of free disk space on the instance.

  8. Click Create.

  9. Wait until the instance is ready: its status on the Managed Service for GitLab dashboard will change to Running. This may take a while.

If you do not have the Yandex Cloud CLI yet, install and initialize it.

The folder used by default is the one specified when creating 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.

  1. See the description of the CLI command for creating a Managed Service for GitLab instance:

    yc managed-gitlab instance create --help
    
  2. Select a subnet:

    yc vpc subnet list
    

    Result:

    +----------------------+---------------------------+----------------------+----------------+-------------------+-----------------+
    |          ID          |           NAME            |      NETWORK ID      | ROUTE TABLE ID |       ZONE        |      RANGE      |
    +----------------------+---------------------------+----------------------+----------------+-------------------+-----------------+
    | e9bnlm18l70a******** |   default-ru-central1-a   | enpe3m3fa00u******** |                |   ru-central1-a   | [10.128.0.0/24] |
    +----------------------+---------------------------+----------------------+----------------+-------------------+-----------------+
    
  3. Create a GitLab instance (this example does not use all available parameters):

    yc managed-gitlab instance create \
      --name first-instance \
      --resource-preset-id <host_class> \
      --disk-size <disk_size_in_GB> \
      --admin-login <admin_login> \
      --admin-email <admin_email_address> \
      --domain-prefix <instance_domain_name> \
      --deletion-protection \
      --approval-rules <approval_rule_configuration> \
      --subnet-id <subnet_ID>
    

    Where:

    • --name: Instance name, unique within Yandex Cloud. Follow these naming requirements:

      • Length: between 3 and 63 characters.
      • It can only contain lowercase Latin letters, numbers, and hyphens.
      • It must start with a letter and cannot end with a hyphen.
    • --resource-preset-id: Host class. It determines the configuration of the VM to host the GitLab instance. The possible values are:

      • s2.micro: 2 vCPUs, 8 GB RAM
      • s2.small: 4 vCPUs, 16 GB RAM
      • s2.medium: 8 vCPUs, 32 GB RAM
      • s2.large: 16 vCPUs, 64 GB RAM
    • --disk-size: Disk size, in GB.

    • --admin-login: GitLab instance admin login.

    • --admin-email: Instance admin email address. This is the address to receive the email with a link to create a password.

    • --domain-prefix: Instance domain name. The system will automatically create the relevant DNS records for it in the .gitlab.yandexcloud.net domain.

      The domain name must be unique within Yandex Cloud.

      • It must be from 5 to 50 characters long.
      • It can include lowercase Latin letters, numbers, and hyphens.
      • It cannot not start or end with a hyphen.
    • --deletion-protection: Instance protection against accidental deletion by users.

    • --approval-rules: Approval rule configuration. The possible values are:

      • BASIC
      • STANDARD
      • ADVANCED

      Note

      The configuration you select affects the cost of using the instance computing resources.

    • --subnet-id: ID of the selected subnet.

    Result:

    id: c17c60tpadua********
    folder_id: b1g2slt7p9ug********
    created_at: "2025-07-20T18:34:16.078Z"
    updated_at: "2025-07-20T18:34:16.078Z"
    name: test-cli
    resource_preset_id: s2.small
    disk_size: "107374182400"
    status: RUNNING
    admin_login: admin-gl
    admin_email: user@example.com
    domain: test-domain-user.gitlab.yandexcloud.net
    subnet_id: e9b4rrpuu2a********
    backup_retain_period_days: "7"
    deletion_protection: true
    approval_rules_id: BASIC
    gitlab_version: 17.11.6
    

    For more information about this command, see the CLI reference.

With Terraform, you can quickly create a cloud infrastructure in Yandex Cloud and manage it using configuration files. These files store the infrastructure description written in HashiCorp Configuration Language (HCL). If you change the configuration files, Terraform automatically detects which part of your configuration is already deployed, and what should be added or removed.

Terraform is distributed under the Business Source License. The Yandex Cloud provider for Terraform is distributed under the MPL-2.0 license.

For more information about the provider resources, see the relevant documentation on the Terraform website or its mirror.

If you do not have Terraform yet, install it and configure the Yandex Cloud provider.

To create a GitLab instance:

  1. In the Terraform configuration file, describe the resources you want to create:

    resource "yandex_gitlab_instance" "my_gitlab_instance" {
      name                      = "<instance_name>"
      resource_preset_id        = "<host_class>"
      disk_size                 = <disk_size_in_GB>
      admin_login               = "<admin_login>"
      admin_email               = "<admin_email_address>"
      domain                    = "<instance_domain_name>"
      subnet_id                 = "<subnet_ID>"
      approval_rules_id         = "<approval_rule_configuration>"
      backup_retain_period_days = <backup_retention_period>
      deletion_protection       = <true_or_false>
    }
    

    Where:

    • name: Instance name, unique within Yandex Cloud. Follow these naming requirements:

      • Length: between 3 and 63 characters.
      • It can only contain lowercase Latin letters, numbers, and hyphens.
      • It must start with a letter and cannot end with a hyphen.
    • resource_preset_id: Host class. It determines the configuration of the VM to host the GitLab instance. The possible values are:

      • s2.micro: 2 vCPUs, 8 GB RAM
      • s2.small: 4 vCPUs, 16 GB RAM
      • s2.medium: 8 vCPUs, 32 GB RAM
      • s2.large: 16 vCPUs, 64 GB RAM
    • disk_size: Disk size, in GB.

    • admin_login: GitLab instance admin login.

    • admin_email: Instance admin email address. This is the address to receive the email with a link to create a password.

    • domain: Instance domain name in <name>.gitlab.yandexcloud.net format. The system will automatically create the relevant DNS records for it in the .gitlab.yandexcloud.net domain.

      The domain name must be unique within Yandex Cloud.

      • It must be from 5 to 50 characters long.
      • It can include lowercase Latin letters, numbers, and hyphens.
      • It cannot not start or end with a hyphen.
    • subnet_id: ID of the selected subnet.

    • approval_rules_id: Approval rule configuration. The possible values are:

      • BASIC
      • STANDARD
      • ADVANCED

      Note

      The configuration you select affects the cost of using the instance computing resources.

    • backup_retain_period_days: Automatic backup retention period, in days.

    • deletion_protection: Instance protection against accidental deletion by users. The possible values are true or false.

    For more information about yandex_gitlab_instance properties, see this provider guide.

  2. Create the resources:

    1. In the terminal, navigate to the configuration file directory.

    2. Make sure the configuration is correct using this command:

      terraform validate
      

      If the configuration is valid, you will get this message:

      Success! The configuration is valid.
      
    3. Run this command:

      terraform plan
      

      You will see a list of resources and their properties. No changes will be made at this step. Terraform will show any errors in the configuration.

    4. Apply the configuration changes:

      terraform apply
      
    5. Type yes and press Enter to confirm the changes.

    Terraform will create all the required resources. You can check the new resources using the management console or this CLI command:

    yc managed-gitlab instance list
    

Use the Create REST API method for the Instance resource or the InstanceService/Create gRPC API call.

Note

When you create an instance in Managed Service for GitLab, the system automatically generates an SSL certificate. Using HTTPS requires no advanced setup.

Activating a GitLab instanceActivating a GitLab instance

After the instance status changes to Running, activate the instance:

  1. Follow the link you received in your administrator mailbox after creating the instance.

    If you cannot access the GitLab web UI via the link, create a separate security group and configure it so that its rules allow incoming traffic from the required ports and IP addresses.

  2. Change the administrator password.

  3. Log in using the administrator username and password.

Further on, to open the GitLab web UI, get detailed information about your instance and follow the link in the Domain field.

Was the article helpful?

Previous
Getting instance info
Next
Setting up security groups and access restrictions for an instance
© 2026 Direct Cursus Technology L.L.C.