How to Create a Machine

Machines are Linux and Windows virtual machines with persistent storage, GPU options, and free unlimited bandwidth. They’re designed for high-performance computing (HPC) workloads.


You can create a Linux machine using the Paperspace console, Paperspace API, or Paperspace CLI.

Note
As of 1 July 2024, Windows-based templates are retired and unavailable to new Paperspace users. If you joined Paperspace prior to this date, you can still start, manage, and create Windows-based template machines.

Create a Machine in the Paperspace Console

When you create a new machine, you choose your machine type, operating system or custom template, disk size, region, authentication, starting state, and which features (like backups, public IP address, or private network) to enable or add.

Creating a machine using an individual account automatically assigns that account as the owner of the machine. If you are a team administrator, you must specify the users that need access to the machine.

To access the Paperspace console and create a machine, you need to either login or create a Paperspace account.

Afterwards, in the Paperspace console, in the top-left corner, click the dropdown menu, select CORE, click the Machines tab, then click CREATE A MACHINE to open the Create a new machine page.

The Machines page of the Core dashboard.

Choose a Machine Type

In the Machine section, click the dropdown menu to select the machine type you want to use. There are several machine types grouped by CPU, GPU, and multi-GPU. If you choose any high-end machines, such as NVIDIA H100, you need to request for approval to use them. After writing your request, click REQUEST MACHINE TYPE.

Each machine type option displays its hourly based price and the amount of CPU and RAM the machine offers. For GPUs, the type of graphics card is also shown. You should choose your machine type based on your needs, like the amount of computational intensity involved in your work.

After specifying your machine type, you can configure your machine’s operating system template, disk size, and machine name.

The Machine section of the machine creation page.

Choose an Operating System Template

In the Machine section, under the operating system Template sub-section, click the dropdown menu to select the operating system template you want to use. operating system templates are server images maintained by Paperspace.

A recommended operating system template is already selected, but for the best performance, choose the operating system template that suits your needs. There are two types of operating system templates grouped by Linux and Windows-based types. Linux-based operating system templates are basic Unix-like images without any additional software, whereas Windows-based operating system templates are basic versions of the Windows operating system without any additional software.

Note
As of 1 July 2024, Windows-based templates are retired and unavailable to new Paperspace users. If you joined Paperspace prior to this date, you can still start, manage, and create Windows-based template machines.

If you create or use a Linux-based operating system template, you must use SSH keys to access your machine as they’re more secure compared to passwords. If you do not have a SSH key, you can create and add one to your machine.

If none of the templates offered by Paperspace align to your needs, you can use a custom template. However, you need to create at least one machine before you can create and use a custom template. This is because custom templates are full disk images of one of your previously created machines.

If you want to use a NVIDIA H100 GPU, we recommend implementing ML-in-a-Box, which is a generic data science stack template. When using the ML-in-a-Box template, you do not need to disable NVLink for NVIDIA H100x1.

NVIDIA H100s do not work with all libraries and versions. NVIDIA H100 machines use CUDA driver 12.2 and CUDA runtime 12.1. Changing your CUDA version or adding/removing libraries that differ from the ML-in-a-Box template could cause your NVIDIA H100 machines to malfunction.

To see the current versions and libraries compatible with ML-in-a-Box, see the ML-in-a-Box template’s included software.

Choose a Disk Size

In the Machine section, under the Disk size sub-section, click the dropdown menu to select the disk size, which is the size of your machine’s storage. Each option displays the disk size in GB or TB along with its hourly based price.

Choose a Machine Name

In the Machine section, under the Machine name sub-section, provide a unique name for your machine or use the provided auto-generated name.

After configuring your machine, in the Networking section, you can configure your machine’s networking setup, which consists of choosing a region, assigning a public IP address for your machine, and optionally, adding a private network.

The Network section of the machine creation page.

Choose a Region

In the Networking section, under the Region sub-section, select the region where you want to create your machine. A recommended default is selected, but for the best performance and minimal latency, choose the datacenter nearest to you and your users.

Add a Public IP Address

In the Networking section, under the Public IP sub-section, select the type of public IP address you want to use for your machine, which is either dynamic or static.

The default choice is to use a dynamic public IP address, which is an IP address assigned only when your machine is turned on. It is deleted when you turn your machine off. You are not charged for dynamic public IP addresses when your machine is off.

Static public IP addresses are stored in your Paperspace account. You are required to delete this public IP address through the Paperspace console when you no longer need it.

A public IP address ensures your machine is reachable over the internet.

You can also choose to add no public IP address by selecting None. However, this is unavailable for terminal/SSH-only machine types, as a public IP address is required to connect to these machines.

