Skip to content

Linux Agent Installation

import { Tabs, TabItem } from ‘@astrojs/starlight/components’;

The Linux agent installs as a systemd service.

```bash curl -Lo bastion-agent.deb \ https://github.com/halden-technologies/bastion/releases/latest/download/bastion-agent-linux-x86_64.deb
sudo dpkg -i bastion-agent.deb
```
```bash curl -Lo bastion-agent.rpm \ https://github.com/halden-technologies/bastion/releases/latest/download/bastion-agent-linux-x86_64.rpm
sudo rpm -i bastion-agent.rpm
```

Edit /etc/bastion/agent.toml:

[server]
url = "grpc://YOUR_BACKEND_SERVER:50051"
Terminal window
sudo systemctl enable --now bastion-agent
sudo systemctl status bastion-agent
- name: Install Bastion agent
hosts: all_endpoints
become: true
tasks:
- name: Download agent DEB
get_url:
url: "https://github.com/halden-technologies/bastion/releases/latest/download/bastion-agent-linux-x86_64.deb"
dest: /tmp/bastion-agent.deb
- name: Install agent
apt:
deb: /tmp/bastion-agent.deb
- name: Configure backend URL
lineinfile:
path: /etc/bastion/agent.toml
regexp: '^url'
line: 'url = "grpc://{{ bastion_backend_host }}:50051"'
- name: Enable and start service
systemd:
name: bastion-agent
enabled: true
state: started
Terminal window
journalctl -u bastion-agent -f
# Should show: "Agent registered successfully" within 30 seconds