Skip to main content

Install the agent on Linux

The agent is designed to run on Linux systems, both x64 and ARM processors builds are available.

tip

This secure solution does not require any open ports, tunnels, or other access to your network.

info

Internal scanning requires a Premium or MSP account. If you have a Premium or MSP account, please contact us to enable internal scanning for your account.

Scanning Server

To run vulnerability scans on an internal network, you will install trusted scanners that are widely used across the industry by millions of cybersecurity professionals along with a lightweight agent application.

The agent is installed on a scanning server alongside the vulnerability scanners. The agent interfaces with the vulnerability scanners to coordinate the running of scans and the collection of the results, along with connecting to HostedScan to enable full command and control from your HostedScan dashboard.

System requirements

To run scans effectively, we recommend that the scanning machine scales based on the number of active IPs scanned:

Active IPsCPURAMDisk Space
~ 5124 cores8 GB60 GB
~ 2,5006 cores12 GB80 GB
~ 10,0008 cores16 GB100 GB

Additional resources may improve scan performance.

Operating System

The HostedScan agent runs on most common Linux distributions. Officially tested and supported on:

OSVersion
Debian12+
Ubuntu24.10+
RHEL/CentOS9+

Docker

The recommended setup uses Docker Compose with Greenbone Community Edition containers. This requires Docker and Docker Compose to be installed on the scanning server - https://docs.docker.com/compose/install/.

Alternatively, you can run your own OpenVAS/GVM installation and interface the agent with it.

Network

The HostedScan agent and OpenVAS access these domains:

DomainPortProtocolReasonRequired
api.hostedscan.com443HTTPSAllows agent to receive commands and send scan resultsyes
api.hostedscan.com443WSSReal-time communication with agent via websocketsno
registry.community.greenbone.net443HTTPSInstall OpenVAS/GVM Scanner and update vulnerability feedsyes

Install the agent

tip

Commands are shown for root users. Use sudo if running as a less privileged user.

These steps are expected to be run on the scanning server.

  1. Setup an agent source on hostedscan.com. See the Setup and Run the HostedScan agent guide for getting started.

  2. Create a user for running the hostedscan-agent:

useradd --system --home-dir /opt/hostedscan --create-home --shell /usr/sbin/nologin hostedscan

This creates the hostedscan user with a home directory at the install location.

  1. Copy the agent to the scanning server. For example, from your local machine:
scp hostedscan-agent user@your-server-ip:~/
  1. On the scanning server, place the agent in /opt/hostedscan/ and make it executable:
cp hostedscan-agent /opt/hostedscan/
cd /opt/hostedscan/
chmod +x /opt/hostedscan/hostedscan-agent
  1. Run the agent with the --generate flag to generate the necessary files for installation.
./hostedscan-agent --generate

You will be prompted to enter both your HostedScan Agent key, and a password for your OpenVAS install. The OpenVAS password is something you choose, and sets the credentials for interacting with the OpenVAS scanner.

This generates:

  /opt/hostedscan/compose.yml               # Docker compose file for OpenVAS
/opt/hostedscan/hostedscan-agent.service # Systemd configuration for the agent

Both the HostedScan Agent key and OpenVAS password are stored in the .hostedscan directory.

  1. Move the systemd file to the proper location:
mv hostedscan-agent.service /etc/systemd/system/
  1. Ensure the correct permissions on the agent installation and the associated files:
chown -R hostedscan:hostedscan /opt/hostedscan/
  1. Enable and start the agent:
systemctl daemon-reload
systemctl enable hostedscan-agent.service
systemctl start hostedscan-agent.service
  1. Check the agent logs to ensure the agent has started:
journalctl -u hostedscan-agent.service -f
tip

If no logs appear, restart journald:

systemctl restart systemd-journald

You can also find the logs in the file /var/log/syslog

The agent will now attempt to connect to OpenVAS. Proceed to setup the OpenVAS scanner.

Setup the OpenVAS scanner

OpenVAS runs as a collection of docker containers. Ensure the docker engine is installed before continuing.

  1. From /opt/hostedscan/ run:
docker compose up -d

This uses the compose.yaml file to pull images and start containers.

  1. Enable Docker on startup:
systemctl enable docker
tip

The first launch of OpenVAS may take an hour or longer before it is ready. Subsequent restarts are faster but may still take a few minutes.

The HostedScan agent monitors OpenVAS and will start scans when OpenVAS is ready.

Helpful Commands

Check agent status:

systemctl status hostedscan-agent.service

Restart the agent:

systemctl restart hostedscan-agent.service

Stop the agent:

systemctl stop hostedscan-agent.service

View the agent logs:

journalctl -u hostedscan-agent.service -f

To view the OpenVAS container logs, from /opt/hostedscan run:

docker compose logs -f