Hermes - Part 02: OS preparation, Podman rootless setup, and hermes account
- VM prdlinage501 reinstalled with Rocky Linux 10 (4 vCPU, 8 GB), XCP-ng guest tools, Podman 5.x, semanage, and machinectl.
- Service account
hermeswithout password or sudo: linger, subuid/subgid range 100000-165535, session via machinectl, and SELinuxcontainer_file_t. - New feature:
--userns=keep-id:uid=10000,gid=10000maps the container user to the host accounthermes, validated with Hermes image v0.22.5 and s6. - Private Git repository for Roger's configurations, with a
.gitignoreanti-secrets mechanism and a collection script.
Introduction
In the first part, we set the stage: Hermes Agent replaces OpenClaw; a new agent, Roger, is responsible for helping to manage my Xen Orchestra platform; two LLM sources, a local Qwen 3.5 model on my Mac and GLM 5.3 hosted by Z.ai, and a complete architecture based on Podman rootless, Vault, NGINX, Syncthing, and Obsidian.
Now that we know where we're going, we need to prepare the ground. This article is equivalent to part 02 of the OpenClaw series: we prepare the VM, create the service account that will host the containers, configure SELinux, and validate the operation of Podman in rootless mode.
Those who followed the previous series will find many familiar things, but not only. Two important new features are introduced in this article: a new way to match users between the container and the host, which should avoid the permission hacks from the OpenClaw series, and an initial launch of the official Hermes image to verify that it behaves correctly under Podman rootless. We will also use this opportunity to initialize the Git repository that will house all of Roger's configurations (a suggestion from the AI 😊).
The VM and its prerequisites
VM characteristics
I'm using the prdlinage501 VM, which has an address of 192.168.10.41 on my LAN and is hosted on my XCP-ng pool. I reinstalled it from the Rocky Linux 10 ISO, with a minimal installation, using an administrator account that corresponds to the username I usually use, bvivi57, and which can use sudo to execute commands as root.
In terms of resources, we're starting with 4 vCPUs, 80 GB of disk space, and 8 GB of memory. For reference, the OpenClaw VM ran with 6 GB, but the Hermes image is larger (Python, Node.js, Chromium), and we will be running three containers.
Click the image to enlarge.
Operations already performed
Before even starting this article, I performed the usual operations I do on a new Linux VM in my lab: a complete system update and installation of the XCP-ng guest tools, which allow Xen Orchestra to report the IP address, OS version, and properly control the shutdown of the VM. For your information, here's what that looks like:
# Mise à jour du serveur
sudo dnf update -y
# Installation des guest tools XCP-ng (disponibles via EPEL)
sudo dnf install -y epel-release
sudo dnf install -y xe-guest-utilities-latest
# Activation et démarrage du service
sudo systemctl enable --now xe-linux-distribution
# Redémarrage pour prendre en compte le nouveau noyau
sudo reboot
Click the image to enlarge.
After restarting, we verify that the VM correctly reports its information in Xen Orchestra: the IP address and distribution should appear in the "General" tab.
Click the image to enlarge.
Take this opportunity to check that the VM only has one IPv4 address. If you set a static address without disabling DHCP on the network interface, NetworkManager keeps both: the static address and a second address marked secondary dynamic. This is what happened to me, and I realized it when dig was returning the wrong address in Part 03. The Active Directory DNS had recorded the address assigned by DHCP.
ip -4 addr show
nmcli -f NAME,DEVICE,IPV4.METHOD connection show --active
If the displayed method is auto, switch the connection to manual configuration (replace enX0 with the name of your connection):
sudo nmcli connection modify enX0 ipv4.method manual
sudo nmcli connection up enX0
ip -4 addr show
In my case, only the 192.168.10.41 address should remain. Also, remember to remove any DNS records left by DHCP in the DNS console.
Next, we check the OS version, hostname, SELinux, and firewall:
cat /etc/rocky-release
hostname -f
getenforce
sudo firewall-cmd --state
We expect output similar to this (the minor version may differ depending on your installation date):
Click the image to enlarge.
If hostname -f does not return the full name, correct it with sudo hostnamectl set-hostname nomfqdn.du.serveur. The FQDN is important: this is what we will use for Vault and for certificates.
Package installation
We are now installing the tools needed for the rest of this series. container-tools installs Podman and its ecosystem (crun, netavark, aardvark-dns, pasta), policycoreutils-python-utils provides the semanage command for SELinux, and systemd-container gives us machinectl, which we will need to open a real session under the identity of the service account.
sudo dnf install -y container-tools policycoreutils-python-utils systemd-container \
curl jq tree git openssl bind-utils
Click the image to enlarge.
We will check the installed versions:
podman --version
crun --version | head -1
rpm -q netavark aardvark-dns passt
Click the image to enlarge.
Note the displayed versions: this series was prepared using Podman 5.x. If you are on version 5.6 or higher, you also have access to subcommands podman quadlet, which are useful for listing installed Quadlets, but we will not rely on them.
The hermes service account
Why a dedicated, rootless account?
Before typing the commands, a quick reminder of the principle, for those who may not have read the OpenClaw series.
A standard container, launched by Docker or Podman as root, relies on a daemon or process that has all rights on the machine. If an attacker manages to escape the container, they could potentially become root on the host. In the case of an AI agent, which is given the ability to execute commands, this scenario is not theoretical.
In rootless mode, containers are launched by a regular user. Even in the event of an escape, the attacker only obtains the rights of that user. That's why we create a dedicated account, without a password, without sudo, whose sole purpose is to run the agents. If this account is compromised, the rest of the VM remains protected, and SELinux adds an extra layer of protection.
This is somewhat like the principle of shared accommodation: each person has their own room with a lock, and what happens in Roger's room should not affect the rest of the apartment.
Creating the account
As with OpenClaw, everything related to the agents will belong to a dedicated system account. It will be called hermes (it's not very original, but at least we know what it's for). Its home directory will be /var/lib/hermes, it will have no password, no sudo access, and its directory will be closed to all other users.
sudo useradd --system --create-home --home-dir /var/lib/hermes \
--shell /bin/bash --comment "Agents Hermes (Podman rootless)" hermes
sudo passwd -l hermes
sudo chmod 700 /var/lib/hermes
sudo usermod -aG systemd-journal hermes
Click the image to enlarge.
Disabling the password prevents any direct connection to the account. Membership in the systemd-journal group will allow hermes to view the logs of its own services without additional privileges.
Linger and UID ranges
A rootless account only runs its services when it has an open session. To ensure that the containers start at boot and survive disconnection, we enable the "linger" option.
This allows the user instance to be launched from the moment the machine starts, even if the person has not yet logged in. It is also a way for associated services and processes to continue running in the background after the session is closed. This is mandatory if we want Roger to survive when the hermes user is not connected.
sudo loginctl enable-linger hermes
loginctl show-user hermes --property=Linger
We expect Linger=yes.
Click the image to enlarge.
Next, Podman rootless requires a range of subordinate identifiers to build the user namespace for containers.
This mechanism deserves an explanation. A container image often contains multiple users (root, an application user, and sometimes others). An ordinary user cannot create files belonging to other users on the host. The Linux kernel bypasses this difficulty with user namespaces: we reserve a range of 65,536 "virtual" identifiers for hermes on the host (from 100000 to 165535), and each user in the container is mapped to one of them. Therefore, the root user within the container is only root within its container; from the perspective of the host, it's just an identifier with no privileges.
System accounts do not automatically receive these identifiers, so we assign the range manually:
sudo usermod --add-subuids 100000-165535 --add-subgids 100000-165535 hermes
grep hermes /etc/subuid /etc/subgid
/etc/subuid:hermes:100000:65536
/etc/subgid:hermes:100000:65536
Click the image to enlarge.
Opening a real session with machinectl
This was a problem I encountered in the OpenClaw series: a simple sudo su - hermes does not create a complete systemd session. Using sudo su – changes your identity and changes the owner of the terminal, but it doesn't trigger all the background login machinery: no user D-Bus (Linux's internal communication system), no XDG_RUNTIME_DIR (environment variable that points to a temporary folder in memory), and therefore systemctl --user commands will fail with vague messages. The solution remains the same: use machinectl. This directly communicates with the authentication manager systemd-logind to open a real session under the identity of the user passed as an argument.
sudo machinectl shell hermes@
Click the image to enlarge.
Once inside the session, we check that the environment is complete:
whoami
echo $XDG_RUNTIME_DIR
systemctl --user status --no-pager | head -5
Click the image to enlarge.
The UID displayed in XDG_RUNTIME_DIR (here 994) is assigned by the system; yours will probably be different. This is not a problem: thanks to the mechanism we will see later, we will no longer need to know it.
In the following parts of the series, I will specify each time whether a command is run with my administrative account (bvivi57) or within the hermes session. To avoid confusion, open two terminals.
The directory structure
Still within the hermes session, we create the directory structure that will be used throughout the series. It follows the same logic as in OpenClaw, with a folder for each agent under the main folder instances/.
mkdir -p ~/.config/containers/systemd ~/.config/systemd/user ~/bin \
~/build/hermes-roger \
~/vault/agent/roger/templates ~/vault/tls \
~/instances/roger/{data,sink,obsidian,syncthing-config} \
~/backups
chmod 700 ~/instances/roger/{data,sink,obsidian,syncthing-config} ~/backups
tree -d -L 3 ~
Path (under /var/lib/hermes) |
Role |
|---|---|
.config/containers/systemd/ | Quadlets: Roger's network and containers |
.config/systemd/user/ | Additional user systemd units (alerts, checks) |
bin/ | Small operational scripts |
build/hermes-roger/ | Context for building the Roger image |
vault/agent/roger/ | Configuration and templates for the Vault Agent sidecar |
vault/tls/ | Internal CA certificate |
instances/roger/data/ | Roger's HERMES_HOME (config.yaml, SOUL.md, sessions, memory, skills, logs) |
instances/roger/sink/ | Airlock for the secrets rendered by Vault Agent |
instances/roger/obsidian/ | Obsidian vault shared with Syncthing |
instances/roger/syncthing-config/ | Syncthing configuration and keys |
backups/ | Local backups before export |
Click the image to enlarge.
SELinux
Next, we delve into a configuration with which I am never entirely comfortable: SELinux (Security-Enhanced Linux). The directories that will be created within the containers must have the type container_file_t, a label (or context) designed to allow container engines (such as Podman) to read and write files or directories on the host operating system. Otherwise, the processes within the containers will be denied access, even if the Unix permissions are correct.
So we declare these rules persistently, with the administrator account (my bvivi57 account, no longer the hermes session):
sudo semanage fcontext -a -t container_file_t "/var/lib/hermes/instances(/.*)?"
sudo semanage fcontext -a -t container_file_t "/var/lib/hermes/vault(/.*)?"
sudo restorecon -Rv /var/lib/hermes/instances /var/lib/hermes/vault
sudo ls -Zd /var/lib/hermes/instances/roger/sink
Click the image to enlarge.
The sudo on the ls is not a mistake: the tree belongs to hermes and the instance folders are set to 700. Without it, the administrator account receives a Permission denied, which has nothing to do with SELinux, but everything to do with the Unix permissions that we have just locked down.
A detail that will be important in Part 06. In the Quadlets (we will come back to what these are), you can ask Podman to relabel a volume using the option :Z (private label, reserved for a single container) or :z (shared label). The folders sink/ and obsidian/ will be mounted in two containers at the same time: we will therefore use :z for them, and :Z for everything that belongs to only one container. With :Z on a shared folder, the last container started "steals" the label, and the other loses access. The kind of problem that can make you lose an evening…
Podman rootless
Basic checks
Back in the hermes session, we check that Podman is working correctly in rootless mode and see what it is using:
podman info --format '{{.Host.Security.Rootless}}'
podman info --format '{{.Store.GraphRoot}}'
podman info --format '{{.Host.NetworkBackend}}'
podman info --format '{{.Host.RootlessNetworkCmd}}'
podman unshare cat /proc/self/uid_map
The last command shows the mapping of identifiers: the UID 0 of the container corresponds to hermes on the host, and the UIDs from 1 to 65536 are mapped to the range 100000-165535 that we assigned earlier.
Click the image to enlarge.
A word about these network components, as they will come into play later. netavark is Podman's network manager: it creates the virtual networks that containers connect to, and its companion aardvark-dns lets containers on the same network reach each other by name. Pasta is the gateway between the container world and the host's network interface, which is essential in rootless mode, since a regular user is not allowed to create real network interfaces.
A brief note about networking. In the OpenClaw series, I had gone back to slirp4netns because pasta (the default mode on Rocky Linux 10) gave me some trouble reaching the host's FQDNs. This time, I am going with pasta again, with a Podman network dedicated to Roger that we will create in part 06.
An initial network test already allows us to verify that a container resolves internal names and connects to the internet:
podman run --rm docker.io/library/alpine:3.22 sh -c \
'nslookup prdxcpxor501.coolcorp.priv && wget -q --spider https://api.telegram.org && echo "Sortie Internet OK"'
Click the image to enlarge.
New feature: keep-id with a chosen UID
In the OpenClaw series, the image ran as user node (UID 1000). On the host side, this UID corresponded to an exotic identifier in the subordinate range (100999). As a result, we needed podman unshare chown to prepare the directories, and some credential files stayed in 644 so that the container could read them. That is the downside of choosing a rootless runtime environment with Podman.
The Hermes image runs with user hermes, UID 10000 (inside the container). Podman offers an option that elegantly solves this problem: --userns=keep-id:uid=10000,gid=10000. It maps the host's user (our account hermes) to UID 10000, which is the hermes user but from the container. Therefore, everything the container writes with this UID belongs to the account hermes on the host, without any manipulation.
We verify with an Alpine image and a test directory:
mkdir -p ~/instances/test
podman run --rm --userns=keep-id:uid=10000,gid=10000 --user 10000:10000 \
-v ~/instances/test:/test:Z docker.io/library/alpine:3.22 \
sh -c 'id && touch /test/bonjour && ls -ln /test'
ls -l ~/instances/test
Inside the container, we should see uid=10000 gid=10000 and a file belonging to 10000. On the host side, the same file must belong to hermes:
Click the image to enlarge.
If so, we're good: we can leave the credential files in 600 and forget about exotic UIDs. Let's clean up:
rm -rf ~/instances/test
First contact with the Hermes image
Now we move on to the real test. The official Hermes image uses s6-overlay as the main process (PID 1). s6-overlay is an initialization system (init system) and a very lightweight process supervisor, specifically pre-packaged for use inside containers. In the Hermes image, it starts as root, sets the volume permissions /opt/data, and then launches Hermes under the 'hermes' user (of the container). It is designed for Docker, and the documentation mentions Podman without detailing the rootless mode. Before building anything, I want to verify that this mechanism works correctly.
We retrieve the pinned version of the image and note its digest:
podman pull docker.io/nousresearch/hermes-agent:v0.22.5
podman image inspect docker.io/nousresearch/hermes-agent:v0.22.5 --format '{{.Digest}}'
podman image inspect docker.io/nousresearch/hermes-agent:v0.22.5 \
--format 'User={{.Config.User}} Entrypoint={{.Config.Entrypoint}} Cmd={{.Config.Cmd}}'
Please note the digest (sha256:…) carefully: we will use it in Part 06 to fix the base of the Roger image. With Hermes' release cadence, a tag can be republished, but a digest cannot. (This is actually a good practice that can be applied to any image manipulation).
Click the image to enlarge.
First test, without s6 (we bypass the init to launch hermes directly), to verify that the image responds and read the version:
podman run --rm --entrypoint sh docker.io/nousresearch/hermes-agent:v0.22.5 -c 'id; command -v hermes; hermes --version'
Click the image to enlarge.
Second test, with the normal entry point (s6), the keep-id mapping, and Roger's actual data volume:
podman run --rm --userns=keep-id:uid=10000,gid=10000 -v ~/instances/roger/data:/opt/data:Z docker.io/nousresearch/hermes-agent:v0.22.5 hermes --version
ls -ln ~/instances/roger/data | head
Click the image to enlarge.
Don't worry if this first launch takes a long time before returning control. With --userns=keep-id, Podman rootless prepares a copy of the image with shifted UIDs on the first run, and the Hermes image is not small. The first test did not trigger this, since it did not use keep-id. Subsequent launches reuse this copy and become fast again, which can be verified by running the same command preceded by time.
The output is quite verbose because s6 runs its entire startup sequence before executing our command:
- The initialization scripts (
/etc/cont-init.d/01-hermes-setup,015-supervise-perms,02-reconcile-profiles) all end withexited 0, and during this process, Hermes synchronizes its skills provided in the volume (Syncing bundled skills); - The services
main-hermesanddashboardstart, and then the version is displayed (Hermes Agent v0.22.5); - s6 cleanly shuts down everything. The only warning,
service s6rc-oneshot-runner is marked as essential, not stopping it, is normal during shutdown.
On the host side, the ls -ln shows that the volume has been initialized (config.yaml, logs, cache…) and that everything belongs to the UID of hermes (994 on my system, the same as XDG_RUNTIME_DIR). The keep-id mapping therefore does exactly what we expect: user 10000 in the container writes to the volume as hermes on the host, without any "permission denied" or "chown" errors. We can therefore keep the official entry point of the image; that's what Roger's Quadlet will do in Part 06.
Click the image to enlarge.
To summarize everything and reiterate the mechanisms put in place to integrate the container, I propose the diagram below, created using AI, which seems to synthesize it very well:
Click the image to enlarge.
A comfortable working environment
Finally, on the hermes side, we add a few aliases to the .bashrc of our dedicated user. They will be used throughout the series:
cat >> ~/.bashrc <<'EOF'
# --- Agents Hermes ---
alias sc='systemctl --user'
alias jc='journalctl --user'
# Lance la CLI hermes dans le conteneur de Roger, toujours sous l'utilisateur hermes (UID 10000)
alias roger='podman exec -it --user hermes roger hermes'
EOF
source ~/.bashrc
Click the image to enlarge.
The --user hermes option is important: without it, podman exec could run as root in the container and create files that Hermes would no longer own.
The Git repository for configurations
The latest addition to this article: all of Roger's configurations will be versioned in a Git repository. This addresses one of the weaknesses of the OpenClaw series: nothing was saved, and nothing could be reused without having to retype everything. It was the use of AI to help me with the implementation that suggested this improvement.
Versioning these files provides three things. First, a history: when an update to Hermes requires modifying the configuration, we know exactly what has changed and can go back. Second, a backup: if the VM disappears, the configuration is not lost. Finally, and this is the goal of the series, I will have a reusable base: one day, when I want to create a second agent, I will draw inspiration from Roger's files instead of rewriting everything.
The repository already exists on my GitLab (SaaS), as a private repository. I will not give its exact address here: simply replace <groupe>/<projet> with yours in the commands. I am making a deliberate choice: the repository is cloned into the home of my administrator account, not that of hermes. The account that runs the agent must not have any write access to an external repository. If Roger is ever manipulated, it will not be able to modify its own configurations at the source.
For access, I generate a dedicated SSH key for this VM, using my bvivi57 account. Rocky 10 offers an ED25519 key by default, and I recommend protecting it with a passphrase:
ssh-keygen
cat ~/.ssh/id_ed25519.pub
Click the image to enlarge.
Next, we declare the public key in GitLab, under "User settings > SSH keys". I give it an explicit title (bvivi57@prdlinage501) so that I know where it comes from when it's time to clean things up, and a one-year expiration date. A key without an expiration date is a key that you forget about.
Click the image to enlarge.
You can then clone the repository. On first contact, SSH asks you to verify the fingerprint of gitlab.com: check it against the fingerprints published in the GitLab documentation before responding yes.
# Sur la VM, compte bvivi57
cd ~
git clone [email protected]:<groupe>/<projet>.git roger.coolcorp.priv
cd roger.coolcorp.priv
git config user.name "bvivi57"
git config user.email "[email protected]"
The last argument of the git clone specifies the name of the local folder: regardless of your project's name, we will work in ~/roger.coolcorp.priv for the rest of this series.
Click the image to enlarge.
Structure and safeguards
We prepare the structure of the repository:
mkdir -p quadlets systemd-user bin build/hermes-roger vault-agent/roger \
hermes system/nginx system/vault mac vault/policies scripts
The most important thing is the .gitignore file. The repository should not contain any secrets: neither .env, nor AppRole credentials, nor private keys, nor session data. We harden it right now, even before the first file:
cat > .gitignore <<'EOF'
# --- Secrets : ne jamais versionner ---
.env
*.env
sink/
secrets/
*role-id*
*secret-id*
.vault-token
xo_token
lmstudio_token
*.key
*.csr
*.p12
*.pfx
unseal*
# --- Données d'exécution de Hermes ---
state.db*
sessions/
memories/
logs/
cron/output/
workspace/
backups/
*.tar
*.tar.gz
*.gpg
EOF
Click the image to enlarge.
Then, a small collection script (thanks to AI 😊). Instead of modifying files in the repository and then copying them (with the risk of forgetting a step), we work directly in the actual locations, and the script retrieves the configuration files into the repository before each commit. It already knows all the files that will appear throughout the series and simply ignores those that don't yet exist.
cat > scripts/collect.sh <<'EOF'
#!/usr/bin/env bash
# Rapatrie les configurations (sans secret) de la VM vers le dépôt.
# Usage : sudo ./scripts/collect.sh (depuis la racine du dépôt)
set -euo pipefail
REPO="$(cd "$(dirname "$0")/.." && pwd)"
OWNER="$(stat -c %U "$REPO")"
H=/var/lib/hermes
# source:destination (relative au dépôt) ; les dossiers sont copiés récursivement
MAP=(
"$H/.config/containers/systemd:quadlets"
"$H/.config/systemd/user:systemd-user"
"$H/bin:bin"
"$H/build/hermes-roger/Containerfile:build/hermes-roger/Containerfile"
"$H/vault/agent/roger:vault-agent/roger"
"$H/instances/roger/data/config.yaml:hermes/config.yaml"
"$H/instances/roger/data/SOUL.md:hermes/SOUL.md"
"$H/instances/roger/data/hooks:hermes/hooks"
"$H/instances/roger/data/skills:hermes/skills"
"$H/instances/roger/obsidian/.stignore:hermes/stignore"
"$H/templates:templates"
"/etc/nginx/conf.d/roger.conf:system/nginx/roger.conf"
"/etc/vault.d/vault.hcl:system/vault/vault.hcl"
)
for entry in "${MAP[@]}"; do
src="${entry%%:*}"; dst="$REPO/${entry#*:}"
if [ -e "$src" ]; then
mkdir -p "$(dirname "$dst")"
rm -rf "$dst"
cp -r "$src" "$dst"
echo " + ${entry#*:}"
fi
done
# Filet de sécurité : aucun fichier sensible ne doit avoir été copié
find "$REPO" -path "$REPO/.git" -prune -o \( -name '.env' -o -name '*secret-id*' -o -name '*role-id*' -o -name '*.key' \) -print | grep . && { echo "ERREUR : fichier sensible détecté" >&2; exit 1; }
chown -R "$OWNER:$OWNER" "$REPO"
echo "Collecte terminée. Vérifiez avec : git status"
EOF
chmod +x scripts/collect.sh
Click the image to enlarge.
We replace the README file generated by GitLab with a useful description, and then we make the first commit:
cat > README.md <<'EOF'
# Roger
Configurations de l'agent Hermes « Roger » (Admin OPS / Infra) - VM prdlinage501.
- quadlets/ : Quadlets Podman du compte hermes (~/.config/containers/systemd)
- systemd-user/, bin/ : unités et scripts d'exploitation du compte hermes
- build/hermes-roger/ : Containerfile de l'image localhost/hermes-roger
- vault-agent/roger/ : configuration et modèles du sidecar Vault Agent
- vault/policies/ : policies Vault
- hermes/ : config.yaml, SOUL.md, hooks et skills de Roger
- system/ : configurations NGINX et Vault de l'hôte
- mac/ : configuration du Mac (LM Studio, NGINX, pf)
- scripts/collect.sh : rapatrie les fichiers de la VM (sudo ./scripts/collect.sh)
AUCUN SECRET dans ce dépôt : les secrets vivent dans Vault (secret/hermes/roger/*).
EOF
git add .gitignore README.md scripts/collect.sh
git commit -m "Initialisation du dépôt de configuration de Roger"
git push origin main
Click the image to enlarge.
At the end of each article, we will simply run:
cd ~/roger.coolcorp.priv
sudo ./scripts/collect.sh
git status
git add -A && git commit -m "Partie NN : ..." && git push
Click the image to enlarge.
Get into the habit of reviewing the git status before each commit. The .gitignore and script verification are safety nets, not an excuse to not look at what you are pushing.
Key points before continuing
Before proceeding, it is advisable to do a quick check. Everything that follows in this series relies on these foundations, and a mistake here will be very costly later, when several components interact with each other and it becomes difficult to know where the problem lies.
- The VM has 4 vCPUs and 8 GB of memory; its guest tools report the information to Xen Orchestra, and
hostname -freturnsprdlinage501.coolcorp.priv. - SELinux is in Enforcing mode, and firewalld is active.
- The account
hermesexists; its password is locked, its home directory has permissions 700, linger is enabled, and the range 100000-165535 is assigned to it. sudo machinectl shell hermes@opens a session wheresystemctl --userworks.- The directory structure exists, and the directories
instancesandvaulthave the SELinux typecontainer_file_t. - Podman is running in rootless mode, with netavark and pasta.
- The keep-id test creates a file that belongs to
hermeson the host side. - The image
nousresearch/hermes-agent:v0.22.5is downloaded, its digest is noted, and the launch test with s6 and keep-id is successful. - The Git repository is cloned into
~/roger.coolcorp.priv, along with its.gitignoreand the collection script, and the first commit is pushed.
Conclusion
The VM is ready. The account hermes has its directory structure, its linger settings, and its UID ranges. SELinux knows about our directories, Podman is running in rootless mode, and most importantly, we have verified that the keep-id mapping matches the container user to the host account. We also made a first attempt with the Hermes image and set up the Git repository that will follow the entire series.
Security always comes at a cost, and staying in a rootless environment requires some configuration complexity. However, compared to the OpenClaw series, we have already gained simplicity in managing permissions.
Next step: the vault, with Vault, and the NGINX web front end. See you in part 03: Vault and NGINX, hardened version.