How to start, stop, and restart a server
Stopping
To stop a server:
- In the management console
, select the folder containing your server. - Go to BareMetal.
- Find the server you need in the list, click
in its row, then select Stop. - In the window that opens, click Stop.
If you do not have the Yandex Cloud CLI installed yet, install and initialize it.
By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id options.
-
View the description of the command to stop the server:
yc baremetal server power-off --help -
Run this command:
yc baremetal server power-off <server_name_or_ID>
To stop a server, use the powerOff REST API method for the Server resource or the ServerService/PowerOff gRPC API call.
Starting
To start a stopped server:
- In the management console
, select the folder the stopped server belongs to. - Go to BareMetal.
- Find the server you need in the list, click
in its row, then select Start.
-
View the description of the command to start the server:
yc baremetal server power-on --help -
Run this command:
yc baremetal server power-on <server_name_or_ID>
To start a server, use the powerOn REST API method for the Server resource or the ServerService/PowerOn gRPC API call.
Restarting
To restart a server:
- In the management console
, select the folder containing your server. - Go to BareMetal.
- Find the server you need in the list, click
in its row, then select Reboot. - In the window that opens, click Reboot. The server status will change to
Restarting.
-
View the description of the command to restart the server:
yc baremetal server reboot --help -
Run this command:
yc baremetal server reboot <server_name_or_ID>
To restart a server, use the reboot REST API method for the Server resource or the ServerService/Reboot gRPC API call.
Query examples
To stop a server, run this command:
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <IAM_token>" \
-d '{}' \
"https://baremetal.api.cloud.yandex.net/baremetal/v1alpha/servers/<server_ID>:powerOff"
Where:
<IAM_token>: IAM token used for authentication.<server_ID>: ID of the server you want to update. To find out the ID, follow this guide.
Result:
{
"done": false,
"metadata": {
"@type": "type.googleapis.com/yandex.cloud.baremetal.v1alpha.PowerOffServerMetadata",
"serverId": "ly56xpblirh4********"
},
"id": "ly5rqxit432m********",
"description": "Server power off",
"createdAt": "2025-12-07T19:55:40.399275Z",
"createdBy": "ajeb9l33h6mu********",
"modifiedAt": "2025-12-07T19:55:40.399275Z"
}
To start a server, run this command:
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <IAM_token>" \
-d '{}' \
"https://baremetal.api.cloud.yandex.net/baremetal/v1alpha/servers/<server_ID>:powerOn"
Result:
{
"done": false,
"metadata": {
"@type": "type.googleapis.com/yandex.cloud.baremetal.v1alpha.PowerOnServerMetadata",
"serverId": "ly56xpblirh4********"
},
"id": "ly5rqxit432m********",
"description": "Server power on",
"createdAt": "2025-12-07T19:55:40.399275Z",
"createdBy": "ajeb9l33h6mu********",
"modifiedAt": "2025-12-07T19:55:40.399275Z"
}
To restart a server, run this command:
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <IAM_token>" \
-d '{}' \
"https://baremetal.api.cloud.yandex.net/baremetal/v1alpha/servers/<server_ID>:reboot"
Result:
{
"done": false,
"metadata": {
"@type": "type.googleapis.com/yandex.cloud.baremetal.v1alpha.RebootServerMetadata",
"serverId": "ly56xpblirh4********"
},
"id": "ly54ebp4hozz********",
"description": "Server reboot",
"createdAt": "2025-12-07T19:39:42.667128Z",
"createdBy": "ajeb9l33h6mu********",
"modifiedAt": "2025-12-07T19:39:42.667128Z"
}
Monitor your operation status in the done field.