[Yandex Cloud documentation](../../../index.md) > [Yandex BareMetal](../../index.md) > Getting started > Leasing a custom-configured server

# Renting a custom-configured server

You can [configure](../../concepts/server-configurations.md#custom) your server yourself. Follow these steps:

## Getting started {#before-you-begin}

Sign up for Yandex Cloud and create a [billing account](../../../billing/concepts/billing-account.md):
1. Navigate to the [management console](https://console.yandex.cloud) and log in to Yandex Cloud or create a new account.
1. On the **[Yandex Cloud Billing](https://center.yandex.cloud/billing/accounts)** page, make sure you have a billing account linked and it has the `ACTIVE` or `TRIAL_ACTIVE` [status](../../../billing/concepts/billing-account-statuses.md). If you do not have a billing account, [create one](../../../billing/quickstart/index.md) and [link](../../../billing/operations/pin-cloud.md) a cloud to it.

If you have an active billing account, you can create or select a [folder](../../../resource-manager/concepts/resources-hierarchy.md#folder) for your infrastructure on the [cloud page](https://console.yandex.cloud/cloud).

[Learn more about clouds and folders here](../../../resource-manager/concepts/resources-hierarchy.md).

## Renting a server {#server-lease}

{% list tabs group=instructions %}

- Management console {#console}

  1. In the [management console](https://console.yandex.cloud), select the [folder](../../../resource-manager/concepts/resources-hierarchy.md#folder) where you want to lease a server.
  1. Navigate to **BareMetal**.
  1. Click **Lease server** and, in the window that opens, select `Custom configuration`. In the window that opens, set up the server configuration:

      {% note tip %}

      Instead of creating a custom configuration from scratch, you can use a Yandex BareMetal configuration [template](../../concepts/server-custom-configurations.md#templates) to customize the hardware specifications of the rented server.

      To create a custom configuration from a template, select a suitable template under **Prefill with template** using the ![chevron-left](../../../_assets/console-icons/chevron-left.svg) and ![chevron-right](../../../_assets/console-icons/chevron-right.svg) navigation buttons. To quickly find a suitable one, click **All templates** and pick a template from the list that opens using the filter if needed.

      {% endnote %}

      1. Under **CPU**, select the CPU that suits you best.

          Filter by manufacturer, number of cores, and clock frequency as needed.
      1. Under **RAM**, specify the type and amount of RAM available on the server.
      1. Under **Disks**, add to the server a [disk](../../concepts/disks/disk-types.md) group of suitable specification:

          1. In the **Type** field, select disk type.
          1. In the **Size** field that appears, select disk size.
          1. In the **Number** field that appears, select the number of disks in the group.

          There must be at least one group consisting of at least two disks on the server.

          You can add more disk groups of other form factors. Do it by clicking ![plus](../../../_assets/console-icons/plus.svg) **Add**.
      1. Under **Network**, select the server's network card connection speed for [public](../../concepts/public-network.md) and [private](../../concepts/private-network.md) networks, and whether MC-LAG [aggregation groups](../../concepts/mc-lag.md) must be provided on the server.
      1. Select the [server pool](../../concepts/servers.md#server-pools) the server will be in under **Pool**.
      1. Under **Enable**, specify whether [redundant power supply](../../concepts/servers.md#server-power-supply) is required.
      1. Click **Continue**.
  1. In the window that opens, set the server up as follows:

      1. Under **Configuration** and **Lease conditions**, make sure the server configuration you have provided so far is adequate.

          If not, click ![arrow-left](../../../_assets/console-icons/arrow-left.svg) under **Configuration** to return to configuration setup.
      1. In the **Lease duration** field, select the [lease period](../../concepts/servers.md#server-lease): `1 day` or `1 year`.
      
          When this period expires, server lease will automatically be renewed for the same period. You cannot terminate the lease during the specified lease period, but you can [refuse](server-lease-cancel.md) to extend the server lease further.
      1. Under **Image**, select:
         
         * `Marketplace`: To install one of the available Yandex Cloud Marketplace [public OS images](../../concepts/images.md#marketplace-images) on the server.
         * `No OS`: To lease a server without an operating system.
         
             You can [install](reinstall-os-from-own-image.md) the OS from a [custom ISO image](../../concepts/images.md#user-images) later.
      1. Under **Disk**, configure disk partitioning:

          1. Click **Configure disk layout**.
          1. Specify partition settings. To create a new partition, click ![plus](../../../_assets/console-icons/plus.svg) **Add partition**.

              To configure [RAID](../../concepts/disks/raid.md) arrays and disk partitions by yourself, click ![square-plus](../../../_assets/console-icons/square-plus.svg) **Add to RAID**.
          1. Click **Save**.
      1. Under **Network interfaces**, in the **Interface 1** section, select a [private subnet](../../concepts/private-network.md#private-subnet) in the [availability zone](../../../overview/concepts/geo-scope.md) you are renting the server in.
         
         If the server’s availability zone does not have a private subnet yet, or you want to create a new private subnet, click **Create** and, in the window that opens, specify subnet settings as described in [Creating a private subnet](../subnet-create.md).
      1. Under **Network interfaces**, in the **Interface 2** section:
         
         * In the **Public address** field, select a public IP address assignment method:
         
             * `From ephemeral subnet`: Assign a random IP address. If you need to get the IP address when creating a server via a request to a DHCP server, enable **Assign via DHCP**.
         
             * `From a dedicated subnet`: To assign an IP address from the range of addresses of a [dedicated public subnet](../../concepts/public-network.md#public-subnet).
             
                 In the field that opens, select a public subnet or click **Order** to [order](../reserve-public-subnet.md) a new one.
             
                 {% note warning %}
             
                 The dedicated public subnet [does not have](../../concepts/dhcp.md#dhcp-public-subnet) a DHCP server; therefore, on the network interface of the server connected to such subnet, you should manually configure a static IP address from the subnet’s range of available public IP addresses and specify the default gateway address.
             
                 {% endnote %}
         
             * `No address`: Do not assign a public IP address.
         
         * In the **Bandwidth** field, select a [server bandwidth](../../concepts/network-restrictions.md#bandwidth-for-pubic-network) package. Available bandwidth packages:
           
           * `10 TB per day, connection capacity, 1 Gbit/s`
           * `100 TB per day, connection capacity, 10 Gbit/s`
           
           {% note info %}
           
           You can select a bandwidth package only for configurations with a public IP address and network cards of 10 Gbps or higher.
           
           You can reduce the connection capacity to 10 TB per day only as early as 24 hours after the server lease starts.
           
           {% endnote %}
      1. If you are installing an OS from a Marketplace public image, specify server access settings under **Access**:

          1. In the **Password** field, select one of the following options to create a root password:
          
              * To generate a new root password, select `New password` and click **Generate**.
          
                  {% note warning %}
                  
                  This option requires you to maintain password security. Save the password you generated in a secure location. Yandex Cloud does not store it, and you will not be able to retrieve it once the server is deployed.
                  
                  {% endnote %}
          
              * To use the root password saved in a Yandex Lockbox [secret](../../../lockbox/concepts/secret.md), select `Lockbox secret`.
          
                  In the **Name**, **Version**, and **Key** fields, select the secret containing your password, its version, and its key, respectively.
                  
                  If you do not have a Yandex Lockbox secret, click **Create** to create it.
          
                  Choose the `Custom` secret type to specify a custom password or `Generated` to generate password automatically.
          
          1. In the **Public SSH key** field, select the SSH key saved in your [organization user](../../../organization/concepts/membership.md) profile.
          
              If there are no SSH keys in your profile or you want to add a new key:
              
              1. Click **Add key**.
              1. Enter a name for the SSH key.
              1. Select one of the following:
              
                  * `Enter manually`: Paste the contents of the public SSH key. You need to [create](../../../compute/operations/vm-connect/ssh.md#creating-ssh-keys) an SSH key pair on your own.
                  * `Load from file`: Upload the public part of the SSH key. You need to create an SSH key pair on your own.
                  * `Generate key`: Automatically create an SSH key pair.
                  
                    When adding a new SSH key, an archive containing the key pair will be created and downloaded. In Linux or macOS-based operating systems, unpack the archive to the `/home/<user_name>/.ssh` directory. In Windows, unpack the archive to the `C:\Users\<user_name>/.ssh` directory. You do not need additionally enter the public key in the management console.
              
              1. Click **Add**.
              
              The system will add the SSH key to your organization user profile. If the organization has [disabled](../../../organization/operations/os-login-access.md) the ability for users to add SSH keys to their profiles, the added public SSH key will only be saved in the user profile inside the newly created resource.
      
      1. Optionally, enable server backup in [Yandex Cloud Backup](../../../backup/index.md):

          1. Enable **Backup**.
          1. Select an existing [backup policy](../../../backup/concepts/policy.md) or [create](../../../backup/operations/policy-vm/create.md) a new one.
          1. Select a [service account](../../../iam/concepts/users/service-accounts.md) with the [`baremetal.editor`](../../security/index.md#baremetal-editor) and [`backup.user`](../../../backup/security/index.md#backup-user) roles assigned or [create](../../../iam/operations/sa/create.md) a new one.

          For more information, see [Leasing a Yandex BareMetal server connected to Cloud Backup](../../../backup/operations/backup-baremetal/lease-server-with-backup.md).
      1. Under **Server information**:
         
           1. Specify the server name in the **Name** field. 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.
         
           1. Optionally, add a server description in the **Description** field.
           1. Optionally, set [labels](../../../resource-manager/concepts/labels.md) in the **Labels** field.
      1. Click **Lease server**.

{% endlist %}

As a result, the server [status](../../concepts/servers.md#server-status) will change to `PROVISIONING`. Yandex BareMetal will need up to five calendar days to create the configuration you requested and start the server, after which its status will change to `RUNNING`.