Deploying HCL SafeLinx in a Container Environment
You can deploy HCL SafeLinx using either Docker Compose for orchestrated management or standard Docker commands for standalone deployments.
Before you begin
- Directories: Create data and cert-mount directories on your host to ensure data persistence.
- Certificates: Place all
*.p12and LTPA key files in the cert-mount directory before starting the container. - Database: Ensure your target database (PostgreSQL, MySQL, etc.) is reachable.
About this task
Method A: Using Docker Compose
This method is recommended if you have the
docker-compose.yaml file
from the SafeLinx Docker kit. - Configure the Environment Edit the
.envfile in your project directory:VERSION=1450 DB_TYPE=postgres - Start the Service Run the following command from your project directory:
docker-compose up -d
Method B: Using Docker Run Commands
Use this method if you pulled the image from
hclcr.io and do not
have the orchestration files.- Standard Server Deployment: Use this command for standard Nomad,
Verse, or HTTP proxy
deployments:
docker run -d \ --name hcl-safelinx \ --restart unless-stopped \ -e DB_TYPE=postgres \ -v $(pwd)/cert-mount:/cert-mount:z \ -v $(pwd)/data:/opt/hcl/SafeLinx/datastore:z \ -p 443:443 \ -p 8885:8885 \ -p 9555:9555 \ -p 9559:9559 \ hclcr.io/hcl-safelinx/safelinx-server:1450 - VPN Server Deployment (Host Network): If deploying SafeLinx as a VPN
server, the container requires privileged access to manage network
interfaces on the
host:
docker run -d \ --name hcl-safelinx-vpn \ --restart unless-stopped \ --privileged \ --network host \ --device /dev/net/tun \ -e DB_TYPE=postgres \ -v $(pwd)/cert-mount:/cert-mount:z \ -v $(pwd)/data:/opt/hcl/SafeLinx/datastore:z \ hclcr.io/hcl-safelinx/safelinx-server:1450
Configuration & Management
Administrator Interface
Regardless of the deployment method, SafeLinx must be configured via the
Administrator Client:
- Connect to the server at
<host>:9555. - Perform your configuration (LDAP, OIDC, VPN Routes, etc.).
- Restart the container to apply changes:
- Compose: docker-compose restart
- Docker: docker restart hcl-safelinx
Common Parameters Explained
- -e DB_TYPE: Defines the database backend (e.g., postgres, mysql, mssql).
- -v .../data:/opt/hcl/SafeLinx/datastore:z: Maps the persistent configuration data to the host.
- --privileged & --device /dev/net/tun: Grants the container permission to create the tunnels required for VPN traffic.
- --network host: Required for VPN servers to ensure the container shares the host's IP stack for routing.