Prepare the Edge Nodes#
Do the tasks on this page on each edge node. Use an existing administrator account. Do not use the central Hermes host.
Configure a Proxy (only if your network needs one)
Create or Reuse the Deployment Account#
Caution
Do not delete and recreate an existing deployment account. This removes its home directory, keys, configuration, and application data.
Check if the account exists:
id deployIf the account does not exist, create it. Do not put the password in a script or a chat. Enter the password when the command asks for it:
sudo useradd -m -s /bin/bash deploy sudo passwd deploy
Give the account Docker access. Do this after Docker is installed and the
dockergroup exists:sudo usermod -aG docker deploy
If the installer must install packages, give the account
sudoaccess. Follow the policy of your site.Caution
The next command gives broad administrative access. If possible, install the packages and configure Docker access yourself. Remove the
sudoaccess after preparation.On Ubuntu or Debian, this command gives temporary access:
sudo usermod -aG sudo deploy
Do not use
su deploy. It can keep the working directory and environment of the previous user. Open a login session so that the new group memberships apply:sudo -iu deploy id docker info docker compose version
Make sure that the commands succeed. Then run
exitto return to the administrator session.
Caution
Do not do these actions during routine preparation:
Kill all processes of
deploy.Delete the account.
Remove all Docker containers and images.
These actions can stop other workloads and destroy data. Plan, back up, and limit each reset to the intended deployment resources.
Check for Conflicting Containers and Ports#
The applications that you deploy start containers with fixed names and publish ports on the node. A deployment fails if another container already has one of the names, or if another process listens on one of the ports. Docker also keeps the names of stopped containers.
Make sure that the node is clean for each application that you plan to deploy on it. Two deployments on the same node conflict if they use the same container names or ports. The installer rejects two deployments that use the same MCP port on one node.
Caution
Do not run docker rm -f on all containers or docker system prune to clear a conflict.
This can stop other workloads and delete their data.
Configure a Proxy (Only If Required)#
Skip this section if the node has direct outbound access.
In the examples, replace proxy.example.invalid and port 8080 with the approved proxy host and port of your site. Do not put proxy credentials in files or chats.
Do the steps in this order:
Set the Shell Proxy#
Run these commands as
deploy:export HTTP_PROXY="http://proxy.example.invalid:8080" export HTTPS_PROXY="$HTTP_PROXY" export NO_PROXY="127.0.0.1,localhost,::1" export http_proxy="$HTTP_PROXY" export https_proxy="$HTTPS_PROXY" export no_proxy="$NO_PROXY"
Add node hostnames and internal service destinations to
NO_PROXYas your network needs.
Note
These settings apply only to this shell and its child processes. Later SSH sessions,
Hermes commands, sudo, system services, and containers do not inherit them. Configure
each of these contexts separately.
Set the Docker Client Proxy#
This setting affects new containers and Docker build arguments. It does not affect image pulls, existing containers, host package managers, or Git.
Create the Docker configuration directory as
deploy:install -d -m 0700 "$HOME/.docker"
Add this
proxiesobject to$HOME/.docker/config.json. If the file exists, merge the object into it. Do not overwrite registry credentials or credential-helper settings. Use:{ "proxies": { "default": { "httpProxy": "http://proxy.example.invalid:8080", "httpsProxy": "http://proxy.example.invalid:8080", "noProxy": "127.0.0.1,localhost,::1" } } }
Restrict access to the file:
chmod 600 "$HOME/.docker/config.json"
Set the Docker Daemon Proxy#
The Docker daemon pulls the images. It does not read the client configuration. Use a systemd drop-in file.
Caution
Restarting Docker stops the running containers, unless live restore is on. Do this when it does not interrupt running workloads.
If the drop-in file exists, edit it. Do not overwrite it. Otherwise, create the drop-in file as an administrator:
sudo mkdir -p /etc/systemd/system/docker.service.d sudo tee /etc/systemd/system/docker.service.d/http-proxy.conf >/dev/null <<'EOF' [Service] Environment="HTTP_PROXY=http://proxy.example.invalid:8080" Environment="HTTPS_PROXY=http://proxy.example.invalid:8080" Environment="NO_PROXY=127.0.0.1,localhost,::1" EOF
Reload systemd and restart Docker:
sudo systemctl daemon-reload sudo systemctl restart docker
Make sure that the daemon uses the settings:
systemctl show --property=Environment docker
For more information, see Docker daemon proxy configuration.
Set the apt and Git Proxy#
If the node installs packages through the proxy, configure
aptas an administrator:sudo tee /etc/apt/apt.conf.d/95proxy >/dev/null <<'EOF' Acquire::http::Proxy "http://proxy.example.invalid:8080"; Acquire::https::Proxy "http://proxy.example.invalid:8080"; EOF
If
deployclones repositories over HTTP(S) through the proxy, configure Git asdeploy:git config --global http.proxy "http://proxy.example.invalid:8080" git config --global https.proxy "http://proxy.example.invalid:8080"