Templates
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.
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
- Go to
/templates. - Select
Create. - In the modal, enter a name for the template.
- Optionally add an
imageoriconto make the template easy to recognise. - 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
- Open the template from
/templates. - Adjust the configuration to suit your needs.
- Save your changes.
Tip
Keep a small number of well-maintained templates rather than many similar ones. This makes it easier to apply a consistent setup across every new host.
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
-
Open the host and confirm the empty-configuration banner is shown.
-
In the left-hand menu, select
Templates. -
On the template you want, select
Install. This opens the template setup window. -
Choose the server you want to install the template to from the drop-down menu.
-
Enter the
server name, the URL you want your application to be reachable at. -
Fill in any remaining configuration options, then select
Installto send the configuration to the server. -
Return to the host's page. The new application is added to the configuration.
-
Select
Save & publishto deploy the configuration to your server.
Important
Installing a template only fills in the configuration. Nothing is deployed until you select
Save & publish.
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:
- Open the host you want to configure.
- Select
Copy. - Choose
From template. - Select the template you want to use.
The host's configuration is filled in from the template, ready for you to review and adjust.
Note
Both methods only work on hosts whose configuration has not yet been set. See
Managing hosts for more on the Copy options.
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.