Agent/Agentless Deployment
Overview
TLS Connect provides both software agents and agentless capabilities to deploy certificates to Windows or Linux servers. The software agent is sufficient for most network environments, but in others, you may need to deploy certificates through the “agentless” feature.
You should have received agent files during onboarding. If you are missing the files, please reach out to your Account Manager to receive it.
IMPORTANT: Use a fresh agent.json configuration file from the agent package for every server. The agent writes its identity into this file on the first start; a copied file makes two servers share one identity. Keep the file when you upgrade the agent.
Configure Automation Agent
Windows Agent
The TLS Connect Windows agent is a single program with a configuration file. It needs no .NET runtime. It runs as a Windows service, connects to the TLS Connect Agent Hub, and installs the certificates of its server profile (IIS bindings, Windows certificate store, PFX / PEM / JKS files, scripts).
Before you start, you will need the following:
-
A 64-bit Windows server (Windows Server 2016 or later) with local Administrator rights
-
The agent package (TC-agent.exe and agent.json)
-
TCP 5086 open from the server to the TLS Connect server (or HTTPS to the reverse proxy)
-
IIS installed if you want IIS bindings.
-
Run every command in PowerShell as Administrator, and replace <HUB_HOST> with the host name or IP address of the TLS Connect server.
-
Copy the agent package to the server, for example with Remote Desktop to the Desktop.
-
Create the program folder, copy the files into it and unblock them (see the commands below).
-
Open agent.json in Notepad and set BaseUrl to http://<HUB_HOST>:5086. Keep the other values as is. Save the file.
-
Test the connection: Test-NetConnection -ComputerName <HUB_HOST> -Port 5086 must show TcpTestSucceeded : True.
-
Create the Windows service and set it to start automatically and restart after a failure (commands below).
-
Start the service: Start-Service TLSConnectAgent.
-
Check the log for Enrolled successfully. In TLS Connect, the server appears in Automation → Agent Hub Logs as Pending.
You can now apply this server as a target in server profiles.
# Step 2 - program folder New-Item -ItemType Directory -Path 'C:\Program Files\TLS Connect Agent' -Force Copy-Item -Path "$env:USERPROFILE\Desktop\windows-agent\*" -Destination 'C:\Program Files\TLS Connect Agent' -Recurse Get-ChildItem 'C:\Program Files\TLS Connect Agent' | Unblock-File # Step 3 - edit the configuration notepad 'C:\Program Files\TLS Connect Agent\agent.json' # Step 5 - Windows service (Local System, delayed start, restart on failure) New-Service -Name 'TLSConnectAgent' -DisplayName 'TLS Connect Agent' ` -BinaryPathName '"C:\Program Files\TLS Connect Agent\TC-agent.exe" --retry forever' sc.exe config TLSConnectAgent start= delayed-auto sc.exe failure TLSConnectAgent reset= 86400 actions= restart/10000/restart/10000/restart/60000 # Step 7 - live log Get-Content "C:\Program Files\TLS Connect Agent\logs\agent-$(Get-Date -Format yyyyMMdd).log" -Tail 30 –Wait
NOTE: Keep the service account Local System: the agent needs it for IIS bindings and the Local Computer certificate store. In PowerShell type sc.exe, not sc. After the first start do not run TC-agent.exe by double-clicking it: under your own account it cannot read the service's identity and would enroll as a new server.
-
Create /opt/tlsconnect, copy the files into it and make the program executable (commands below).
-
Edit /opt/tlsconnect/agent.json and set BaseUrl to http://<HUB_HOST>:5086. Keep the other values as is.
-
Test the connection: nc -zv <HUB_HOST> 5086 or curl -v http://<HUB_HOST>:5086/.
-
Create the service file /etc/systemd/system/tlsconnect.service with the content below.
-
Enable and start the service: sudo systemctl daemon-reload and sudo systemctl enable --now tlsconnect.
-
Check sudo systemctl status tlsconnect (active, running) and sudo journalctl -u tlsconnect -f for Enrolled successfully. The server appears in Agent Hub Logs as Pending
You can now apply this server as a target in server profiles.
# Step 2 - program folder sudo mkdir -p /opt/tlsconnect sudo cp -r ~/linux-agent/. /opt/tlsconnect/ sudo chmod +x /opt/tlsconnect/TC-agent # Step 5 - /etc/systemd/system/tlsconnect.service [Unit] Description=TLS Connect Agent After=network-online.target Wants=network-online.target [Service] Type=simple User=root WorkingDirectory=/opt/tlsconnect ExecStart=/opt/tlsconnect/TC-agent --retry forever Restart=always RestartSec=10 [Install] WantedBy=multi-user.target
NOTE: User=root lets the agent write protected certificate folders and reload nginx or Apache. The agent writes a daily log to /opt/tlsconnect/logs/.
Managing and Troubleshooting Agents
|
Task |
Windows (PowerShell as Administrator) |
Linux |
|---|---|---|
|
Restart (after editing agent.json) |
Restart-Service TLSConnectAgent |
sudo systemctl restart tlsconnect |
|
Stop |
Stop-Service TLSConnectAgent |
sudo systemctl stop tlsconnect |
|
Disable at boot |
Set-Service TLSConnectAgent -StartupType Disabled |
sudo systemctl disable --now tlsconnect |
|
Remove |
Stop-Service TLSConnectAgent then sc.exe delete TLSConnectAgent |
sudo systemctl disable --now tlsconnect, delete the service file, sudo systemctl daemon-reload |
|
Upgrade |
Stop the service, replace only TC-agent.exe, start the service |
Stop the service, replace only TC-agent, start the service |
|
What you see |
What to do |
|---|---|
|
Enroll failed ... Retrying in the log |
Check BaseUrl in agent.json, the connection test and the firewall on TCP 5086. |
|
agent.json not found or a JSON error |
agent.json must be next to the program; check quotes, colons and commas. |
|
Windows error 1053 |
Check the program path in the service and that the files are unblocked. |
|
Linux Permission denied or GLIBC ... not found |
Run chmod +x again; use RHEL 9+, Ubuntu 20.04+ or Debian 11+. |
|
Linux Couldn't find a valid ICU package |
Install libicu (sudo dnf install libicu or sudo apt install libicu*) and restart. |
|
Server not listed in Add Target Servers |
The agent has not enrolled yet; check its log. |
|
The server shows Offline |
The hub has not heard from the agent for 90 seconds: the service is stopped or TCP 5086 is blocked. |
Setting up Agent Servers
-
Navigate to Automation > Server Profile.
-
Select or create the server profile that will distribute certificates to the target server. If you need to create a new profile, refer to Create an Automation Task↗ for more information.
-
Select + Add Targets → Add Agent Server (Windows/Linux).
-
Select the server(s) you want to add to the profile and then click Add Selected.
-
Click Save.
-
Click the Edit pencil icon on the server row.
-
On the Identity tab, click Approve Server.
-
On the Deployment Rules tab, add the rules (see the table).
-
Click Save Configuration.
-
Save the profile.
IMPORTANT: Delete Selected in Add Target Servers removes the servers from all profiles and blocks their agents. Release them with Unblock in Agent Hub Logs.
Deployment Rules
Deployment rules belong to an active profile and are saved when added or removed.
|
Step |
What to configure |
|---|---|
|
File Exports |
+ Add Export Rule, then the Format. PFX: path, PFX Password, chain option. PEM: certificate and private key paths (both required), chain option, optional Encrypt private key with a password. JKS: path, Store Password (at least 6 characters), Entry Alias. |
|
Windows Store |
+ Add MMC Rule, then Store Location and Store Name (default Personal). |
|
Post-Deployment Script |
Script Name, Script Type (Engine) (PowerShell or Bash), script text, Save Script. Runs on the server after the deployment. |
IIS Bindings
Tick a reported HTTPS binding, select the profile and click Link Selected to update it at each renewal. Unlink Selected removes the link.
NOTE: JKS files are built on the TLS Connect server, which needs Java keytool with JAVA_HOME set as a system variable. IIS bindings and Windows store import apply to Windows agents only.
Configure Agentless Certificate Deployment Feature
TLS Connect provides Agentless certificate deployment, which allows servers to download and auto-renew TLS certificates without configuring and installing a TLS Connect agent. An agentless server downloads the current certificate of a profile from the TLS Connect Agent Hub with a script. Each profile has one token, one IP whitelist and one download format. This feature is ideal for:
-
Legacy Linux servers with old glibc (incompatible with the .NET agent)
-
Windows servers where installing software is not permitted
-
Network appliances, load balancers, or embedded systems that can run curl/PowerShell
-
Environments where security policy forbids persistent background agents
-
Quick one-time certificate deployments to a new server
Prerequisites
-
TLS Connect internal hub service is running and reachable on port 5086.
-
A certificate must be assigned to a server profile. refer to Create an Automation Task↗ for more information.
-
curl (Linux) or PowerShell (Windows) is available on the target server
Setup the Agentless Feature
These steps are completed once per profile.
-
Navigate to Automation > Server Profile.
-
Select or create the profile that will distribute certificates to the target server. If you need to create a new profile, refer to Create an Automation Task↗ for more information.
-
Select + Add Targets and then click Add Agentless Server (token-based).
-
In the Agentless Servers modal window, select the file format that matches the target server's software and set the credentials:
-
If choosing PFX (for Windows IIS, Windows services, .NET applications), enter a download password. This is required and used by certutil to import certificates.
-
If choosing PEM (for nginx, Apache, HAProxy, Linux-based web servers), you may optionally check Encrypt PEM key and set a password to protect the private key.
-
If choosing JKS (for Apache Tomcat, Java applications), enter a download password. This is required and used by Java keytool. Also enter an alias name.
-
-
With + Add Single Server selected, enter the IP address of the target server.
-
Select the operating system (OS) type.
-
Enter a friendly name (label) for the server.
-
Click Add Server.
-
Repeat these steps for additional servers or select + Bulk Import to configure multiple servers at once using the “ip,OS,label” format.
-
When you are finished adding your server(s), click Save. The token and server list are now stored in the automation profile.
Windows scripts cover generic download, IIS, folder + service restart and Exchange Server. Linux scripts cover generic download, nginx, Apache httpd, Tomcat (JKS) and folder + command. Server-specific scripts install only changed certificates, back up, verify, roll back on failure and schedule themselves daily.
Use the Agentless Feature
Start by retrieving the appropriate script that matches your target server.
-
From the server profile, select Manage next to the Agentless bar in the Target Servers section.
-
Select Show curl / PowerShell.
-
A modal window will display with the scripts for both Linux and Windows environments. Click Copy to copy the script to your clipboard.
|
Suggested script |
Use it for |
Fields to fill in |
What the script does |
|---|---|---|---|
|
IIS - one site (Windows) |
One IIS website, for example www.example.com on port 443 |
Site name: as shown in IIS Manager. Host name (SNI): optional; add it when several sites share port 443. Port: default 443. |
Imports the PFX into Local Computer → Personal, binds it to the site’s HTTPS binding (creates the binding if missing), and checks the binding uses the new certificate. |
|
IIS - all sites (rebind) (Windows) |
Several IIS sites that share one certificate, for example a wildcard *.example.com used by every site on the server |
None. The sites must already use a certificate for the same name. |
Imports the PFX and switches every HTTPS binding that used the previous certificate. On the first run, it switches every binding whose certificate has the same subject. |
|
Folder + restart services (Windows) |
Windows applications or services that read a PFX, PEM or JKS file, for example a Java app, a monitoring tool or a custom service |
Folder: the folder the application reads. Services to restart: for example MyAppService (separate several with commas). |
Saves the file in the profile format to the folder (keeps a .bak) and restarts the services. Fails if a service isn’t running afterwards. |
|
Exchange Server (Windows) |
Microsoft Exchange (OWA, SMTP, IMAP, POP) |
Exchange services: default IIS, SMTP, IMAP, POP. Keep the default or list only the services that use the certificate. |
Imports the PFX and enables it for the selected Exchange services. |
|
nginx (Linux) |
nginx web server or reverse proxy |
Certificate file and Key file: the paths in ssl_certificate and ssl_certificate_key. Service. |
Installs the certificate and key, runs nginx -t, and reloads nginx. Restores the old files if the test or reload fails. |
|
Apache httpd (Linux) |
Apache httpd |
Certificate file and Key file: the paths in SSLCertificateFile and SSLCertificateKeyFile. Service: leave empty to detect apache2 or httpd. |
Installs the certificate and key, runs apachectl configtest, and reloads Apache. Restores the old files on failure. |
|
Tomcat (JKS keystore) (Linux) |
Tomcat, Jetty or other Java servers that use a keystore |
Keystore file: the keystore set in server.xml. Service: for example tomcat. |
Checks the keystore opens with the profile password, replaces it, and restarts the service. Restores the old keystore on failure. |
|
Folder + command (Linux) |
HAProxy, Postfix, Dovecot, load balancer configs, appliances or any program that reads files |
Folder. Command after download: for example systemctl reload haproxy. |
Saves the files to the folder and runs your command. |
|
Download only (generic) |
A platform not listed above, or when you want to write your own installation steps |
None |
Downloads the files only. You save and schedule the renewal part yourself, as described below. |
Web farms: For a farm of identical IIS servers, use IIS - one site or IIS - all sites (rebind). Register every server IP in the same profile, and run the same script on each server.
Cloud and Appliance Targets
For AWS, Azure, F5 and Google Cloud, you first need to configure your network credentials in Settings > Integrations. Use PowerShell Script for any other cloud service or appliance.
-
Navigate to Automation > Server Profile.
-
Select or create the profile that will distribute certificates to the target appliance. If you need to create a new profile, refer to Create an Automation Task↗ for more information.
-
Select + Add Targets and then click Add Cloud or Appliance Target.
-
Select the platform.
-
Fill in its specific details.
-
Click Save Configuration.
-
Click Save on the profile.
OpenShift / Kubernetes
Routes with edge or reencrypt termination are served with the new certificate; passthrough routes are not changed. Before you start, get from the cluster administrator a long-lived ServiceAccount token that may write secrets in openshift-ingress and patch the IngressController default in openshift-ingress-operator. A cluster can belong to one profile only.
To add an OpenShift / Kubernetes target:
-
Click OpenShift / Kubernetes.
-
Enter a Cluster Profile Name and the API Server URL, or pick a Saved Cluster.
-
Paste the ServiceAccount Token.
-
Enter a TLS Secret Name; it is created if needed.
-
Optional: paste the CA Bundle (PEM, optional). Use Skip TLS Verification only for test clusters.
-
Click Test Connection and wait for the message “Connected.”
-
Click Save Configuration.
PowerShell Script
The script runs on the TLS Connect server after the certificate is renewed. TLS Connect passes the certificate files and passwords as variables. Use it for any platform with an API or CLI that has no built-in target.
To add a PowerShell Script target
-
Click PowerShell Script.
-
Enter a unique Script Name.
-
Type the script, or click Load Script... for a .ps1 file. Click a variable chip to insert it.
-
Set Time limit (minutes).
-
Fix any syntax error reported under the editor.
-
Click Save Configuration.
PowerShell Script Variables
|
Variable |
What it is |
|---|---|
|
$PfxPath / $PfxPassword |
PFX file (certificate, key and chain) and its one-time password. |
|
$PemCertPath |
Certificate in PEM format (with the chain, see below). |
|
$PemKeyPath |
Private key in PEM format. |
|
$PemPassword |
Key password. Using it makes the key file encrypted. |
|
$RootCertPath |
Root CA certificate only. |
|
$IntermediateCertPath |
Intermediate CA certificates. |
|
$CaBundlePath |
Intermediates plus root, in one file. |
|
$JksPath / $JksPassword / $JksAlias |
Java keystore, its password and alias (needs Java on the server). |
|
$CertThumbprint |
Thumbprint of the new certificate. |
|
$CertCommonName |
Common name, for example www.example.com. |
|
$ProfileName |
Server profile running the script. |
NOTE: $PemCertPath holds the full chain only when the script uses no other chain variable. If the script uses $IntermediateCertPath or $CaBundlePath, it holds the certificate alone, so the chain is never sent twice.
To create the scheduled task in Task Scheduler
-
Open Task Scheduler and click Create Task... (not Create Basic Task).
-
General tab: Name TLSConnect-CertRenewal; click Change User or Group..., type “SYSTEM” and click OK
-
Tick Run with highest privileges.
-
Triggers tab: New..., Daily, start time 02:00, OK.
-
Actions tab: New..., Start a program, Program/script powershell.exe, Add arguments -NoProfile -NonInteractive -ExecutionPolicy Bypass -File C:\certs\cert-renew.ps1, OK.
-
Click OK. Right-click the task and choose Run to test it, then check C:\certs\cert-renew.log.
Agent Hub Logs
Agent Hub Logs allows you to check the Agent Hub, manage agents, set up HTTPS, and read the activity log.
If Ping Hub gets no response, check that the Automation service is running and port 5086 is open. Offline means an approved agent has stopped contacting the hub. All agents show Offline when the hub is down. Pending agents get no tasks until approved on the Identity tab of the server profile.
Unblock Agents or IP Addresses
-
Make sure the Automation Service is running.
-
Click Unblock.
-
Click Unblock all IP addresses to release addresses blocked after failed sign-ins.
-
Tick blacklisted agents to release (Show all blacklisted agents lists all).
-
Click Unblock selected and confirm.
-
Approve the agents again when they reappear.
Notification Settings choose which events go to the Windows Event Viewer (Application log, source TLS Connect). Click Save Settings; Test Event Log writes a test event. Emails are set in Settings → Email Settings.
Set Up a Reverse Proxy on IIS (HTTPS for agents)
Before you start: run TLS Connect as Administrator. The server needs internet access if URL Rewrite or Application Request Routing must be installed.
-
Expand Setup Reverse Proxy on IIS.
-
If a prerequisite shows Not installed, click Install missing prerequisites.
-
Enter Website name, Port (default 443) and Host name.
-
Keep Generate a self-signed certificate, or untick it and use Replace certificate later.
-
Click Set up reverse proxy.
-
Check that Reverse proxy endpoint shows “Running”.
-
Use the shown HTTPS URL as the hub address of the agents. The host name must resolve from the agents.
-
Click Change settings and then Update reverse proxy to save changes.
Replace certificate selects a store or self-signed certificate. Use a renewed certificate automatically switches to a later-expiring certificate for the host name.
Remove reverse proxy removes the IIS site and binding. Agents using that URL lose access.