Files
nomad/website/content/docs/commands/config/validate.mdx
Aimee Ukasick 23fd87d9c9 Docs: Commands section move "General options" to page bottom (#26001)
* sectionless files plus acl section

* alloc section

* config, deployment sections

* job section

* licence, namespace

* node, node-pool

* operator

* plugin, quota, recommendation

* scaling, sentinel, server, service, system, var, volume

* Add "ENT" label to left nav for enterprise commands

* job tag break into separate folder and files; update options header
2025-06-12 14:31:38 -05:00

52 lines
1.4 KiB
Plaintext

---
layout: docs
page_title: 'nomad config validate command reference'
description: |
The `nomad config validate` command validates Nomad configuration files so you can test Nomad configuration without starting the agent.
---
# `nomad config validate` command reference
The `config validate` command performs validation on a set of Nomad
configuration files. This is useful to test the Nomad configuration
without starting the agent.
## Usage
```plaintext
nomad config validate <config_path> [<config_path...>]
```
The `config validate` command requires a path to either a single
configuration file or a directory of configuration files to use for
configuring the Nomad agent. This option can be specified multiple
times. If multiple config files are passed, the values from each will
be merged together. During merging, values from files found later in
the list are merged over values from previously parsed files.
This command cannot operate on partial configuration fragments since
those won't pass the full agent validation. This command does not
require an ACL token.
Returns 0 if the configuration is valid, or 1 if there are problems.
## Examples
Validate a configuration file:
```shell-session
$ nomad config validate ./nomad.hcl
Configuration is valid!
```
Validate a directory of configuration files:
```shell-session
$ nomad config validate /etc/nomad.d
Configuration is valid!
```
## General options
@include 'general_options.mdx'