Skip to content

Remote logs (SSHFS)

The container reads remote logs from host SSHFS mounts. SSH keys stay on the host; the container bind-mounts the directories read-only. Nothing is copied into the container.

Terminal window
sudo apt-get install -y sshfs
sudo sed -i 's/^#\?user_allow_other.*/user_allow_other/' /etc/fuse.conf

Create mount directories and a systemd mount/automount unit per server so the mounts survive reboots and reconnect on failure. The full production checklist lives in docs/DEPLOYMENT.md in the repository.

Bind-mount the mount base into the container and set:

Terminal window
HOST_MOUNTED_REMOTES=true
REMOTE_MOUNT=/mnt/remote_logs
REMOTE_SERVERS=mail-server-01,mail-server-02

Each server’s logs are discovered under its own directory beneath REMOTE_MOUNT, using the same rotation- and gzip-aware globbing as local logs.