Compute / task

Launch an instance

Launch an instance to get a running Linux machine you can log in to over SSH. You choose what it boots from, its size, its key pair and where it sits on the network.

Before you begin

Launch the instance

  1. Choose an instance type whose available is true:

    Terminal window
    origin compute list-instance-types

    For what the fields mean, see Instance types.

  2. Choose an image. List the platform-provided images and your own:

    Terminal window
    origin compute list-images --project-urn <project-urn>

    To launch the image currently designated for a family instead, use --image-family <family-slug> in place of --image-urn in the next step. See Image families.

  3. Launch the instance:

    Terminal window
    origin compute launch-instance \
    --project-urn <project-urn> \
    --image-urn <image-urn> \
    --instance-type gp1.core.2 \
    --key-pair-urn <key-pair-urn>

    With no --subnet-urn, the instance goes into your project’s default subnet. That subnet is created on first use, in a VPC with an internet gateway, and the instance’s network interface gets a public address automatically. See Default VPC.

  4. Add the options you need. Each is optional:

    OptionUse it to
    --subnet-urn <subnet-urn>Place the instance in a subnet of your own VPC.
    --security-group-urn <security-group-urn>Attach security groups to the network interface. Repeat it for several groups. Omitted, the VPC’s default security group applies. See Security groups.
    --boot-volume-size-gib <size>Make the root disk bigger than the image. See Instance storage.
    --boot-volume-storage-class <class>Pick the root disk’s storage class. See Storage classes.
    --login-user <name>Override the image’s default user. See Guest environment.

    --volume-backend accepts only pvs, which is the default. Leave it out.

  5. Wait for the instance to reach RUNNING. Run get-instance until status stops changing:

    Terminal window
    origin compute get-instance --instance-urn <instance-urn>

    It passes through INITIALIZING and PENDING first. If it ends up FAILED, read its statusReason and see Status reasons.

  6. Find the instance’s addresses. get-instance lists the instance’s network interfaces under networkInterfaceAttachments, each with its ipv4Address, ipv6Address and, if it has one, its Floating IP as floatingIpAddress:

    Terminal window
    origin compute get-instance --instance-urn <instance-urn>

    list-instances shows the same for every instance in the project. See Network interfaces.

  7. Verify that you can log in, as the instance’s loginUser, with the private key of the key pair:

    Terminal window
    ssh -i <private-key-file> <login-user>@<public-address>

    The VPC’s default security group allows SSH from anywhere. If you attached other security groups, one of them must allow inbound TCP port 22 from your address.

Using the API

The launchInstance mutation takes the same inputs. It also accepts imageFamily in place of imageUrn, which launches the image currently designated for that family. Set exactly one of the two. See Image families.

mutation {
compute {
launchInstance(input: {
projectUrn: "<project-urn>"
imageFamily: "<family-slug>"
instanceType: "gp1.core.2"
keyPairUrn: "<key-pair-urn>"
bootVolume: { sizeInGib: 40 }
}) {
urn
status
loginUser
}
}
}

If the launch is refused

A refused launch creates nothing and costs nothing.

  • INSUFFICIENT_CAPACITY: no machine has room for this type right now. The message names the type and what was short. Retry later or launch a smaller type. See INSUFFICIENT_CAPACITY.
  • PRODUCT_UNAVAILABLE: the instance type or storage class isn’t offered. Pick one whose available is true. See PRODUCT_UNAVAILABLE.
  • Quota: the launch would take the organization or project past an instance, vCPU or storage limit. The error names the quota. See Limits.
  • Root disk too small: --boot-volume-size-gib is smaller than the image. The error names the smallest size that works.

For other problems, see Troubleshoot Compute.

Next steps

Origin Cloud — user documentation · last reviewed 2026-10-13 Legal notice Privacy policy