Add a Private Network

Optionally, in the Networking section, under the Private network sub-section, either click the Private network dropdown menu to select an existing private network, or click the ADD PRIVATE NETWORK button to open the Create Private Network window, attaches your machine to a private network. This is an ideal choice if you want to restrict access to your machine to only other machines within the same network.

A private network is required to enable multi-node training, a method that distributes workloads across multiple machines. If multiple machines need to access the same file system, managing a shared drive is necessary.

Once a machine is on a private network, you can’t remove it from the private network. Alternatively, you can migrate the machine to a different private network. By default, there is no private network associated with your machine.

If you’re creating a new private network, on the Create Private Network window, specify the name of the private network you want to use. This private network is created in the same region as your machine.

The Private network sub-section's Create Private Network window of the machine creation page.

After specifying the name of the private network, click ADD PRIVATE NETWORK.

Set Up an SSH Key

In the Authentication and Access section, add an SSH key to authenticate users who want to use your machine. You need a name for the key and its public key. If you don’t have an SSH key, create one, then add it to your machine.

Any existing SSH keys on your account are automatically connected to your machine.

The Authentication and Access section of the machine creation page with SSH setup.

Set Up Snapshots

In the Snapshots section, click the Snapshot frequency dropdown menu to select how often automatic snapshots are taken of your machine, then click the Snapshots to store dropdown menu to specify the maximum number of snapshots stored.

These snapshots are used as backups of your machine. By default, the snapshot frequency is set to “Never” with “0” snapshots stored.

The frequency of -autosnapshot options range from “Never”, “Hourly”, “Daily”, “Weekly”, and “Monthly”.

If you reach the maximum number of snapshots stored, the older snapshots are deleted and replaced by your new snapshots.

The Snapshots section of the machine creation page.

Set Starting State

In the Starting State section, use the Start immediately toggle to specify whether your machine turns on or off immediately after creation. By default, the machine starts immediately after the machine is created. To learn more about machine states, see the Machine States and Error Codes reference.

Review Price Summary

In the Price summary section, review your machine’s total costs. The price summary shows the machine’s hourly price based on the machine type, disk size, and other configurations you’ve chosen.

The price summary also displays the hourly prices for when the machine is running and for the lifetime of your machine, which are costs incurred until you deactivate your machine. When you machine is turned on, the hourly price is based on the machine type and the public IP address. For your machine’s lifetime, the hourly price is based on the disk size.

The Price Summary section of the machine creation page.

After reviewing your machine’s configurations and its price summary, click CREATE MACHINE. After creating your machine, you can use various commands to verify GPU status, such as checking if they are accessible within the environment or if NVLink, a feature designed to interconnect multiple GPUs at high speed, is activated.

  • nvidia-smi: Verifies if GPUs are detected.
  • nvidia-smi topo -m: Checks if NVLink is enabled. If available, it provides output indicating the status for the connected GPUs.

Add Users

After you’ve created your machine, you can add users from your Paperspace team to access your new machine.

For team members given access to your machine, existing SSH keys on their Paperspace accounts are automatically added to the machine.

Set Up Auto-shutdown

After you’ve created your machine, you can set up auto-shutown for your machine.

The Auto-shutdown section of the machine's Settings page.

Create a Machine Using the Paperspace API

When creating a machine using the Paperspace API, you need to provide the following values:

How to Create a Machine Using the Paperspace API
  1. Create an API key to authenticate your requests to your Paperspace account and save it for use.

  2. Send a POST request to https://api.paperspace.com/v1/machines. Basic usage looks like this, but you can read the usage docs for more details:

curl -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $PAPERSPACE_API_KEY" \
  -d '{
        "name": "your-machine-name",
        "machineType": "a100-80g",
        "templateId": "tx98gvxz",
        "diskSize": 50,
        "region": "NY2"
      }' \
  "https://api.paperspace.com/v1/machines"

Create a Machine Using the Paperspace CLI

When creating a machine using the Paperspace CLI, you need to provide the following values:

How to Create a Machine Using the Paperspace CLI
  1. Install pspace, the Paperspace command-line tool.

  2. Create an API key to authenticate your requests to your Paperspace account and save it for use with pspace.

  3. Use the API key to grant pspace access to your Paperspace account.

pspace login --api-key your-api-key
  1. Finally, run pspace machine create -F [flags]. Basic usage looks like this, but you can read the usage docs for more details:
pspace machine create -F --name your-machine-name --machine-type a100-80g --template-id tx98gvxz --region NY2 --disk-size 50