Templates

Create and apply reusable host configurations to standardize and speed up new server setup.

Templates are pre-built, reusable host configurations. Use them to standardize how new servers are set up, save time, and ensure consistency across your hosts. If you set up similar servers often, such as when onboarding a new project, save the configuration once as a template and reuse it.

Templates overview
Templates overview

Global and custom templates

TurboStack provides a set of global default templates to get you started. You can also create your own custom templates that capture the exact configuration your projects need.

Viewing templates

To see all available templates, open /templates. Select any template to open it at /templates/{template} and review or edit its configuration.

Creating a template

  1. Go to /templates.
  2. Select Create.
  3. In the modal, enter a name for the template.
  4. Optionally add an image or icon to make the template easy to recognise.
  5. Confirm to create the template and open it for editing.

Creating a template opens the YAML editor. Here you paste a generalized configuration of a server that you want to reuse. This is useful when you regularly deploy servers with a similar setup, such as a fixed MySQL version or a common set of PHP packages.

Here is an example template that sets up an Odoo application behind Nginx:

---
webserver: nginx

postgresql_version: 16

os_extra_packages:
- libxml2-dev
- libxslt1-dev
- libldap2-dev
- libsasl2-dev

system_users:
- username: prod
  vhosts:
  - server_name: example.com www.example.com
    app_name: odoo
    app_type: odoo
    python_version: 3.10.17
    docker_enabled: true
    cert_type: selfsigned

See The Source (YAML) view for how the YAML editor maps to the GUI configuration.

Editing a template

  1. Open the template from /templates.
  2. Adjust the configuration to suit your needs.
  3. Save your changes.

Applying a template to a host

You install a template's configuration onto a host to apply its settings. A host only accepts a template while its configuration is still empty, because installing a template overrides any existing settings. When a host's configuration is empty, TurboStack shows a banner above the configuration to tell you so.

Install a template onto a host

  1. Open the host and confirm the empty-configuration banner is shown.

  2. In the left-hand menu, select Templates.

  3. On the template you want, select Install. This opens the template setup window.

  4. Choose the server you want to install the template to from the drop-down menu.

  5. Enter the server name, the URL you want your application to be reachable at.

  6. Fill in any remaining configuration options, then select Install to send the configuration to the server.

  7. Return to the host's page. The new application is added to the configuration.

  8. Select Save & publish to deploy the configuration to your server.

The Install template window on its Destination step, with the required Destination Host selector and the Cancel and Next buttons
The Install template window on its Destination step, with the required Destination Host selector and the Cancel and Next buttons

Pre-fill a host from a template

As an alternative to installing from the Templates page, you can pre-fill an empty host configuration with the Copy option:

  1. Open the host you want to configure.
  2. Select Copy.
  3. Choose From template.
  4. Select the template you want to use.

The host's configuration is filled in from the template, ready for you to review and adjust.

Common use cases

  • Standardize the setup of every new server.
  • Save time by reusing a known-good configuration.
  • Ensure consistency across hosts that serve the same role.