---
title: "Create compute environment"
method: POST
path: "/compute-envs"
tags: ["compute-envs"]
---

# Create compute environment

`POST /compute-envs`

Creates a new compute environment. Append `?workspaceId` to create the environment in a workspace context.

## Query parameters

- `workspaceId` integer

## Request body

- CreateComputeEnvRequest
  - `computeEnv` ComputeEnvComputeConfig
    - `credentialsId` string
    - `orgId` integer
    - `workspaceId` integer
    - `id` string
    - `name` string, required
    - `description` string
    - `platform` 'aws-batch' | 'aws-cloud' | 'seqeracompute-platform' | 'google-batch' | 'google-cloud' | 'azure-batch' | 'azure-cloud' | 'k8s-platform' | 'eks-platform' | 'gke-platform' | 'uge-platform' | 'slurm-platform' | 'lsf-platform' | 'altair-platform' | 'moab-platform' | 'google-lifesciences', required
    - `config` union, required
      - object
        - `workDir` string — Compute environment working directory
        - `preRunScript` string — Add a script that executes in the nf-launch script prior to invoking Nextflow processes. See [Pre and post-run scripts](https://docs.seqera.io/platform-cloud/launch/advanced#pre-and-post-run-scripts).
        - `postRunScript` string — Add a script that executes after all Nextflow processes have completed. See [Pre and post-run scripts](https://docs.seqera.io/platform-cloud/launch/advanced#pre-and-post-run-scripts).
        - `environment` ConfigEnvVariable[]
          - `name` string
          - `value` string
          - `head` boolean
          - `compute` boolean
        - `nextflowConfig` string
        - `discriminator` string — property to select the compute config platform
        - `storageType` string
        - `lustreId` string
        - `volumes` string[]
        - `region` string
        - `computeQueue` string
        - `dragenQueue` string
        - `dragenInstanceType` string
        - `computeJobRole` string
        - `executionRole` string
        - `headQueue` string
        - `headJobRole` string
        - `cliPath` string
        - `headJobCpus` integer
        - `headJobMemoryMb` integer
        - `waveEnabled` boolean
        - `fusion2Enabled` boolean
        - `nvnmeStorageEnabled` boolean
        - `logGroup` string
        - `fusionSnapshots` boolean
        - `forge` ForgeConfig
          - `type` 'SPOT' | 'EC2'
          - `minCpus` integer
          - `maxCpus` integer
          - `gpuEnabled` boolean
          - `ebsAutoScale` boolean
          - `instanceTypes` string[]
          - `allocStrategy` 'BEST_FIT' | 'BEST_FIT_PROGRESSIVE' | 'SPOT_CAPACITY_OPTIMIZED' | 'SPOT_PRICE_CAPACITY_OPTIMIZED'
          - `imageId` string
          - `vpcId` string
          - `subnets` string[]
          - `securityGroups` string[]
          - `fsxMount` string
          - `fsxName` string
          - `fsxSize` integer
          - `disposeOnDeletion` boolean
          - `ec2KeyPair` string
          - `allowBuckets` string[]
          - `ebsBlockSize` integer
          - `fusionEnabled` boolean
          - `bidPercentage` integer
          - `efsCreate` boolean
          - `efsId` string
          - `efsMount` string
          - `dragenEnabled` boolean
          - `dragenAmiId` string
          - `ebsBootSize` integer
          - `ecsConfig` string
          - `fargateHeadEnabled` boolean
          - `arm64Enabled` boolean
          - `dragenInstanceType` string
        - `forgedResources` object[]
      - object
        - `workDir` string — Compute environment working directory
        - `preRunScript` string — Add a script that executes in the nf-launch script prior to invoking Nextflow processes. See [Pre and post-run scripts](https://docs.seqera.io/platform-cloud/launch/advanced#pre-and-post-run-scripts).
        - `postRunScript` string — Add a script that executes after all Nextflow processes have completed. See [Pre and post-run scripts](https://docs.seqera.io/platform-cloud/launch/advanced#pre-and-post-run-scripts).
        - `environment` ConfigEnvVariable[]
          - `name` string
          - `value` string
          - `head` boolean
          - `compute` boolean
        - `nextflowConfig` string
        - `discriminator` string — property to select the compute config platform
        - `allowBuckets` string[]
        - `region` string
        - `instanceType` string
        - `imageId` string
        - `waveEnabled` boolean
        - `fusion2Enabled` boolean
        - `logGroup` string
        - `arm64Enabled` boolean
        - `gpuEnabled` boolean
        - `ec2KeyPair` string
        - `ebsBootSize` integer
        - `instanceProfileArn` string
        - `subnetId` string
        - `securityGroups` string[]
        - `forgedResources` object[]
      - object
        - `workDir` string — Compute environment working directory
        - `preRunScript` string — Add a script that executes in the nf-launch script prior to invoking Nextflow processes. See [Pre and post-run scripts](https://docs.seqera.io/platform-cloud/launch/advanced#pre-and-post-run-scripts).
        - `postRunScript` string — Add a script that executes after all Nextflow processes have completed. See [Pre and post-run scripts](https://docs.seqera.io/platform-cloud/launch/advanced#pre-and-post-run-scripts).
        - `environment` ConfigEnvVariable[]
          - `name` string
          - `value` string
          - `head` boolean
          - `compute` boolean
        - `nextflowConfig` string
        - `discriminator` string — property to select the compute config platform
        - `region` string
        - `defaultDataRetentionPolicy` boolean
        - `instanceTypeSize` 'SMALL' | 'MEDIUM' | 'LARGE'
      - object
        - `workDir` string — Compute environment working directory
        - `preRunScript` string — Add a script that executes in the nf-launch script prior to invoking Nextflow processes. See [Pre and post-run scripts](https://docs.seqera.io/platform-cloud/launch/advanced#pre-and-post-run-scripts).
        - `postRunScript` string — Add a script that executes after all Nextflow processes have completed. See [Pre and post-run scripts](https://docs.seqera.io/platform-cloud/launch/advanced#pre-and-post-run-scripts).
        - `environment` ConfigEnvVariable[]
          - `name` string
          - `value` string
          - `head` boolean
          - `compute` boolean
        - `nextflowConfig` string
        - `discriminator` string — property to select the compute config platform
        - `location` string
        - `spot` boolean
        - `bootDiskSizeGb` integer
        - `cpuPlatform` string
        - `machineType` string
        - `projectId` string
        - `sshDaemon` boolean
        - `sshImage` string
        - `debugMode` integer
        - `copyImage` string
        - `usePrivateAddress` boolean
        - `labels` object
        - `headJobCpus` integer
        - `headJobMemoryMb` integer
        - `nfsTarget` string
        - `nfsMount` string
        - `waveEnabled` boolean
        - `fusion2Enabled` boolean
        - `serviceAccount` string
        - `network` string
        - `subnetwork` string
        - `headJobInstanceTemplate` string
        - `computeJobsInstanceTemplate` string
      - object
        - `workDir` string — Compute environment working directory
        - `preRunScript` string — Add a script that executes in the nf-launch script prior to invoking Nextflow processes. See [Pre and post-run scripts](https://docs.seqera.io/platform-cloud/launch/advanced#pre-and-post-run-scripts).
        - `postRunScript` string — Add a script that executes after all Nextflow processes have completed. See [Pre and post-run scripts](https://docs.seqera.io/platform-cloud/launch/advanced#pre-and-post-run-scripts).
        - `environment` ConfigEnvVariable[]
          - `name` string
          - `value` string
          - `head` boolean
          - `compute` boolean
        - `nextflowConfig` string
        - `discriminator` string — property to select the compute config platform
        - `waveEnabled` boolean
        - `fusion2Enabled` boolean
        - `projectId` string
        - `region` string
        - `zone` string
        - `serviceAccountEmail` string
        - `instanceType` string
        - `imageId` string
        - `arm64Enabled` boolean
        - `gpuEnabled` boolean
        - `bootDiskSizeGb` integer
        - `forgedResources` object[]
      - object
        - `workDir` string — Compute environment working directory
        - `preRunScript` string — Add a script that executes in the nf-launch script prior to invoking Nextflow processes. See [Pre and post-run scripts](https://docs.seqera.io/platform-cloud/launch/advanced#pre-and-post-run-scripts).
        - `postRunScript` string — Add a script that executes after all Nextflow processes have completed. See [Pre and post-run scripts](https://docs.seqera.io/platform-cloud/launch/advanced#pre-and-post-run-scripts).
        - `environment` ConfigEnvVariable[]
          - `name` string
          - `value` string
          - `head` boolean
          - `compute` boolean
        - `nextflowConfig` string
        - `discriminator` string — property to select the compute config platform
        - `region` string
        - `headPool` string
        - `autoPoolMode` boolean
        - `forge` AzBatchForgeConfig
          - `vmType` string
          - `vmCount` integer
          - `autoScale` boolean
          - `disposeOnDeletion` boolean
          - `containerRegIds` string[]
        - `tokenDuration` string
        - `deleteJobsOnCompletion` 'on_success' | 'always' | 'never'
        - `deletePoolsOnCompletion` boolean
        - `waveEnabled` boolean
        - `fusion2Enabled` boolean
        - `managedIdentityClientId` string, nullable
      - object
        - `workDir` string — Compute environment working directory
        - `preRunScript` string — Add a script that executes in the nf-launch script prior to invoking Nextflow processes. See [Pre and post-run scripts](https://docs.seqera.io/platform-cloud/launch/advanced#pre-and-post-run-scripts).
        - `postRunScript` string — Add a script that executes after all Nextflow processes have completed. See [Pre and post-run scripts](https://docs.seqera.io/platform-cloud/launch/advanced#pre-and-post-run-scripts).
        - `environment` ConfigEnvVariable[]
          - `name` string
          - `value` string
          - `head` boolean
          - `compute` boolean
        - `nextflowConfig` string
        - `discriminator` string — property to select the compute config platform
        - `waveEnabled` boolean
        - `fusion2Enabled` boolean
        - `instanceType` string
        - `region` string
        - `resourceGroup` string
        - `networkId` string
        - `subscriptionId` string
        - `managedIdentityId` string
        - `managedIdentityClientId` string
        - `logWorkspaceId` string
        - `logTableName` string
        - `dataCollectionEndpoint` string
        - `dataCollectionRuleId` string
        - `forgedResources` MapEntryStringString[]
          - `key` string
          - `value` string
      - object
        - `workDir` string — Compute environment working directory
        - `preRunScript` string — Add a script that executes in the nf-launch script prior to invoking Nextflow processes. See [Pre and post-run scripts](https://docs.seqera.io/platform-cloud/launch/advanced#pre-and-post-run-scripts).
        - `postRunScript` string — Add a script that executes after all Nextflow processes have completed. See [Pre and post-run scripts](https://docs.seqera.io/platform-cloud/launch/advanced#pre-and-post-run-scripts).
        - `environment` ConfigEnvVariable[]
          - `name` string
          - `value` string
          - `head` boolean
          - `compute` boolean
        - `nextflowConfig` string
        - `discriminator` string — property to select the compute config platform
        - `launchDir` string
        - `userName` string
        - `hostName` string
        - `port` integer
        - `headQueue` string
        - `computeQueue` string
        - `maxQueueSize` integer
        - `headJobOptions` string
        - `propagateHeadJobOptions` boolean
        - `unitForLimits` string
        - `perJobMemLimit` boolean
        - `perTaskReserve` boolean
      - object
        - `workDir` string — Compute environment working directory
        - `preRunScript` string — Add a script that executes in the nf-launch script prior to invoking Nextflow processes. See [Pre and post-run scripts](https://docs.seqera.io/platform-cloud/launch/advanced#pre-and-post-run-scripts).
        - `postRunScript` string — Add a script that executes after all Nextflow processes have completed. See [Pre and post-run scripts](https://docs.seqera.io/platform-cloud/launch/advanced#pre-and-post-run-scripts).
        - `environment` ConfigEnvVariable[]
          - `name` string
          - `value` string
          - `head` boolean
          - `compute` boolean
        - `nextflowConfig` string
        - `discriminator` string — property to select the compute config platform
        - `launchDir` string
        - `userName` string
        - `hostName` string
        - `port` integer
        - `headQueue` string
        - `computeQueue` string
        - `maxQueueSize` integer
        - `headJobOptions` string
        - `propagateHeadJobOptions` boolean
      - object
        - `workDir` string — Compute environment working directory
        - `preRunScript` string — Add a script that executes in the nf-launch script prior to invoking Nextflow processes. See [Pre and post-run scripts](https://docs.seqera.io/platform-cloud/launch/advanced#pre-and-post-run-scripts).
        - `postRunScript` string — Add a script that executes after all Nextflow processes have completed. See [Pre and post-run scripts](https://docs.seqera.io/platform-cloud/launch/advanced#pre-and-post-run-scripts).
        - `environment` ConfigEnvVariable[]
          - `name` string
          - `value` string
          - `head` boolean
          - `compute` boolean
        - `nextflowConfig` string
        - `discriminator` string — property to select the compute config platform
        - `server` string
        - `sslCert` string
        - `namespace` string
        - `computeServiceAccount` string
        - `headServiceAccount` string
        - `storageClaimName` string
        - `storageMountPath` string
        - `podCleanup` 'on_success' | 'always' | 'never'
        - `headPodSpec` string
        - `servicePodSpec` string
        - `headJobCpus` integer
        - `headJobMemoryMb` integer
      - object
        - `workDir` string — Compute environment working directory
        - `preRunScript` string — Add a script that executes in the nf-launch script prior to invoking Nextflow processes. See [Pre and post-run scripts](https://docs.seqera.io/platform-cloud/launch/advanced#pre-and-post-run-scripts).
        - `postRunScript` string — Add a script that executes after all Nextflow processes have completed. See [Pre and post-run scripts](https://docs.seqera.io/platform-cloud/launch/advanced#pre-and-post-run-scripts).
        - `environment` ConfigEnvVariable[]
          - `name` string
          - `value` string
          - `head` boolean
          - `compute` boolean
        - `nextflowConfig` string
        - `discriminator` string — property to select the compute config platform
        - `server` string
        - `sslCert` string
        - `namespace` string
        - `computeServiceAccount` string
        - `headServiceAccount` string
        - `storageClaimName` string
        - `storageMountPath` string
        - `podCleanup` 'on_success' | 'always' | 'never'
        - `headPodSpec` string
        - `servicePodSpec` string
        - `headJobCpus` integer
        - `headJobMemoryMb` integer
        - `region` string — AWS region
        - `clusterName` string — The AWS EKS cluster name
        - `waveEnabled` boolean
        - `fusion2Enabled` boolean
      - object
        - `workDir` string — Compute environment working directory
        - `preRunScript` string — Add a script that executes in the nf-launch script prior to invoking Nextflow processes. See [Pre and post-run scripts](https://docs.seqera.io/platform-cloud/launch/advanced#pre-and-post-run-scripts).
        - `postRunScript` string — Add a script that executes after all Nextflow processes have completed. See [Pre and post-run scripts](https://docs.seqera.io/platform-cloud/launch/advanced#pre-and-post-run-scripts).
        - `environment` ConfigEnvVariable[]
          - `name` string
          - `value` string
          - `head` boolean
          - `compute` boolean
        - `nextflowConfig` string
        - `discriminator` string — property to select the compute config platform
        - `server` string
        - `sslCert` string
        - `namespace` string
        - `computeServiceAccount` string
        - `headServiceAccount` string
        - `storageClaimName` string
        - `storageMountPath` string
        - `podCleanup` 'on_success' | 'always' | 'never'
        - `headPodSpec` string
        - `servicePodSpec` string
        - `headJobCpus` integer
        - `headJobMemoryMb` integer
        - `region` string — The GKE cluster region - or - zone
        - `clusterName` string — The GKE cluster name
        - `fusion2Enabled` boolean
        - `waveEnabled` boolean
      - object
        - `workDir` string — Compute environment working directory
        - `preRunScript` string — Add a script that executes in the nf-launch script prior to invoking Nextflow processes. See [Pre and post-run scripts](https://docs.seqera.io/platform-cloud/launch/advanced#pre-and-post-run-scripts).
        - `postRunScript` string — Add a script that executes after all Nextflow processes have completed. See [Pre and post-run scripts](https://docs.seqera.io/platform-cloud/launch/advanced#pre-and-post-run-scripts).
        - `environment` ConfigEnvVariable[]
          - `name` string
          - `value` string
          - `head` boolean
          - `compute` boolean
        - `nextflowConfig` string
        - `discriminator` string — property to select the compute config platform
        - `launchDir` string
        - `userName` string
        - `hostName` string
        - `port` integer
        - `headQueue` string
        - `computeQueue` string
        - `maxQueueSize` integer
        - `headJobOptions` string
        - `propagateHeadJobOptions` boolean
      - object
        - `workDir` string — Compute environment working directory
        - `preRunScript` string — Add a script that executes in the nf-launch script prior to invoking Nextflow processes. See [Pre and post-run scripts](https://docs.seqera.io/platform-cloud/launch/advanced#pre-and-post-run-scripts).
        - `postRunScript` string — Add a script that executes after all Nextflow processes have completed. See [Pre and post-run scripts](https://docs.seqera.io/platform-cloud/launch/advanced#pre-and-post-run-scripts).
        - `environment` ConfigEnvVariable[]
          - `name` string
          - `value` string
          - `head` boolean
          - `compute` boolean
        - `nextflowConfig` string
        - `discriminator` string — property to select the compute config platform
        - `launchDir` string
        - `userName` string
        - `hostName` string
        - `port` integer
        - `headQueue` string
        - `computeQueue` string
        - `maxQueueSize` integer
        - `headJobOptions` string
        - `propagateHeadJobOptions` boolean
      - object
        - `workDir` string — Compute environment working directory
        - `preRunScript` string — Add a script that executes in the nf-launch script prior to invoking Nextflow processes. See [Pre and post-run scripts](https://docs.seqera.io/platform-cloud/launch/advanced#pre-and-post-run-scripts).
        - `postRunScript` string — Add a script that executes after all Nextflow processes have completed. See [Pre and post-run scripts](https://docs.seqera.io/platform-cloud/launch/advanced#pre-and-post-run-scripts).
        - `environment` ConfigEnvVariable[]
          - `name` string
          - `value` string
          - `head` boolean
          - `compute` boolean
        - `nextflowConfig` string
        - `discriminator` string — property to select the compute config platform
        - `launchDir` string
        - `userName` string
        - `hostName` string
        - `port` integer
        - `headQueue` string
        - `computeQueue` string
        - `maxQueueSize` integer
        - `headJobOptions` string
        - `propagateHeadJobOptions` boolean
      - object
        - `workDir` string — Compute environment working directory
        - `preRunScript` string — Add a script that executes in the nf-launch script prior to invoking Nextflow processes. See [Pre and post-run scripts](https://docs.seqera.io/platform-cloud/launch/advanced#pre-and-post-run-scripts).
        - `postRunScript` string — Add a script that executes after all Nextflow processes have completed. See [Pre and post-run scripts](https://docs.seqera.io/platform-cloud/launch/advanced#pre-and-post-run-scripts).
        - `environment` ConfigEnvVariable[]
          - `name` string
          - `value` string
          - `head` boolean
          - `compute` boolean
        - `nextflowConfig` string
        - `discriminator` string — property to select the compute config platform
        - `region` string
        - `zones` string[]
        - `location` string
        - `preemptible` boolean
        - `bootDiskSizeGb` integer
        - `projectId` string
        - `sshDaemon` boolean
        - `sshImage` string
        - `debugMode` integer
        - `copyImage` string
        - `usePrivateAddress` boolean
        - `labels` object
        - `headJobCpus` integer
        - `headJobMemoryMb` integer
        - `nfsTarget` string
        - `nfsMount` string
    - `dateCreated` string, date-time
    - `lastUpdated` string, date-time
    - `lastUsed` string, date-time
    - `deleted` boolean
    - `status` 'CREATING' | 'AVAILABLE' | 'DELETING' | 'ERRORED' | 'INVALID' | 'DISABLED'
    - `message` string
    - `primary` boolean
  - `labelIds` integer[]

## Response `200`

OK

- CreateComputeEnvResponse
  - `computeEnvId` string

## Other responses

- `400` — Bad request
- `403` — Operation not allowed

## Changes

> 4 revisions in range; 1 not diffed.

- **2026-03-10** `49c99a6944de` — 2 breaking
  - removed the enum value `local-platform` of the request property `computeEnv/platform`
  - removed `#/components/schemas/LocalComputeConfig` from the `computeEnv/config` request property `oneOf` list
- **2026-01-20** `98d6b538c88e` — 8 warning, 137 info
  - removed `#/components/schemas/AbstractGridConfig, subschema #2` from the `computeEnv/config/oneOf[subschema #12: Univa Grid Engine configuration -> subschema #14: Univa Grid Engine configuration]/` request property `allOf` list
  - removed `#/components/schemas/AbstractGridConfig, subschema #2` from the `computeEnv/config/oneOf[subschema #13: Altair PBS configuration -> subschema #15: Altair PBS configuration]/` request property `allOf` list
  - removed `#/components/schemas/AbstractGridConfig, subschema #2` from the `computeEnv/config/oneOf[subschema #14: Moab configuration -> subschema #16: Moab configuration]/` request property `allOf` list
  - removed `#/components/schemas/AbstractGridConfig, subschema #2` from the `computeEnv/config/oneOf[subschema #7: IBM LSF configuration -> subschema #9: IBM LSF configuration]/` request property `allOf` list
  - …141 more

[Change history](https://skmtc.dev/seqeralabs/apis/seqera-api/changes/compute-envs/post.md)

---

[API](https://skmtc.dev/seqeralabs/apis/seqera-api.md) · [All operations](https://skmtc.dev/seqeralabs/apis/seqera-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/seqeralabs/seqera-api/revisions/49c99a6944de/schema)
