The Source (YAML) view
Every host and group can be edited in two ways: the guided GUI editor, and the Source view, which shows the configuration as raw YAML. Both edit the same configuration. Use whichever suits the task.
Opening the Source view
In a host's header, click the </> Source button. This opens the YAML editor at
/hosts/yaml/{id}. The breadcrumb ends in Source. To go back, click the GUI button in
the header.
Tip
The GUI and Source views stay in sync. Changes you make in one are reflected in the other, because they describe the same underlying configuration.
What you can do
-
Edit the YAML directly - useful for advanced changes, reviewing the whole configuration at a glance, or making many edits quickly.
-
Copy - the Copy menu can pre-fill the configuration From host (another of your hosts) or From template.
The YAML mirrors the structure you see in the GUI, for example:
webserver: nginx
mysql_version: "8.4"
system_users:
- username: prod
vhosts:
- server_name: app.example.com
php_version: "8.4"
cert_type: letsencrypt
See Core concepts for the configuration model, and Applications and Services for what these keys control.
Saving and validating
Saving from the Source view works exactly like the GUI: Save stores the configuration, and Save & Publish deploys it (see Publishing changes). Before saving, the YAML is validated. Invalid YAML is flagged and the publish action is disabled until it is fixed.
Warning
Because the Source view is free-form, a small mistake (wrong indentation, a typo in a key) can change behavior. If you are unsure, make the change in the GUI and switch to Source to review the result.
GUI vs. Source: which to use
You can set your preferred default editing mode in Profile & preferences.
Related
- YAML configuration reference - every key you can set, and what it does
- Hosts
- Core concepts
- Publishing changes