Skip to main content

How to switch the Agent from Cloud to On-Premises or vice-versa

Agent migration

Introduction

Generally, we recommend you uninstall the existing Agent, download the correct Agent from your Cloud or On-Premises/Private Cloud Dashboard, and reinstall the Agent.

However, you can redirect an existing installation to a new server by updating its local configuration parameters. This method is useful for large-scale migrations where a full uninstallation is not preferred.

Stealth Agent (Windows)

1. Run the Command Prompt as an admin:

2. Run the following command in an Administrator Command Prompt to start the Agent service:

sc stop tsvchst

3. Open the Agent configuration file (config.cfg). The file is usually located in the following folders:

Stealth Agent:

C:\ProgramData\{4CEC2908-5CE4-48F0-A717-8FC833D8017A}\config

Revealed Agent:

C:\ProgramData\Teramind Agent\config

You will need admin permissions to edit the config file. We list the steps in this article

.

To switch from a Cloud deployment to an On-Premise deployment:

Add the following lines to the config.cfg file:

router=<server IP/host><:port>
instance=onsite

The router parameter is used to assign the server's IP/host and load balancer port. For example, 10.55.55.58:541. The :port part is optional. If not assigned, the default load balancer port (443) will be used. The Load balancer port is located under Configurations > Settings > Server screen:


To switch from an On-Premise deployment to a Cloud deployment

Add the following lines to the config.cfg file:

router=rt.teramind.co
instance=<instance_name>

Here, <instance_name> is the first part of your dashboard URL. For example:

router=rt.teramind.co
instance=acme.teramind.co

4. Save the file.

5. Restart the Agent using the following command in an Administrator Command Prompt:

sc start tsvchst

If the Agent doesn't come online in the On-Premise Dashboard within a minute, please check the Issues/Notifications dashboard (click the Bell icon near the top-right side of the dashboard) for any issues. If a firewall is in used, please verify that the Teramind server's ports are allowed through the firewall. Please refer to this article to find the ports needed.

Stealth Agent (Mac)

Similar to the Windows Stealth Agent, you can edit the same Agent configuration parameters on Mac.

Here are the steps needed:

1. Run the following command on the Mac Terminal to stop the Agent:

/usr/local/teramind/agent/bin/tmctl.sh stopall

2. Open the Mac configuration file (agent.conf) in TextEdit or a similar editor. The file is located in the /usr/local/teramind/agent/etc folder. For example:

/usr/local/teramind/agent/etc/agent.conf

To switch from a Cloud deployment to an On-Premise deployment:

Add the following lines to the agent.conf file:

instance=onsite
router=<server IP/host><:port>

The router parameter is used to assign the server's IP/host and load balancer port. For example, 10.55.55.58:541. The :port part is optional. If not assigned, the default load balancer port (443) will be used. The Load balancer port is located under Configurations > Settings > Server screen:

To switch from an On-Premise deployment to a Cloud deployment:

Add the following lines to the agent.conf file:

router=rt.teramind.co
instance=<instance_name>

Here, <instance_name> is the first part of your Dashboard URL. For example, instance=acme.teramind.co.

4. Save the file.

5. Restart the Agent using the following command on the Terminal:

/usr/local/teramind/agent/bin/tmctl.sh startall

Revealed Agent (Windows/Mac)

You don't have to modify any configuration files. The user can simply log into the new server by clicking the Advanced link and then entering the new server IP/host in the Server field:

Mac (Alternative Method)

Hidden Agent

1. Run the following command in a Terminal window to manually create or edit the Agent config file:

sudo nano /usr/local/teramind/agent/etc/agent.conf

2. Enter your Mac's admin password when prompted:

3. Then enter this into the file if you are using a Cloud hosted deployment:

instance = <instancename>

4. For an On-Premise deployment, use the following line instead:

instance=onsite router=<server IP/host><:port>

5. Press Ctrl + X and save the file as the current file name.

6. Restart the Hidden Agent using this command in the Terminal window:

sudo killall "System Monitoring"; open "/usr/local/teramind/agent/bin/System Monitoring.app"

The Agent will restart and you should be able to see the computer online on the Dashboard.

Revealed Agent

1. Follow Steps 1-5 under the Hidden Agent instructions above.

2. Run the following command in the Terminal window:

sudo killall tmui; open '/usr/local/teramind/agent/bin/Teramind Agent.app'

Did this answer your question?