Create a new instance
Last updated on
Create a new server
Section titled “Create a new server”You can create new server via STACKIT Portal, API or CLI.
- Visit the STACKIT Portal.
- On the project overview navigate to Computing —> Server.
- Click the button Create server.
Create your server
Section titled “Create your server”- Enter a name for your server under General information.
- Set the location of your new server. If you want to have redundancy by location, you can find more information regarding the Regions and availability zones.
- Add a label to your instance (optional).
- Select the desired operating system and version from the list.
- Select if you want to install STACKIT Server Agent with the Radio button (Set to YES by default).
- Select a storage performance class and size for your volume.
- Select the desired machine type below depending on the required performance. This includes the number of virtual CPUs, maximum usable RAM and hard disk storage capacity. See: Machine types
- If you want to enable Backup and/or Update services you can choose them under Management field.
- Select a Network for your instance. If there is no Network available in the project you need to create at least one.
- Set credentials for you instance - SSH Keys or user/password.
To create a new server via API use this POST request:
POST https://iaas.api.stackit.cloud/v2/projects/{projectId}/regions/{region}/serversRequest body example
Section titled “Request body example”{"affinityGroup": "6cccce46-8a28-4320-89e7-a7636ef03b75","availabilityZone": "eu01-1","bootVolume": {"deleteOnTermination": false,"performanceClass": "storage_premium_perf6","size": 40,"source": { "id": "e24b1440-8d9c-431b-8da4-02916720fab5", "type": "image"}},"keypairName": "keypair-517e9448-1cf1-4b36-9f29-6e66d669a6d2","labels": {"key": "value"},"machineType": "t1.1","name": "server1","networking": {"networkId": "ef018b02-74e9-4f70-87bb-ce1a9742afb9"},"securityGroups": ["188de165-5767-4fc2-8710-a4d2017249e7"],"serviceAccountMails": ["example@compute.sa.stackit.cloud"],"userData": "IyEvYmluL2Jhc2gKL2Jpbi9zdQplY2hvICJJIGFtIGluIHlvdSEiCg==","volumes": ["70bb02f3-c11b-4321-bd78-8f8f4460f1b3"]}API Reference: CreateServer.
To create a new server via CLI use this command:
stackit server create [flags]Command line examples:
Section titled “Command line examples:” Create a server with a boot volume with source type image$ stackit server create --machine-type g2i.1 --name server1 --network-id yyy --boot-volume-source-id xxx --boot-volume-source-type image --boot-volume-size 64
Create a server with a boot volume from an existing volume$ stackit server create --machine-type g2i.1 --name server1 --network-id yyy --boot-volume-source-id xxx --boot-volume-source-type volume
Create a server with a keypair$ stackit server create --machine-type g2i.1 --name server1 --network-id yyy --boot-volume-source-id xxx --boot-volume-source-type image --boot-volume-size 64 --keypair-name example
Create a server with a network interface$ stackit server create --machine-type g2i.1 --name server1 --boot-volume-source-id xxx --boot-volume-source-type image --boot-volume-size 64 --network-interface-ids yyy
Create a server with an attached volume$ stackit server create --machine-type g2i.1 --name server1 --network-id yyy --boot-volume-source-id xxx --boot-volume-source-type image --boot-volume-size 64 --volumes zzz
Create a server with user data (cloud-init)$ stackit server create --machine-type g2i.1 --name server1 --network-id yyy --boot-volume-source-id xxx --boot-volume-source-type image --boot-volume-size 64 --user-data @path/to/file.yaml
Create a server with provisioned agent$ stackit server create --machine-type g2i.1 --name server1 --network-id yyy --boot-volume-source-id xxx --boot-volume-source-type image --boot-volume-size 64 --agent-provisioning-policy ALWAYSCLI Refference: CreateServerCLI.