Deploy the local TACACS+ server container using Docker on Linux

In this topic, you will learn how to deploy the Portnox™ Cloud local TACACS+ server container using Docker on a local Linux machine (physical or virtual).

Read the following important information before you begin:

  • We assume that the Linux machine is already installed, configured, updated, and connected to the local network. This guide includes only the installation and configuration of Docker and the Portnox Cloud local TACACS+ server container.

Note: This procedure has been tested on Ubuntu 22.04.2 and RHEL 9.3. It applies either unmodified or with little modifications to all other popular Linux distributions.

Install Docker

In this section, you will install Docker on the Linux machine.

Skip this section if Docker is already installed.

  1. Open the Terminal window.
  2. Install Docker using your distribution’s package management framework.

    Ubuntu:

    $sudo apt-get install docker.io -y

    RedHat:

    $sudo yum install -y yum-utils
    $sudo yum-config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo
    $sudo yum install docker-ce
    $sudo systemctl start docker
  3. Test Docker using the Hello World test container.
    $sudo docker run hello-world

    Result: Hello from Docker! This message shows that your installation appears to be working correctly.

Run the Portnox Cloud local TACACS+ container

In this section, you will deploy the local TACACS+ server Docker container locally to the Linux machine.

  1. Copy and paste the values of the three environment variables that you saved earlier (or copy them directly from Portnox Cloud) into three export commands.
    $sudo export TACACS_GATEWAY_ORG_ID=copied_TACACS_GATEWAY_ORG_ID
    $sudo export TACACS_GATEWAY_PROFILE=copied_TACACS_GATEWAY_PROFILE
    $sudo export TACACS_GATEWAY_TOKEN=copied_TACACS_GATEWAY_TOKEN
  2. Run the portnox/portnox-tacacs Docker container.
    $sudo docker run -d -p 49:49/tcp \
      --name portnox-tacacs --restart=always \
      -v portnox-tacacs-data:/data \
      -e TACACS_GATEWAY_PROFILE=$TACACS_GATEWAY_PROFILE \
      -e TACACS_GATEWAY_ORG_ID=$TACACS_GATEWAY_ORG_ID \
      -e TACACS_GATEWAY_TOKEN=$TACACS_GATEWAY_TOKEN \
      portnox/portnox-tacacs:latest
    Note: The -v option creates and mounts a Docker volume that preserves the local TACACS+ server data in case the container stops running, for example, if the machine is restarted or crashes. Without this option, local TACACS+ cached data would be lost if the container stops running. To learn more about Docker volumes and an alternative, bind mounts, see Docker documentation.
  3. Optional: View the logs for the portnox/portnox-tacacs Docker container.
    $sudo docker logs portnox-tacacs -f

Result: Your local TACACS+ server is active.

You can check its status in Portnox Cloud, in the Settings > Services > LOCAL TACACS+ SERVICE > Local TACACS+ images section.