Chocolatey Fest - Chocolatey's inaugural conference on Windows Automation (WinOps) is coming - Learn more!

Apache Tomcat


Package test results are passing.

Private CDN cached downloads available for licensed customers. Never experience 404 breakages again! Learn more...

This package was approved by moderator flcdrg on 4/15/2017.

Tomcat is a Application Server. It is possible to run Web application ARchive (WAR) files using Tomcat. Apache Tomcat requires a JDK in order to run.

Optional installation commands:

choco install tomcat -params "servicename=*servicename*" to specify a custom name for the Tomcat Windows service. This defaults to Tomcat8.

choco install tomcat -params "unzipLocation=*path*" to specify the root directory for the Tomcat service. This defaults to C:\Program Files\Apache Software Foundation\Tomcat.
Note: An apache-tomcat-8.5.12 folder is always created, so the actual install path is C:\Program Files\Apache Software Foundation\Tomcat\apache-tomcat-8.5.12 for the default case or path\apache-tomcat-8.5.12 with a custom option.

To install Apache Tomcat, run the following command from the command line or from PowerShell:

C:\> choco install tomcat

To upgrade Apache Tomcat, run the following command from the command line or from PowerShell:

C:\> choco upgrade tomcat


  • tools\chocolateyHelpers.ps1 Show
    function Set-ChocolateyPackageOptions {
            [hashtable] $options
        $packageParameters = $env:chocolateyPackageParameters;
        if ($packageParameters) {
            $parameters = ConvertFrom-StringData -StringData $env:chocolateyPackageParameters.Replace(" ", "`n")
            $parameters.GetEnumerator() | % {
               $options[($_.Key)] = ($_.Value)
  • tools\chocolateyInstall.ps1 Show
    $PFFolder = if (Get-ProcessorBits -eq 64) { "$Env:ProgramFiles" } else { "$Env:ProgramFiles(x86)" }
    $options = @{
        version = '8.5.12'
        unzipLocation = (Join-Path $PFFolder "Apache Software Foundation\tomcat")
        serviceName = 'Tomcat8'
    $unzipParameters = @{
        packageName = 'tomcat'
        url = "$($options['version'])/bin/apache-tomcat-$($options['version'])"
        url64bit = "$($options['version'])/bin/apache-tomcat-$($options['version'])"
        checksum = '151ecf591ec0264f9c2ac056373537e13cba2680'
        checksumType = 'sha1'
        checksum64 = '814e96e6a4d3bc124b93a8314506fac933d28c2f'
        checksumType64 = 'sha1'
    if(!$PSScriptRoot){ $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent }
    . "$PSScriptRoot\ChocolateyHelpers.ps1"
    Set-ChocolateyPackageOptions $options
    Install-ChocolateyZipPackage @unzipParameters -UnzipLocation $options['unzipLocation']
    $catalinaHome = Join-Path $options['unzipLocation'] "apache-tomcat-$($options['version'])";
    Install-ChocolateyEnvironmentVariable 'CATALINA_HOME' "$catalinaHome"
    $binPath =  Join-Path $catalinaHome 'bin'
    Push-Location $binPath
    Start-ChocolateyProcessAsAdmin ".\service.bat install $($options['serviceName'])"
    Export-CliXml -Path (Join-Path $PSScriptRoot 'options.xml') -InputObject $options
    Get-Service | Where-Object Name -eq $options['serviceName'] | Start-Service
  • tools\chocolateyUninstall.ps1 Show
    if(!$PSScriptRoot){ $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent }
    $optionsFile = (Join-Path $PSScriptRoot 'options.xml')
    if (!(Test-Path $optionsFile)) {
      throw "Install options file missing. Could not uninstall."
    $options = Import-CliXml -Path $optionsFile
    $catalinaHome = Join-Path $options['unzipLocation'] "apache-tomcat-$($options['version'])";
    Install-ChocolateyEnvironmentVariable 'CATALINA_HOME' "$catalinaHome"
    $service = Get-Service | Where-Object Name -eq $options['serviceName']
    if ($service -ne $null) {
      Stop-Service $service
    $binPath = Join-Path $catalinaHome 'bin'
    if (Test-Path $binPath) {
      Push-Location $binPath
      Start-ChocolateyProcessAsAdmin ".\service.bat uninstall $($options['serviceName'])"
    if ((Get-ChildItem $options['unzipLocation'] | Measure-Object).Count -eq 1) { 
      Remove-Item $options['unzipLocation'] -Recurse -Force
    else {
      Remove-Item (Join-Path $options['unzipLocation'] "apache-tomcat-$($options['version'])") -Recurse -Force

Virus Scan Results

In cases where actual malware is found, the packages are subject to removal. Software sometimes has false positives. Moderators do not necessarily validate the safety of the underlying software, only that a package retrieves software from the official distribution point and/or validate embedded software against official distribution point (where distribution rights allow redistribution).

Chocolatey Pro provides runtime protection from possible malware.


Package Maintainer(s)

Software Author(s)

  • Apache Software Foundation


Release Notes

Version History

Version Downloads Last updated Status
Apache Tomcat 9.0.0-rc 406 Friday, March 31, 2017 exempted
Apache Tomcat 8.0.33 31549 Saturday, May 28, 2016 approved
Apache Tomcat 8.0.32 718 Friday, February 26, 2016 approved
Apache Tomcat 8.0.29 685 Wednesday, November 25, 2015 approved
Show More

Discussion for the Apache Tomcat Package

Ground rules:

  • This discussion is only about Apache Tomcat and the Apache Tomcat package. If you have feedback for Chocolatey, please contact the google group.
  • This discussion will carry over multiple versions. If you have a comment about a particular version, please note that in your comments.
  • The maintainers of this Chocolatey Package will be notified about new comments that are posted to this Disqus thread, however, it is NOT a guarantee that you will get a response. If you do not hear back from the maintainers after posting a message below, please follow up by using the link on the left side of this page or follow this link to contact maintainers. If you still hear nothing back, please follow the package triage process.
  • Tell us what you love about the package or Apache Tomcat, or tell us what needs improvement.
  • Share your experiences with the package, or extra configuration or gotchas that you've found.
  • If you use a url, the comment will be flagged for moderation until you've been whitelisted. Disqus moderated comments are approved on a weekly schedule if not sooner. It could take between 1-5 days for your comment to show up.

comments powered by Disqus uses cookies to enhance the user experience of the site.