Overview
This guide documents all settings and options available when configuring a template. Use this guide when you need to understand what a specific setting does or how to configure a particular option. For a step-by-step tutorial on creating your first template, see Creating Templates. For advanced customization techniques, see Advanced Setup.Identification
The first section helps you to keep your templates organized.
Identification section of the template editor
Docker Repository And Environment
This is where you define the Docker image you want to run, along with any options we want to pass into the container.
Docker section of the template editor
repository/image_name:tag
.
Many of our templates pull from DockerHub but you can use any container registry - Just remember to add the full path if you’re using an alternative registry. Eg. nvcr.io/nvidia/pytorch:25.04-py3
You can use any Docker image:
- Public images from DockerHub (e.g.,
nginx:latest
,postgres:14
,python:3.11
) - Vast.ai base images (e.g.,
vastai/base-image
,vastai/pytorch
) - Your own custom images from any registry
- Images from alternative registries (GitHub Container Registry, Google Container Registry, etc.)
[Automatic]
tag you can use. With this selected, the machine you choose for your instance will pull the most recent docker image that is compatible with that machine’s own CUDA version.
This will only work if the image tag contains the CUDA version string. For example: my-image-cuda-12.8
would be loaded on a machine supporting CUDA 12.8, but a machine with only CUDA 12.6 would pull my-image-cuda-12.6
Docker Options
This field is a textual representation of the ports and environment variables declared in the sections beneath it. You can edit it directly or you can use the page widgets.
This field will only accept ports and environment variables. Other docker run options will be ignored.
PROVISIONING_SCRIPT
and PORTAL_CONFIG
can be used to customize Vast templates - see our Advanced Setup guide for details.
You can find out more about port mapping and special environment variables in our Docker Execution Environment guide.
Select Launch Mode
Templates offer three launch modes you can select from. Our recommended templates will usually launch in Jupyter mode for easiest access, but you are free to choose whichever suits your needs.
Launch mode selection options
8080
and SSH will be available on mapped port 22
.
Interactive shell server, SSH
As above, but SSH only with no Jupyter installation.
In both Jupyter and SSH mode, the docker entrypoint for your image will not be run. It will be replaced with our instance setup script so you should use the on start section (documented below) to start any services.

Field allowing for argument passing
On-start Script
Here you can enter a short Bash script which will be run during instance startup. It is only available when using the Jupyter or SSH launch modes, and is most useful for starting any services that your docker image would have launched if the entrypoint had been executed.
On-start Script
Extra Filters
Use this area to place restrictions on the machines that should show up in the search page when the template is selected.
Extra filters showing this template is configured for both AMD64 and ARM64 CPUs
Docker Repository Authentication
If you are using a private Docker image then you will need to add authentication credentials so the machine running the instance can download it.
Docker Repository Authentication
- GitHub Container Registry (GHCR) - Server Name:
ghcr.io
- Google Container Registry (GCR) - Server Name:
gcr.io
Disk Space
By setting the disk space in the template, you can ensure that new instances created from the template will use this amount as a minimum.
Template Visibility
Any template marked as public will be available in the template search system, while private images will not. Private templates can still be used by others if you have shared the template URL.
Never save a template as public if it contains sensitive information or secrets. Use the account level environment variables as an alternative.
CLI Command
Templates can be translated directly into CLI launch commands. This read-only area shows what you would need to type or copy to the CLI if you wanted to programatically launch an instance this way.
Launch a template via the CLI
Save the Template
Finally, you can save the template. If you are creating a new template or editing one which is not associated with your account - Such as one of our recommended templates - The buttons you see will be labelled ‘Create’. For your own templates, you will see them labelled ‘Save’
Buttons for saving