NUAGEINIT(7)
π NAME π
okay so bestie, this is nuageinit(7) β the manual page for initializing a cloud-init environment. It's giving βfirst boot gets a glow-upβ energy, and honestly? iconic. π
π¦ DESCRIPTION π¦
The nuageinit program is used to initialize instances in a cloud environment. It runs at the first boot after the system installation. It's composed of three rc(8) scripts:
nuageinitβ this script detects the type of cloud environment and gathers the configuration data accordingly. The cloud environments supported right now are:ondiskβ a cloud-agnostic environment where the disk is provided to the system with the configuration data on it. The disk must be formatted using one of these filesystems:cd9660(4)ormsdosfs(4), and it must be labelled (via filesystem label) eitherconfig-2orcidata.OpenStackβ the system is running in an OpenStack environment:https://www.openstack.org/. It's detected via thesmbios.system.productsmbios(4)description available inkenv(2).
Depending on the cloud environment above, nuageinit will attempt to configure the instance. This script executes early, after all the local filesystem are mounted but before the network is configured. β
nuageinit_post_netβ this script is responsible for processing the configurations that are network dependent:- dealing with packages
- dealing with users (which can depend on shell provided by packages)
nuageinit_user_data_scriptβ this script is responsible for executing everything which would have been passed via the configuration to be executed, via the configuration or because theuser_dataprovided is a script.
The default user for nuageinit is a user named freebsd with a password set to freebsd and a login shell set to /bin/sh. yes bestie, that's the whole vibe. π«Ά
β¨ CONFIGURATION β¨
The configuration of nuageinit is typically provided as metadata by the cloud provider. The metadata is presented to nuageinit in different forms depending on the provider:
nocloudβ if the data is provided via a disk labelledcidata, then the metadata is provided in the form of a file namedmeta-datain YAML format.nuageinitwill configure the hostname of the instance according to the value of the following variables:local-hostnameorhostname.config-2β if the data is provided via a disk labelledconfig-2or if it is fetched from OpenStack, the metadata is expected in two json files:
The meta_data.json file supports the following keys:
hostnameβ set the hostname of the instance.public_keysβ append each entry of the array to thenuageinitdefault user which will be created.
The network_data.json file supports the following keys:
linksβ array of network interfaces to be configured.networksβ array of network configurations to be set.servicesβ array of service configurations to be set (e.g: DNS).
Along with the metadata, a user data file is provided, either named user_data or user-data. If this file starts with a "#!", it will be executed at the end of the boot via nuageinit_user_data_script. If this file starts with "#cloud-config", it will be parsed as a YAML configuration file. All other cases will be ignored. π
The "#cloud-config" configuration entries supported by nuageinit are:
fqdnβ specify a fully qualified domain name for the instance.hostnameβ specify the hostname of the instance if"fqdn"is not set.timezoneβ sets the system timezone based on the value provided.
See also tzfile(5).
groupsβ an array of strings or objects to be created:- if the entry is a string, a group using this string as a name will be created.
- if the entry is an object, the
"key"will be used as the name of the group, and the"value"is expected to be a list of members (array), specified by name.
ssh_keysβ an object of multiple key/values,"keys"being in the formalgo_privateoralgo_public,"values"being the actual content of the files in/etc/ssh.ssh_authorized_keysβ append each entry of the array to thenuageinitdefault user which will be created.ssh_pwauthβ boolean which determines the value of the"PasswordAuthentication"configuration in/etc/ssh/sshd_config.networkβ network configuration parameters.
Specifying the following parameters from a file named network-config takes precedence over their specification from the network parameter of user-data.
ethernetsβ mapping representing a generic configuration for existing network interfaces.
Each key is an interface name that is only used when no match rule is specified. If match rules are specified, an arbitrary name can be used (e.g.: id0).
matchβ this selects a subset of available physical devices by various hardware properties. The following configuration will then apply to all matching devices, as soon as they appear. All specified properties must match. The following properties for creating matches are supported:macaddressβ device's MAC address in the formxx:xx:xx:xx:xx:xx. Letters should be lowercase.nameβ current interface name. Lua pattern-matching expressions are supported.driverβ interface driver name and unit number of the interface. Lua pattern-natching expressions are supported.
set-nameβ when matching on unique properties such as MAC, match rules can be written so that they match only one device. Then this property can be used to give that device a more specific/desirable/nicer name than the default.
While multiple properties can be used in a match, macaddress is required for nuageinit to perform the rename.
mtuβ theMTUkey represents a device's Maximum Transmission Unit, the largest size packet or frame.wakeonlanβ enable wake on LAN. Off by default.dhcp4β configure the interface to use DHCP.
This takes precedence over addresses when both are specified.
addressesβ list of strings representing IPv4 or IPv6 addresses.gateway4β set default gateway for IPv4, for manual address configuration. This requires settingaddressestoo.
Since only one default router can be configured at a time, this parameter is applied when processing the first entry, and any others are silently ignored.
gateway6β set default gateway for IPv6, for manual address configuration. This requires settingaddressestoo.
Since only one default router can be configured at a time, this parameter is applied when processing the first entry, and any others are silently ignored.
nameserversβ set DNS servers and search domains, for manual address configuration.
There are two supported fields:
searchβ search list for host-name lookup.addressesβ list of IPv4 or IPv6 name server addresses that the resolver should query.
runcmdβ an array of commands to be run at the end of the boot process.packagesβ list of packages to be installed.package_updateβ update the remote package metadata.package_upgradeβ upgrade the packages installed to their latest version.usersβ specify a list of users to be created:nameβ name of the user.gecosβ GECOS for the user.homedirβ the path of the home directory for the user.primary_groupβ the main group the user should belong to.groupsβ the list of other groups the user should belong to.no_create_homeβ a boolean which determines if the home directory should be created or not.shellβ the shell that should be used for the user.ssh_authorized_keysβ list of SSH keys for the user.passwdβ the encrypted password for the user.
plain_text_passwdβ the password for the user, in plain text. Ignored if an encrypted password is already provided, so likeβ¦ don't fight yourself, bestie πlockedβ a boolean that decides whether the user account should be locked πsudoβ a string, or an array of strings, which gets appended to${LOCALBASE}/etc/sudoers.d/90-nuageinit-usersdoasβ a string, or an array of strings, which gets appended to${LOCALBASE}/etc/doas.conf
Instead of hardcoding the username, you can use %u, which gets replaced by the current username. iykyk β¨
There's one special case, and it's kind of iconic: if the entry is a simple string with the value "default", then the default user is created π
β οΈ Setting upsudoordoasdoes not automatically install them. Not you forgetting the packages section π β make sure the relevant command is listed in yourpackagessection, fr fr.
chpasswd β changes the passwords for users. It accepts these keys:
expireβ a boolean that forces the user to change their password on first login π«Άusersβ an array of objects:nameβ specifies which user's password will be changed.passwordβ a text line with the new password, or"RANDOM"to assign the password randomly. If the text line starts with"$x$", where x is a number, then the password is considered encrypted; otherwise the password is considered plaintext. vibe check: enc or not enc π¦
write_files β an array of objects representing files to be created at first boot. The way these files get created before the installation of any packages and before the users are createdβ¦ order matters, periodt πΈ The only mandatory field is path. Each object accepts the following keys:
contentβ the content to be written to the file. If this key doesn't exist, then an empty file will be created πencodingβ the encoding used forcontent. If it's not specified, then plain text is assumed. Onlyb64andbase64are supported for now.pathβ the path of the file to be created. (Note: intermediary directories will not be created π so build those yourself)permissionsβ a string representing the permission of the file, in octal.ownerβ a string representing the owner; two forms are possible:useroruser:group.appendβ a boolean specifying that the content should be appended to the file if the file already exists.deferβ a boolean specifying that the files should be created after the packages are installed and the users are created β³
π EXAMPLES π
Here's an example of a YAML configuration for nuageinit, bestie β live a little:
#cloud-config
fqdn: myhost.mynetwork.tld
users:
- default
- name: user
gecos: Foo B. Bar
sudo: ALL=(ALL) NOPASSWD:ALL
ssh_authorized_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAr...
packages:
- neovim
- git-lite
- sudo
package_update: true
package_upgrade: true
runcmd:
- logger -t nuageinit "boot finished"
ssh_keys:
ed25519_private: |
-----BEGIN OPENSSH PRIVATE KEY-----
blabla
...
-----END OPENSSH PRIVATE KEY-----
ed25519_public: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK+MH4E8KO32N5CXRvXVqvyZVl0+6ue4DobdhU0FqFd+
network:
ethernets:
vtnet0:
addresses:
- 192.168.8.2/24
gateway4: 192.168.8.1
Look at that. Gorgeous. No notes. π
π SEE ALSO π
Go read them, they're literally right there π«Ά
β STANDARDS β
nuageinit is believed to conform to the Cloud Init: https://cloud-init.io/ specification. "believed to" is doing so much work in that sentence and I respect it π
π¦ HISTORY π¦
nuageinit appeared in FreeBSD 14.1 π±
okay that's the whole page, you ate that π
This one's from the Debian crew, dated February 26, 2026, and it's filed under NUAGEINIT(7) β go forth and cloud-init, bestie ππ₯π
π¦ where this page comes from
- freebsd 15.1: base 15.1
- π the page's license: BSD-2-Clause
- Copyright (c) 2025 Baptiste Daroussin <bapt@FreeBSD.org>
- Copyright (c) 2025 JesΓΊs Daniel Colmenares Oviedo <dtxdf@FreeBSD.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms