This topic describes how to install Logtail on a Windows server.

Prerequisites

  • At least one server is available.
  • The network type that is required to collect logs is determined. You can determine the network type based on the type of the server on which you want to install Logtail and the region where the server resides. For more information, see Select a network type.

Supported operating systems

You can install Logtail on servers that run one of the following Windows operating systems:
Note Windows Server 2008 and Windows 7 must run on x86 or x86_64. Other Windows operating systems must run on x86_64.
  • Microsoft Windows Server 2008
  • Microsoft Windows Server 2012
  • Microsoft Windows Server 2016
  • Microsoft Windows Server 2019
  • Microsoft Windows 7
  • Microsoft Windows 10
  • Microsoft Windows Server Version 1909
  • Microsoft Windows Server Version 2004

Install Logtail

  1. Download the installation package.
  2. Decompress the logtail_installer.zip package.
  3. Run the installation command based on the network type and the region where the Log Service project resides.

    Run Windows PowerShell or Command Prompt as an administrator, go to the logtail_installer directory, and then run the installation command. The directory stores the files that are extracted from the installation package.

    Region Alibaba Cloud internal network (accessible over the classic network or a VPC) Internet Global acceleration
    China (Qingdao) .\logtail_installer.exe install cn-qingdao .\logtail_installer.exe install cn-qingdao-internet .\logtail_installer.exe install cn-qingdao-acceleration
    China (Beijing) .\logtail_installer.exe install cn-beijing .\logtail_installer.exe install cn-beijing-internet .\logtail_installer.exe install cn-beijing-acceleration
    China (Zhangjiakou) .\logtail_installer.exe install cn-zhangjiakou .\logtail_installer.exe install cn-zhangjiakou-internet .\logtail_installer.exe install cn-zhangjiakou-acceleration
    China (Hohhot) .\logtail_installer.exe install cn-huhehaote .\logtail_installer.exe install cn-huhehaote-internet .\logtail_installer.exe install cn-huhehaote-acceleration
    China (Ulanqab) .\logtail_installer.exe install cn-wulanchabu .\logtail_installer.exe install cn-wulanchabu-internet .\logtail_installer.exe install cn-wulanchabu-acceleration
    China (Hangzhou) .\logtail_installer.exe install cn-hangzhou .\logtail_installer.exe install cn-hangzhou-internet .\logtail_installer.exe install cn-hangzhou-acceleration
    China (Shanghai) .\logtail_installer.exe install cn-shanghai .\logtail_installer.exe install cn-shanghai-internet .\logtail_installer.exe install cn-shanghai-acceleration
    China (Shenzhen) .\logtail_installer.exe install cn-shenzhen .\logtail_installer.exe install cn-shenzhen-internet .\logtail_installer.exe install cn-shenzhen-acceleration
    China (Heyuan) .\logtail_installer.exe install cn-heyuan .\logtail_installer.exe install cn-heyuan-internet .\logtail_installer.exe install cn-heyuan-acceleration
    China (Guangzhou) .\logtail_installer.exe install cn-guangzhou .\logtail_installer.exe install cn-guangzhou-internet .\logtail_installer.exe install cn-guangzhou-acceleration
    China (Chengdu) .\logtail_installer.exe install cn-chengdu .\logtail_installer.exe install cn-chengdu-internet .\logtail_installer.exe install cn-chengdu-acceleration
    China (Hong Kong) .\logtail_installer.exe install cn-hongkong .\logtail_installer.exe install cn-hongkong-internet .\logtail_installer.exe install cn-hongkong-acceleration
    US (Silicon Valley) .\logtail_installer.exe install us-west-1 .\logtail_installer.exe install us-west-1-internet .\logtail_installer.exe install us-west-1-acceleration
    US (Virginia) .\logtail_installer.exe install us-east-1 .\logtail_installer.exe install us-east-1-internet .\logtail_installer.exe install us-east-1-acceleration
    Singapore (Singapore) .\logtail_installer.exe install ap-southeast-1 .\logtail_installer.exe install ap-southeast-1-internet .\logtail_installer.exe install ap-southeast-1-acceleration
    Australia (Sydney) .\logtail_installer.exe install ap-southeast-2 .\logtail_installer.exe install ap-southeast-2-internet .\logtail_installer.exe install ap-southeast-2-acceleration
    Malaysia (Kuala Lumpur) .\logtail_installer.exe install ap-southeast-3 .\logtail_installer.exe install ap-southeast-3-internet .\logtail_installer.exe install ap-southeast-3-acceleration
    Indonesia (Jakarta) .\logtail_installer.exe install ap-southeast-5 .\logtail_installer.exe install ap-southeast-5-internet .\logtail_installer.exe install ap-southeast-5-acceleration
    India (Mumbai) .\logtail_installer.exe install ap-south-1 .\logtail_installer.exe install ap-south-1-internet .\logtail_installer.exe install ap-south-1-acceleration
    Japan (Tokyo) .\logtail_installer.exe install ap-northeast-1 .\logtail_installer.exe install ap-northeast-1-internet .\logtail_installer.exe install ap-northeast-1-acceleration
    Germany (Frankfurt) .\logtail_installer.exe install eu-central-1 .\logtail_installer.exe install eu-central-1-internet .\logtail_installer.exe install eu-central-1-acceleration
    UAE (Dubai) .\logtail_installer.exe install me-east-1 .\logtail_installer.exe install me-east-1-internet .\logtail_installer.exe install me-east-1-acceleration
    UK (London) .\logtail_installer.exe install eu-west-1 .\logtail_installer.exe install eu-west-1-internet .\logtail_installer.exe install eu-west-1-acceleration
    Russia (Moscow) .\logtail_installer.exe install rus-west-1 .\logtail_installer.exe install rus-west-1-internet .\logtail_installer.exe install rus-west-1-acceleration
    Note Log Service cannot obtain the owner information about ECS instances that belong to a different Alibaba Cloud account. In addition, Log Service cannot obtain the owner information about on-premises servers or servers from third-party cloud service providers. Therefore, you must manually configure the IDs of Alibaba Cloud accounts as user identifiers for the servers after Logtail is installed. For more information, see Configure an account ID for a server.

Installation path

After you run the installation command, Logtail is automatically installed. The installation path varies based on the operating system. You cannot change the installation path.
  • 32-bit Windows: C:\Program Files\Alibaba\Logtail
  • 64-bit Windows: C:\Program Files (x86)\Alibaba\Logtail
Note You can run both 32-bit and 64-bit applications in a 64-bit Windows operating system. To ensure compatibility, the operating system stores 32-bit applications in a separate x86 directory.

Logtail for Windows is a 32-bit application. Therefore, Logtail is installed in the Program Files (x86) directory in 64-bit Windows. If Logtail for 64-bit Windows becomes available, Logtail can be installed in the Program Files directory.

View the version of Logtail

Find and open the app_info.json file in the installation directory. The logtail_version field in the file indicates the version of Logtail.

In the following example, the version of Logtail is 1.0.0.0.
{
    "logtail_version" : "1.0.0.0"
}

Upgrade Logtail

  • Automatic upgrade

    In most cases, Logtail for Windows supports automatic upgrade. However, Logtail of a version earlier than V1.0.0.0 must be manually upgraded.

  • Manual upgrade

    You can follow the procedure of installing Logtail to manually upgrade Logtail. You need only to download and decompress the latest installation package, and then install Logtail. For more information, see Install Logtail.

    Note During manual upgrade, Logtail is automatically uninstalled, and then reinstalled. The original files in the installation directory are deleted. We recommend that you back up the files before you manually upgrade Logtail.

Start and stop Logtail

  1. Choose Start Menu > Control Panel > Administrative Tools > Services.
  2. In the Services window, select the required service.
    • For Logtail V0.x.x.x, select LogtailWorker.
    • For Logtail V1.0.0.0 or later, select LogtailDaemon.
  3. Right-click the service and select Start, Stop, or Restart.

Uninstall Logtail

Run Windows PowerShell or Command Prompt as an administrator, go to the logtail_installer directory, and then run the following uninstallation command. The directory stores the files that are extracted from the installation package.
.\logtail_installer.exe uninstall

After Logtail is uninstalled, the Logtail installation directory is deleted. However, some configuration files are retained in the C:\LogtailData directory. You can manually delete the files. The retained configuration files include the following files:

  • checkpoint: stores the information about checkpoints generated by Logtail plug-ins. This file is generated only if the Logtail plug-ins are used.
  • user_config.d: stores local collection configurations.

    The .json files in the directories are considered collection configurations. For example, /usr/local/ilogtail/user_log_config.json is considered a collection configuration.

  • logtail_check_point: stores the information about checkpoints generated by Logtail.
  • users: stores the configured user identifier files.