Skip to content

Find an image ID

Last updated on

To create a server with the STACKIT CLI, the IaaS API, or Terraform, you need the ID of the image to boot from. Use the latest version of an image whenever possible: it includes the most recent security patches and package updates. For how STACKIT names, releases, and retains images, see Operating system images.

  • You have installed the STACKIT CLI and logged in with stackit auth login.
  • You know the ID of your STACKIT project.
  • To run the commands in Bash, you have installed jq. PowerShell needs no additional tools.

The name of an image tells you whether it is the latest version:

  • The latest version has the plain operating system name, for example Ubuntu 24.04 or Windows Server 2025 Standard.
  • Older versions carry their release date in the name, for example Ubuntu 24.04 2026-09-28 or Windows Server 2025 Standard - 2026-10-14.
  • Images for the ARM64 architecture have ARM64 after the version, for example Ubuntu 24.04 ARM64.

By default, the image list contains only the latest version of each image. To include older versions, use the --all flag in the STACKIT CLI or the all=true parameter in the IaaS API.

To filter the list, the commands on this page match the image name against a regular expression. The $ at the end matches only the plain name, that is, the latest version. The following patterns are examples:

  • ^Ubuntu 24.04$ finds the latest Ubuntu 24.04 image for x86.
  • ^Ubuntu 24.04 ARM64$ finds the latest Ubuntu 24.04 image for ARM64.
  • ^Windows Server (2016|2019|2022|2025) Standard$ finds the latest image of each Windows Server version.
  • ^Red Hat Enterprise Linux 9$ finds the latest Red Hat Enterprise Linux 9 image. The $ excludes the images for minor releases, such as Red Hat Enterprise Linux 9.4.
  1. Set the pattern for the image you need and list the matching images.

    In Bash:

    Terminal window
    PATTERN='^Windows Server (2016|2019|2022|2025) Standard$'
    stackit image list --project-id <PROJECT_ID> --output-format json \
    | jq --arg p "$PATTERN" '.[] | select(.name | test($p)) | {id, name, status, scope}'

    In PowerShell:

    Terminal window
    $Pattern = '^Windows Server (2016|2019|2022|2025) Standard$'
    (stackit image list --project-id <PROJECT_ID> --output-format json | ConvertFrom-Json) |
    Where-Object { $_.name -match $Pattern } |
    Select-Object id, name, status, scope
  2. Note the value of id for the image you need.

  3. Optional: To check the details of the image, run the following command:

    Terminal window
    stackit image describe <IMAGE_ID> --project-id <PROJECT_ID>

To list all versions of an image, remove the $ from the end of the pattern and include older versions. The commands sort the versions by creation date, with the latest version last.

  1. Set the pattern for the image you need and list all matching versions.

    In Bash:

    Terminal window
    PATTERN='^Windows Server 2025 Standard'
    stackit image list --all --project-id <PROJECT_ID> --output-format json \
    | jq --arg p "$PATTERN" '[.[] | select(.name | test($p))] | sort_by(.createdAt) | .[] | {id, name, createdAt}'

    In PowerShell:

    Terminal window
    $Pattern = '^Windows Server 2025 Standard'
    (stackit image list --all --project-id <PROJECT_ID> --output-format json | ConvertFrom-Json) |
    Where-Object { $_.name -match $Pattern } |
    Sort-Object createdAt |
    Select-Object id, name, createdAt
  2. Note the value of id for the version you need.