How can I deploy Akka?

Akka can be used in different ways:

  • As a library: used as a regular JAR on the classpath and/or in a web app, to be put into WEB-INF/lib
  • As an application packaged with sbt-native-packager

Lightbend Enterprise Suite

Lightbend Enterprise Suite is a solution for managing Lightbend Reactive Platform applications across a cluster of machines. It is reactive from the ground up thus enabling operations to provide the resiliency required to unleash the full benefits of the Lightbend Reactive Platform in their organization.

Native Packager

sbt-native-packager is a tool for creating distributions of any type of application, including Akka applications.

Define sbt version in project/ file:


Add sbt-native-packager in project/plugins.sbt file:

addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.1.5")

Follow the instructions for the JavaAppPackaging in the sbt-native-packager plugin documentation.

In a Docker container

You can use both Akka remoting and Akka Cluster inside of Docker containers. But note that you will need to take special care with the network configuration when using Docker, described here: Akka behind NAT or in a Docker container

You can look at the Cluster with docker-compse example project Cluster with docker-compose example project to see what this looks like in practice.

For the JVM to run well in a Docker container, there are some general (not Akka specific) parameters that might need tuning. You may want to look into using -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap options for your JVM later than 8u131, which makes it understand c-group memory limits.

Found an error in this documentation? The source code for this page can be found here. Please feel free to edit and contribute a pull request.