---
title: "Prepare AxoRouter hosts"
product: "Axoflow 0.90"
url: "https://axoflow.com/docs/axoflow/0.90/deploy/onprem/prepare-axorouter-hosts/"
description: "Prepare hosts to run AxoRouter with an on-premises AxoConsole, with the generated script or manually."
last_modified: "2026-10-29T11:05:13+01:00"
---

> For the complete documentation index, see [llms.txt](https://axoflow.com/docs/axoflow/0.90/llms.txt).

# Prepare AxoRouter hosts

Prepare hosts to run AxoRouter with an on-premises AxoConsole, with the generated script or manually.

If you use [AxoRouter](https://axoflow.com/docs/axoflow/0.90/architecture/index.md#router) with an on-premises [AxoConsole](https://axoflow.com/docs/axoflow/0.90/architecture/index.md#console) deployment, complete the following steps on the hosts where you want to deploy AxoRouter. You don’t need these steps if you use the SaaS AxoConsole.

## Run the generated prepare-host script

After a successful AxoConsole installation, the installer writes a `prepare-axorouter-host.sh` script to the log directory on the AxoConsole host. This script automates all the steps below.

1. Copy the script to each AxoRouter or Axoflow agent host.
2. Run it as root:

   ```shell
   sudo bash prepare-axorouter-host.sh
   ```

   The script adds the AxoConsole base hostname and its `kcp.` and `telemetry.` subdomains to `/etc/hosts`, and installs the AxoConsole CA certificate into the system trust store. The script doesn’t add the `idp.` subdomain. If you use Dex as the authentication provider, add it to `/etc/hosts` yourself.

## Manual preparation

If the prepare-host script is not available, complete the following steps manually.

1. If the AxoRouter host can’t resolve the domain name of AxoConsole, add the domain name to the `/etc/hosts` file of the AxoRouter host. Use the following format, with an IP address of AxoConsole that the AxoRouter host can access.

   ```shell
   <AXOFLOW-CONSOLE-IP-ADDRESS> <AXOFLOW-CONSOLE-BASE-URL> kcp.<AXOFLOW-CONSOLE-BASE-URL> telemetry.<AXOFLOW-CONSOLE-BASE-URL>
   ```
2. Import AxoConsole certificates to AxoRouter hosts.

   1. **On the AxoConsole host**: Run the following command to extract the AxoConsole CA certificate. The AxoRouter host needs this certificate to download the installation binaries.

      ```shell
      kubectl get secret -n axoflow axoflow-local-root-ca -o jsonpath='{.data.ca\.crt}' | base64 -d  > axoflow-ca.crt
      ```

      Copy this file to the AxoRouter hosts.
   2. **On the AxoRouter hosts**: Copy the certificate file extracted from the AxoConsole host.

      - **On Red Hat**: Copy the files into the `/etc/pki/ca-trust/source/anchors/` folder, then run `sudo update-ca-trust extract`. If needed, install the `ca-certificates` package first.
      - **On Ubuntu:** Copy the files into the `/usr/local/share/ca-certificates/` folder, then run `sudo update-ca-certificates`.
3. Run `curl -I https://<your-host.your-domain>`. The response must be `HTTP/2 200`.
4. Now you can [deploy AxoRouter on the host](https://axoflow.com/docs/axoflow/0.90/provisioning/axorouter/index.md)
   .

   > **Note:**
   > If you want to download the AxoRouter images directly from AxoConsole (useful in air-gapped environments), disable the [External image pull](https://axoflow.com/docs/axoflow/0.90/provisioning/axorouter/linux/advanced-options/index.md#external-images)
   > option of the provisioning script.
