The playframework production documentation states that one of the ways to pass the application secret to your application is through a system variable:

java -jar target/scala-2.XX/<yourprojectname>-assembly-<version>.jar -Dplay.crypto.secret=abcdefghijk

The recommended way to generate the application secret is by running:

sbt playGenerateSecret

Now if the secret generated contains a backtick like so:


You’re in for a rude surprise when you try to start your application in a Bash shell:

java -jar target/scala-2.XX/<yourprojectname>-assembly-<version>.jar -Dplay.crypto.secret="QCY?tAnfk?aZ?iwrNwnxIlR6CTf:G3gf:90Latabg@5241AB`R5W:1uDFN];Ik@n"

The result with be a prompt indicating that you need to close the backtick:


instead of starting the application. Backticks are used for command expansion in Bash.

Now there are a couple of ways to workaround this:

  1. Escape the backtick:
  1. Replace it with a single quote:
  1. Remove the backtick:

One thing to keep in mind with other Shells is that any special characters generated by the secret generator will probably have the same issues as Bash does.