Deploying the Slack App

Jackalope is written in Python using the Flask framework. This gives a wide variety of options in deploying the application in your environment from installing onto a standalone server, a cloud instance, or within a container.


If you are testing, skip to Run from below.

You will need the following components to deploy the application:

  • A web server or load balancer to serve traffic over TLS
  • A WSGI server (uWSGI or Gunicorn for example) to run the application code
  • A MySQL server

The application will only connect to a MySQL server if all of the required Environment Variables have been provided. If not, a local SQLite database will be created within the application directory.

In a cloud instance deployments you can use services such as:

Run from

This script creates the root application object from the jackalope.create_app() application factory function. If the script has been called from the command line an instance will be launched in a local development server.

$ python

The development server will be accessible at:


If the application is being deployed with a WSGI framework, configure the WSGI server to point to the file and the application object.

Alternatively, the WSGI framework can instantiate and customize an application object using jackalope.create_app().

Testing with ngrok

For testing, you can use the ngrok secure tunneling service to expose the application to the internet and access it using both HTTP and HTTPS.


ngrok will create randomized subdomains each time you execute the binary (e.g. Custom subdomain names are a part of a paid subscription.

Once you have the ngrok binary you can create your tunnel.

Expose a local port on your client (5000 in this example):

$ ngrok http 5000 --bind-tls true

Expose a port on another host from your client (such as a running Docker host):

$ ngrok http --bind-tls true

When ngrok is running you will see the available public endpoints in the window and a stream of traffic logging. Going to in your browser will show the web UI and additional details on the requests that are being made through the tunnel.

Environment Variables

Configuration settings are applied at runtime from the environment variables detailed below.


Run the application in debug mode (additional logging).

This setting will set to True if any value is provided. To leave this setting disabled do not set it in the environment.


The secret key is a value used to secure sessions with the application.

If a value is not present the application will generate a 16-byte key using os.urandom().


The domain name of the application server.


The client ID for the Slack application.

This is obtained during the app creation process at:

The client secret key for the Slack application.

This is obtained during the app creation process at:

The URL provided by Slack for installing the application to channels. This is used for the installation page’s “Add to Slack” button that is provided as a part of this application.

This is obtainted during the app create process at:


The following database values are required when connecting Jackalope to a MySQL server. If they are omitted, a SQLite database will be created within the application directory. This is not recommended for production deployments.


The URL to the MySQL server with the port.



The name of the MySQL database residing on the server.


The username to access the database with.


The password to the user accessing the database.

Using create_app()


Create the root application object, configure the database object, and register all blueprints from jackalope.routes.

Returns:Flask application
Return type:flask.Flask