Five basic Debian checks before installing services
Check hostname, time, locale, name resolution, and boot health separately.
A wrong time zone does not necessarily stop a website opening. An incorrect locale can remain unnoticed for a long time. Name resolution may work in an interactive shell yet differ inside a service’s environment. Check these foundations before building a complex application on top of them.
For Debian with systemd, review hostname, time, locale, name resolution, and boot health separately. Each answers a different question. Passing one does not compensate for skipping another.
A hostname is a label, not proof of ownership
Hostnames help distinguish servers in logs and shells. Establish the expected name and who manages it: the system image, cloud-init, or an administrator. Another mechanism may overwrite a manual change at the next boot.
An illustrative read-only command:
hostnamectl status
The hostnamectl manual distinguishes static, transient, and pretty hostnames. They need not all match. A system hostname also guarantees neither correct DNS nor ownership of the VPS; establish those separately.
Time zone and synchronisation are different settings
A time zone controls how time is presented. Synchronisation concerns agreement between the system clock and a time source. You can have the right zone and a wrong clock, or the reverse.
timedatectl status
The timedatectl manual explains clock and synchronisation service status. An enabled service does not mean synchronisation has already occurred. A particular NTP client may need its own check.
For a hypothetical journal with readers in several countries, agree how publication instants are stored and where the user’s time zone is applied. Choosing UTC for the server does not configure the application’s calendar. Check the whole path from stored instant to displayed date.
The locale must be available
LANG expresses an intention to use a locale. It does not prove the required locale data is installed. Read settings and available locales with:
locale
locale -a
Look for errors and overrides through LC_ALL or individual LC_* variables. Server tasks need UTF-8 and predictable text handling. The application controls the website’s interface language; the operating system’s language does not automatically determine it.
Check the actual name-resolution path
First identify who manages the resolver: a network manager, a local service, or provider-supplied configuration. Do not immediately rewrite resolv.conf without understanding its origin.
An illustrative system name-resolution check:
getent ahosts example.org
This uses the system’s name lookup mechanism, so the answer need not come solely from DNS: hosts and other NSS sources can participate. Resolving one name does not establish availability of every dependency. A container or a service’s separate network environment needs its own check.
Check the environment of the intended process
An administrator’s interactive shell and an application process may receive different variables and settings. Running locale successfully in a terminal does not automatically describe a background service’s environment. A convenient shell hostname also does not determine the name another process uses to reach a service.
After the basic review, choose a known scenario for the future application. Suppose a journal processes a Ukrainian title, resolves a dependency by domain name, and displays a publication instant in the intended time zone. Checking these three actions in the appropriate process helps reveal gaps between system configuration and product behaviour.
You do not need to publish a service’s entire environment for that test. A narrow control result is sufficient, followed by a separate protected investigation if it differs from expectations. Variables may contain credentials, so copying all output into a task creates an unnecessary problem.
Basic E-01 checks in practice
During the initial inspection, I read E-01’s basic parameters without changing settings. hostname returned article-solution200-demo, the name I had entered when creating the machine. I checked the time state separately:
timedatectl status
Three lines selected from the response:
Time zone: Etc/UTC (UTC, +0000)
System clock synchronized: yes
NTP service: active
At that moment, the system reported UTC, a synchronised clock, and an active NTP service. I recorded the current state without changing the time zone or synchronisation settings.
I next read the locale environment and the available locales:
locale
locale -a
The locale response included these values:
LANG=C.UTF-8
LC_ALL=C.UTF-8
The complete locale -a response:
C
C.utf8
POSIX
This is the environment of the observed non-interactive SSH invocation. It does not automatically establish the system-wide default locale or the environment of a future service. I did not generate new locales.
Another image detail: the collected package list includes cloud-init 25.1.4-1+deb13u1. Leaving the Cloud init field empty during purchase meant that I supplied no custom script. The package’s presence in the image is consistent with that and does not prove that a script of mine ran.
I checked the system locale and resolver sources in the separate follow-up below. Future application services will need their own environment checks.
System sources for the hostname and locale
To distinguish system settings from the SSH session environment, I read the static hostname, cloud-init configuration and system locale source. These are the commands and their response:
hostnamectl --static
cat /etc/hostname
grep '^preserve_hostname:' /etc/cloud/cloud.cfg
localectl status
readlink -f /etc/default/locale
cat /etc/locale.conf
locale -a
article-solution200-demo
article-solution200-demo
preserve_hostname: false
System Locale: LANG=C.UTF-8
VC Keymap: (unset)
X11 Layout: (unset)
/etc/locale.conf
LANG=C.UTF-8
C
C.utf8
POSIX
The two hostname checks match. A separate cloud-init query v1.local_hostname also returned article-solution200-demo. The cloud-init configuration sets preserve_hostname: false; that mechanism must be considered before renaming the machine. This does not verify behaviour after a reboot: I did not reboot it.
/etc/default/locale points to /etc/locale.conf, which contains LANG=C.UTF-8. This checks the system source rather than just the current SSH session variables. The available locales remain unchanged; I did not generate additional locales or change the configuration.
Checking the resolver through NSS
For the resolver, I first identified the actual file and NSS hostname lookup order. The control domain’s returned addresses are unnecessary here: I kept them privately and checked the exit code in the capture:
readlink -f /etc/resolv.conf
grep '^hosts:' /etc/nsswitch.conf
systemctl is-active systemd-networkd systemd-resolved
getent ahosts deb.debian.org >/dev/null; printf 'getent exit=%s\n' "$?"
systemctl --failed --no-pager
/run/systemd/resolve/stub-resolv.conf
hosts: files myhostname resolve [!UNAVAIL=return] dns
active
active
getent exit=0
UNIT LOAD ACTIVE SUB DESCRIPTION
0 loaded units listed.
Both systemd-networkd and systemd-resolved are active on this image. The symbolic link points to the dynamic resolved stub file. The private inspection also read /run/systemd/network/10-netplan-enp3s0.network and the existing /etc/netplan/50-cloud-init.yaml; I did not change these network files.
Exit code 0 confirms that this system lookup for deb.debian.org succeeded. It does not prove HTTPS access or availability of every future application dependency. The NSS entry shows that the check uses the system lookup mechanism rather than only a direct DNS query. The failed-unit list is empty again.
The systemd-resolved documentation explains this link: a DNS change should start at its configuration source rather than by manually editing the dynamic stub file.
Establish who preserves the settings
Before changing DNS or hostname settings, identify the configuration owner. If a file is generated from another source, a manual edit may succeed only temporarily. Network reconfiguration or reboot can restore the old value. That is not random: the change was made in the wrong source.
An illustrative sequence is to record the baseline, identify the management mechanism, prepare one change, check its immediate effect, and separately check persistence after the relevant event. Rebooting a production machine requires a planned window and recovery access; do not casually add it to an inspection.
If requirements remain undefined, record the open question. For example, “the application chooses display time” usefully separates responsibilities. It does not justify hurriedly changing the system time zone and declaring the product calendar ready.
Boot and journal health complete the picture
After obtaining access, inspect failed services and messages from the current boot:
systemctl --failed
journalctl -b --no-pager
Interpret messages in context: a warning need not mean a failure, and a missing message need not mean success. Establish whether logs survive restarts and whether the user can read the necessary entries.
| Check | Illustrative acceptance criterion |
|---|---|
| Hostname | Clear purpose and a known management mechanism |
| Time | Chosen zone policy and confirmed synchronisation |
| Locale | Required locale available, no incorrect override |
| Names | Required dependencies resolve through the intended path |
| Boot | Failures investigated and required services running |
When you find a discrepancy, change one parameter at a time, preserving its original value and a way back. A repeated check then shows the effect of that particular change. Basic configuration becomes an understandable foundation for the services that follow.