post https://api.linode.com//images/upload
Creates a new private image instance and returns a URL as the upload_to
object in the response. Use this URL to upload image data to that instance.
- Ensure the disk is raw disk image (
.img
) format. - Compress it using gzip (
.gz
) format. The maximum compressed file size is 5GB. - Upload the file in a PUT request that includes the
Content-type: application/octet-stream
header.
For example:
curl -v \
-H "Content-Type: application/octet-stream" \
--upload-file example.img.gz \
$UPLOAD_URL \
--progress-bar \
--output /dev/null
You need to upload image data within 24 hours of creation or the API cancels the upload and deletes the image.
If you create an image from an encrypted disk, the API doesn't encrypt the image. When you rebuild a compute instance from that image, the resulting disk will be automatically encrypted.
You can create a new image and upload image data using a single process through Cloud Manager or the Linode CLI.
# Upload the image file in a single step
linode-cli image-upload \
--description "Optional details about the Image" \
--label "Example Image" \
--region us-east \
/path/to/image-file.img.gz
# Returns the upload_to URL
linode-cli images upload \
--description "Optional details about the Image" \
--label "Example Image" \
--region us-east
<https://www.linode.com/docs/products/tools/cli/get-started/>
images:read_write
<https://techdocs.akamai.com/linode-api/reference/get-started#oauth>