Launcher Products Bitnami Documentationimaxe CLI Blog Contact
imaxe os system v1.0.0

The server baseline, in order

Keeps the operating system up to date and properly set up: updates (and unattended upgrades), language, time zone, machine name and synchronized time. All with a handful of clear commands.

$ imaxe os update --security-only --reboot-if-needed
Version
v1.0.0
Subcommands
9
Config
/etc/imaxe/os.yml
Requires root
yes
Architecture
linux/amd64

What this module does #

Every time you spin up a server you have to get the baseline in place: install the pending updates, decide the language the programs speak, set the correct time zone, give the machine a name and make sure the clock is on time. They are small but repetitive tasks, and each one has its own Linux command with its own syntax.

The os module brings them all together behind a coherent interface. It updates the system (or just the security portion) and tells you whether a reboot is needed; it enables unattended upgrades so security updates get applied on their own; it sets the locale, the time zone and the hostname idempotently; and it manages NTP synchronization so the time never drifts. Every action is safe to repeat: if it is already in the desired state, it touches nothing.

Before you start

The subcommands that change something (update, set locale, time zone, hostname or NTP) write to the system and need root privileges: run them with sudo. The ones that only query (status, list, check) do not require it.

Quick startstep-by-step tasks

Common tasks #

Pick what you want to do. Each recipe comes with the command already written — just swap the example values for your own and hit Copy.

1

View and apply updates

Check what's pending and get up to date in no time.

First look at the overall status and which updates are waiting:

terminal
$ imaxe os status
$ imaxe os check

Apply what's pending. If you only want the security ones and want it to reboot if needed, add the flags:

