Rebuild a Linode

Rebuild an existing Linode. A rebuild shuts down the Linode, deletes all of its disks and configuration profiles, then deploys a new image to the Linode with the given attributes. Consider these points before rebuilding a Linode:

  • You need to supply an image for use in rebuilding the Linode. This can be a private image you've created or uploaded, or a public image we offer.

  • You need to provide a new root_pass for the root user on the Linode.

  • You should supply SSH keys for the root User using the authorized_keys parameter.

  • If your target Linode currently uses Metadata ("has_user_data": true), you should include metadata.user_data in the rebuild request to continue using the service.

  • Linode interfaces don't change during a rebuild.

  • During a rebuild, you can enable or disable local disk encryption. If disk encryption is not included in the request, the previous disk_encryption value is used. You can't disable disk encryption if the target Linode is attached to a LKE nodepool.

  • You can resize the Linode to a different plan by including the type parameter, and setting it to a lesser plan. Consider the following points before resizing:

    • You can't have an outstanding balance on your account.

    • Resizing during a rebuild requires significantly more time.

    • If you resize, the Linode will be migrated to a new hardware host, while rebuilding without resizing keeps the same hardware host.

    • If any actions are currently running or queued for the Linode, you need to wait for them to complete.

    • The Linode can't be pending migration.

    • The Linode can't have more disk allocation than the new type supports. If this is the case, you ned to delete or resize the disk to be smaller.

    • You can resize a Linode using a separate operation.

    • If you have Block Storage volumes attached to the Linode, you can't resize it to a type that supports fewer volumes. You need to delete volumes from the Linode to meet the limit supported by the smaller type.

Permissions and scopes

To call this operation, you need permissions, based on the model you're using:

  • Identity and access permissions. Your user needs a role with these permissions. Learn more.

    • Permissions: rebuild_linode
  • OAuth scopes. Your user needs these scopes assigned. Learn more.

    • Scopes: linodes:read_write

CLI

linode-cli linodes rebuild 123 \
  --image "linode/debian9" \
  --root_pass aComplex@Password \
  --disk_encryption disabled \
  --authorized_keys "ssh-rsa AAAA_valid_public_ssh_key_123456785== user@their-computer" \
  --authorized_users "myUsername" \
  --authorized_users "secondaryUsername" \
  --booted true \
  --stackscript_id 10079 \
  --stackscript_data '{"gh_username": "linode"}' \
  --type "g6-standard-2" \
  --metadata.userdata "I2Nsb3VkLWNvbmZpZw=="

Learn more

Language
Credentials