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 learn how to install Docker on the Linux machine.

Skip this section if Docker is already installed.

Important: If you don’t have a physical or virtual machine to install Docker, you can get a third-party Linux image. For example, you can download the latest Ubuntu Server image from the Linux VM Images project and import it into your hypervisor.
  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+ server container

In this section, you will learn how to 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.

Update an existing local TACACS+ server container

In this section, you will learn how to update your Docker container to the latest local TACACS+ server version.

Important: The local TACACS+ server container does not update to the latest version on its own, and at this time, we cannot update it for you remotely. We are working on a way to be able to automate this process in the future. For now, to update to the latest local TACACS+ server version, please follow the manual steps below.
  1. Stop the old Docker container:
    sudo docker stop portnox-tacacs
  2. Optional: If you want to save space, remove the old version of the Docker image:
    sudo docker rmi portnox/portnox-tacacs:latest
  3. Pull the latest version of the Docker image:
    sudo docker pull portnox/portnox-tacacs:latest
  4. Remove the old Docker container:
    sudo docker rm portnox-tacacs
  5. Deploy the new Docker container on the basis of the new image:
    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