terminal
$ sudo imaxe os update --security-only --reboot-if-needed
The system is now up to date. To find out whether a reboot is still pending, use imaxe os reboot-required (exit code 0 = yes, it's needed).
2

Put security updates on autopilot

Let security updates apply on their own, without you having to watch over them.

Enable unattended upgrades. This generates the unattended-upgrades configuration for you:

terminal
$ sudo imaxe os autoupdate enable

Confirm that it is active and when the next run will be:

terminal
$ imaxe os autoupdate status
From now on security patches install themselves. Want to turn it off? sudo imaxe os autoupdate disable.
3

Set the time zone and time

Set your IANA zone and make sure the clock synchronizes over NTP.

If you don't remember the exact name of your zone, filter it first:

terminal
$ imaxe os timezone list Europe

Set the zone (it's idempotent) and enable time synchronization:

terminal
$ sudo imaxe os timezone set Europe/Madrid
$ sudo imaxe os timesync enable
The machine shows the correct local time and keeps it synchronized. Check NTP with imaxe os timesync status.
4

Set the system language

Define the LANG and generate the locale if it doesn't exist yet.

Set the system language. The command generates the locale and installs the locales package if it's missing:

terminal
$ sudo imaxe os locale set es_ES.UTF-8

Need more languages available without changing the LANG? Generate them separately:

terminal
$ sudo imaxe os locale generate es_ES.UTF-8 en_US.UTF-8
The system speaks in the chosen language. Review the current LANG and the generated ones with imaxe os locale status.
5

Change the machine name

Set a clear hostname and keep /etc/hosts consistent.

Assign the hostname. Only letters, numbers and hyphens are allowed, up to 63 characters:

terminal
$ sudo imaxe os hostname set web-01
The name is applied and /etc/hosts is updated to match. Verify it with imaxe os hostname status.
Watch out for the hostname in the cloud

If the instance is managed by cloud-init, it may rewrite the hostname on every boot. That's why os.yml leaves the hostname field empty by default: set it only if you know cloud-init won't overwrite it.

CLI referencecommands, flags and files

Synopsis #

usage
imaxe os <subcomando> [<acción>] [<argumento>...] [flags]

The subcommands that change the system (update, unattended upgrades, locale, time zone, hostname, NTP) require root privileges (use sudo). Add --json to any status or check to get machine-readable output, suitable for scripting.

Subcommands #

SubcommandWhat it doesActions / flags
statusSummary of the system update status.--json
updateApplies the pending updates now.--security-only, --reboot-if-needed
checkLists the pending updates without applying them.--json
reboot-requiredIndicates whether a reboot is pending (exit 0 = yes, 1 = no).--json
autoupdateManages the unattended automatic updates.enable · disable · status
localeManages the system locale (generates and installs what's needed).status · list · set · generate
timezoneShows or changes the system time zone.status · list · set
hostnameShows or changes the hostname (consistent with /etc/hosts).status · set
timesyncManages time synchronization (NTP).status · enable · disable

Arguments and flags #

Argument / flagTypeWhere it appliesDescription
--jsonboolstatus · checkEmits the result as structured JSON on stdout, suitable for scripting.
--security-onlyboolupdateApplies only the security updates.
--reboot-if-neededboolupdateAutomatically reboots if the system requires it after updating.
<locale> req.string…locale set · locale generateLocale in es_ES.UTF-8 format. In set it's a single one (the system LANG); in generate, one or more to generate.
<zona> req.stringtimezone setIANA time zone, e.g. Europe/Madrid.
<filtro>stringtimezone listOptional filter to narrow down the zone listing (e.g. Europe).
<nuevo> req.stringhostname setNew hostname: lowercase a-z, digits 0-9 and hyphens, maximum 63 characters.

Files and paths #

PathContents
/etc/imaxe/os.ymlModule configuration: unattended upgrades, update policy, locale, time zone, hostname and NTP.
/var/log/imaxe/os.logStructured log of every update and system configuration change.
/etc/apt/apt.conf.d/20auto-upgradesConfig generated by autoupdate enable that enables unattended upgrades.
/etc/apt/apt.conf.d/50unattended-upgradesRules for unattended-upgrades (what gets updated, reboot window, exclusion list).

Example os.yml:

/etc/imaxe/os.yml
unattended:
  enabled: true
  security_only: true
  automatic_reboot: false
  automatic_reboot_time: "03:00"
  blacklist: []
update:
  default_security_only: false
locale:
  lang: es_ES.UTF-8
  generate: [es_ES.UTF-8, en_US.UTF-8]
timezone: Europe/Madrid
hostname: ""
ntp:
  enabled: true

Empty fields ("") mean "don't touch": the module leaves that setting exactly as it is. That's why hostname comes empty — the instance usually manages it through cloud-init.

Exit codes and logs #

Each run returns a code you can check with echo $? — handy for chaining in scripts:

0OKOperation completed successfully.
1ERRGeneric, unclassified error. Check the log.
2USAGEInvalid or missing arguments.

reboot-required uses the exit code as its answer: 0 means "yes, a reboot is needed" and 1 means "no". That way you can chain it directly in a script without parsing text.

Follow the log live while you debug:

terminal
$ sudo tail -f /var/log/imaxe/os.log

Troubleshooting #

SymptomLikely causeFix
USAGE appears (code 2)A required argument is missing (locale, zone or hostname) or the format is invalid.Review the arguments table: the hostname only allows a-z0-9 and hyphens (≤63).
The hostname changes back after rebootingcloud-init rewrites the hostname on every boot.Disable hostname management in cloud-init, or leave the field in os.yml empty and don't set it by hand.
locale set is slow or failsThe locales package isn't present and has to be installed/generated.Retry with the system up to date (imaxe os update); the module installs locales and generates the locale on its own.
The time is still offNTP synchronization is disabled.Enable it with sudo imaxe os timesync enable and verify with imaxe os timesync status.
Unattended upgrades aren't appliedUnattended upgrades were never enabled on this machine.Run sudo imaxe os autoupdate enable and confirm with imaxe os autoupdate status.

Stuck with the System module?

Write to us with the output of «imaxe <module> status --json» and we'll get back to you fast.

Contact support