How to create an Instance
This page shows how to create your first Scaleway Instance. An Instance is a virtual machine in the cloud. Just like a physical machine, it has resources - virtualized CPU, RAM, storage etc. - which vary depending on the Instance type you choose. After you have created your Instance you can connect to it and use it for a wide range of computing use cases depending on the Instance type you chose, from running small-scale tests and personal projects to hosting applications and development environments to setting up a production environment.
Select a tab below for instructions on how to create an Instance via either our console, our API, or our CLI.
Before you start
To complete the actions presented below, you must have:
- A Scaleway account logged into the console
- Owner status or IAM permissions allowing you to perform actions in the intended Organization
- An SSH key
- An Instance
-
Click CPU Instances in the Compute section of the side menu. The Instance dashboard displays.
-
Click Create Instance. The Instance creation page displays.
-
Complete the following steps:
- Choose an Availability Zone, which represents the geographical region where your Instance will be deployed.
- Choose an Instance type.
Instance offers vary in pricing, processing power, memory, storage, and bandwidth. Discover the best Instance type for your needs. - Choose an image to run on your Instance.
This can be an operating system, an InstantApp, or a custom image. Check all available Linux distributions and InstantApps. - Name your Instance, or leave the randomly-generated name in place. Optionally, you can add tags to help you organize your Instance.
- Add volumes, which are storage spaces used by your Instances. A block volume with a default name and 5,000 IOPS is automatically provided for your system volume. You can customize this volume and attach up to 16 local and/or block type volumes as needed.
- Configure network of the Instance.
- Leave the checkbox ticked to assign a Public IPv4 to the Instance. You can either allocate a new IPv4 address or select one or multiple existing IPv4s. Alternatively, uncheck the box if you do not want an IPv4.
- Leave the checkbox ticked to assign a Public IPv6 to the Instance. You can either allocate a new IPv6 address or select one or multiple existing IPv6s. Alternatively, uncheck the box if you do not want an IPv6.
- (Optional) Click Cloud-init to configure a cloud-init configuration. Otherwise, leave this option set to its default values. You can configure a cloud-init script to automate Instance setup, such as setting up software, users, and system configurations at the first boot.
- Verify the SSH keys that will give you access to your Instance.
- Verify the Estimated cost of your Instance, based on the specifications you chose.
-
Click Create Instance. The creation of your Instance begins, and you will be informed when the Instance is ready.
Your Instance is now created, and you are redirected to the Overview tab. From here, you can see information including your Instance's Public IP, the SSH command to use to connect to it, and other information, settings, and actions for the Instance.
Before you start
To complete the actions presented below, you must have:
- A Scaleway account logged into the console
- Owner status or IAM permissions allowing you to perform actions in the intended Organization
- An RSA key pair
- An Instance
-
Click CPU Instances in the Compute section of the side menu. The Instance dashboard displays.
-
Click Create Instance. The Instance creation page displays.
-
Complete the following steps:
-
Choose an Availability Zone, which represents the geographical region where your Instance will be deployed.
-
Choose a POP2-WIN Instance type from the Production-Optimized range.
-
Choose a Windows Server image to run on your Instance.
-
Name your Instance, or leave the randomly-generated name in place. Optionally, you can add tags to help you organize your Instance.
-
Add volumes, which are storage spaces used by your Instances. A block volume with a default name and 5,000 IOPS is automatically provided for your system volume. You can customize this volume and attach up to 16 local and/or block type volumes as needed.
-
Configure network of the Instance.
- Leave the checkbox ticked to assign a Public IPv4 to the Instance. You can either allocate a new IPv4 address or select one or multiple existing IPv4s. Alternatively, uncheck the box if you do not want an IPv4.
- Leave the checkbox ticked to assign a Public IPv6 to the Instance. You can either allocate a new IPv6 address or select one or multiple existing IPv6s. Alternatively, uncheck the box if you do not want an IPv6.
-
(Optional) Click Advanced options to configure a cloud-init configuration. Otherwise, leave these options at their default values. You can configure a cloud-init script to automate Instance setup, such as setting up software, users, and system configurations at the first boot.
-
Choose the RSA SSH key that will give you access to your Instance. If you do not have an RSA SSH key yet, click Add RSA SSH key and follow the steps indicated.
-
Verify the Estimated cost of your Instance, based on the specifications you chose.
-
-
Click Create Instance. The creation of your Instance begins, and you will be informed when the Instance is ready.
Your Instance is now created, and you are redirected to the Overview tab. From here, you can see information including your Instance's Public IP, the command to use to retrieve the password and connect to it, and other information, settings, and actions for the Instance.
Before you start
To complete the actions presented below, you must have:
- A Scaleway account logged into the console
- Owner status or IAM permissions allowing you to perform actions in the intended Organization
- An SSH key
- A valid API key
- Installed curl on your local machine
-
Open a terminal and configure your environment variables with the
export
commands shown below.export SCW_ACCESS_KEY="<API access key>" export SCW_SECRET_KEY="<API secret key>" export SCW_PROJECT_ID="<Project ID>" export SCW_DEFAULT_ZONE="<Availability Zone>"
-
Get the label of your OS of choice.
curl --location "https://api.scaleway.com/marketplace/v2/images" \ --header "X-Auth-Token: $SCW_SECRET_KEY" { "images": [ { "id": "607b12c2-685d-45f7-905f-57bc23863834", "name": "Ubuntu 24.04 Noble Numbat", "label": "ubuntu_noble", "description": "Ubuntu is the ideal distribution for scale-out computing, Ubuntu Server helps you make the most of your infrastructure.", "logo": "https://scw-marketplace-logos.s3.fr-par.scw.cloud/ubuntu.png", "categories": [ "distribution" ], "valid_until": null, "created_at": "2024-04-15T11:39:21.011004Z", "updated_at": "2024-10-09T07:32:04.494117Z" }, ], "total_count": 23 }
-
Customize the payload for your API call. This payload specifies the configuration of the Instance you want to create. We provide an example payload below with all the required parameters, and a table of information to help you adapt it to your needs.
{ "name": "my-new-instance", "project": "'""$SCW_PROJECT_ID""'", "commercial_type": "GP1-S", "image": "ubuntu_noble", "enable_ipv6": true, "volumes "0": { "name": "my-volume", "size": 300000000000, "volume_type": "l_ssd" } } }
Parameter Description Valid values name A name of your choice for the Instance (string) Any string containing only alphanumeric characters, dots, spaces and dashes, e.g. "my-new-instance"
.project The Project in which the Instance should be created (string) Any valid Scaleway Project ID (see above), e.g. "b4bd99e0-b389-11ed-afa1-0242ac120002"
commercial-type The commercial Instance type to create (string) Any valid ID of a Scaleway commercial Instance type, e.g. "GP1-S"
,"PRO2-M"
. Use the List Instance Types endpoint to get a list of all valid Instance types and their IDs.image The image to install on the Instance, e.g. a particular OS (string) Any valid Scaleway image label, e.g. ubuntu_noble
which is the label for the Ubuntu 24.04 Noble Numbat image.enable_ipv6 Whether to enable IPv6 on the Instance (boolean) true
orfalse
volumes An object that specifies the storage volumes to attach to the Instance. Must respect the volume constraints of the commercial_type
(i.e. for each type of Instance, a minimum amount of storage is required, and there is also a maximum that cannot be exceeded. Some Instance types support only Block Storage (b_ssd
), others also support Local Storage (l_ssd
) ). These constraints are available at the List Instance Types endpoint, via thevolume_constraints
parameter for each type listed in the responseA (dictionary) object with a minimum of one key ( "0"
) whose value is another object containing the parameters"name"
(a name for the volume),"size"
(the size for the volume, in bytes), and"volume_type"
("l_ssd"
or"b_ssd"
). Additional keys for additional volumes should increment by 1 each time (the second volume would have a key of1
.) Further parameters are available, and it is possible to attach existing volumes rather than creating a new one, or create a volume from a snapshot. For full details see here. -
Use the following curl command, replacing the payload with the one you specified in step 2, to create your Instance.
curl -X POST -H "Content-Type: application/json" \ -H "X-Auth-Token: $SCW_SECRET_KEY" \ "https://api.scaleway.com/instance/v1/zones/{$ZONE}/servers" \ -d '{"name": "my-new-instance", "project": "'"$PROJECT_ID"'", "commercial_type": "GP1-S", "image":"ubuntu_noble","enable_ipv6": true, "volumes":{"0":{"name": "my-volume","size": 300000000000,"volume_type": "l_ssd"}}}'
Valid Instance creation results in a 201
response containing a server
object that confirms the attributes of your Instance.
See the Instance API documentation for full details on the Instance API. In particular, see the Create an Instance call for more details of configurable parameters when creating an Instance.
Before you start
To complete the actions presented below, you must have:
- A Scaleway account logged into the console
- An SSH key
- Owner status or IAM permissions allowing you to perform actions in the intended Organization
- An SSH key
- A valid API key
- Installed and configured the Scaleway CLI on your local machine
-
Get the label of your OS of choice.
scw marketplace image list ID LABEL NAME CATEGORIES VALID UNTIL 607b12c2-685d-45f7-905f-57bc23863834 ubuntu_noble Ubuntu 24.04 Noble Numbat [distribution] -
-
Prepare your command by choosing values for the parameters below to define the Instance you want to create. Use the table to select appropriate values.
name=my-new-instance project-id=adcaffc9-38ef-4502-86e1-f70d3c353745 zone=fr-par-1 type=GP1-S image=ubuntu_noble ip=new root-volume=l:300GB
Parameter Description Valid values name A name of your choice for the Instance Any string containing only alphanumeric characters, dots, spaces and dashes, e.g. my-new-instance
.project-id The Project in which the Instance should be created Any valid Scaleway Project ID, e.g. b4bd99e0-b389-11ed-afa1-0242ac120002
zone The Availability Zone in which the Instance should be created. Note that some Instance types are only available in certain Availability Zones (see **type`**below) Any valid Scaleway Availability Zone, e.g. fr-par-1
,pl-waw-2
type The type of Instance to create Any valid ID of a Scaleway Instance type, e.g. GP1-S
,PRO2-M
. Use the server-type command to get a list of all valid Instance types and their IDs. The default value isDEV1-S
image The image to install on the Instance, e.g. a particular OS Any valid Scaleway image label, e.g. ubuntu_noble
which is the label for the Ubuntu 24.04 Noble Numbat image.ip The IP address to use for the Instance. new
to create a new IP,dynamic
to create a dynamic IP address,none
for no public IP address, or an existing IP ID. Default isnew
root-volume The root volume for the Instance (type e.g. l
(local) orb
(block) followed by a colon and its required size e.g.10GB
)Any valid volume type and size that is coherent with the storage constraints of the Instance type (available via scw instance server-type list
) -
Open a terminal and run the command below, with the parameters modified according to your needs as defined in step one.
scw instance server create name=my-new-instance project-id=2ea18278-847c-4c33-8111-9c2376ed921e zone=fr-par-1 type=GP1-S image=ubuntu_noble ip=new root-volume=l:300GB
Your Instance is created, and its details are returned to you in response.
Read the official Scaleway CLI Instance documentation for full details on how to create an Instance via the CLI, including all available parameters, and how to take your next steps.