> ## Content Index
> Fetch the complete content index at: https://www.binarysludge.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Validate a CoreOS cloud-config file
- URL: https://www.binarysludge.com/2015/01/28/validate-a-coreos-cloud-config-file/
- Published: 2015-01-28T12:12:58.000Z
- Updated: 2015-01-28T12:17:45.000Z
- Author: Andrew Martin
- Tags: linux, System Administration, CoreOS, #Import 2026-10-22 12:56

The `coreos-cloudinit` binary is CoreOS-specific, so this can only be done from a CoreOS host:

```
$ coreos-cloudinit -validate --from-file /tmp/cloud-config

```

After the system has been instaled, the `cloud-config` file is written to `/var/lib/coreos-install/user_data`:

```
$ sudo cat /var/lib/coreos-install/user_data
#cloud-config

hostname: coreos1
ssh_authorized_keys:
  - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCZr...

users:
  - name: andy
    groups:
      - sudo
      - docker
    coreos-ssh-import-github: sublimino
...

```

Any changes to this file should be validated to prevent loss of access to the system on reboot.

```
$ coreos-cloudinit -validate --from-file /var/lib/coreos-install/user_data
Checking availability of "local-file"
Fetching user-data from datasource of type "local-file"
line 27: error: found a tab character where an intendation space is expected
line 0: warning: incorrect type for "" (want struct)
$ echo $?
1

```

After fixing that error, the `cloud-config` file validates:

```
$ coreos-cloudinit -validate --from-file /var/lib/coreos-install/user_data
Checking availability of "local-file"
Fetching user-data from datasource of type "local-file"
$ echo $?
0

```