docker-compose.yml for running open-source Kadira

Language: Shell


This will get open-source Kadira running on a dedicated host, almost fully automatically using docker-compose. Specifically, it includes the following dockers:

  • MongoDB server: storing data in /opt/kadira-mongo, and accessible via port 27017
  • nginx-proxy: maps ports 80, 443 (SSL), and 22022 (SSL) to kadira-engine's 11011
  • letsencrypt-nginx-proxy-companion: Acquires Let's Encrypt SSL certificate to support https access.
  • kadira-engine: This is where Meteor apps send their data. Accessible via http://HOST:11011 or https://HOST:22022.
  • kadira-rma: This computes statistics every minute as needed by kadira-ui.
  • kadira-ui: Meteor app to present Kadira user interface, accessible via http://HOST:4000.

The Dockerification of open-source Kadira was originally done by Vlad Holubiev, as described in this Meteor forum post. What I've added here is https access to kadira-engine (via nginx-proxy), and a built-in Mongo server instead of relying on an external service like mlab.com.

Unfortunately, because of the way letsencrypt-nginx-proxy-companion works, I need ports 80 and 443 to point to kadira-engine instead of kadira-ui. So you need to access the UI via http port 4000.


  • Expose the following ports on your host:

    • 22 (if you want to ssh in)
    • 80 & 443 (for letsencrypt to work)
    • 4000 (for Kadira UI)
    • 11011 (if your Meteor app uses http)
    • 22022 (if your Meteor app uses https)
  • Do not expose port 27017, or else your MongoDB will be vulnerable.

  • Install Docker

  • Install/download docker-compose

  • Clone this repo.

  • Edit .env to change HOST and EMAIL environment variables.


  • Launch dockers, and initialize Mongo replica set:

    ./docker-compose up -d mongo
    ./docker-compose exec mongo mongo --eval 'rs.initiate({_id:"kadira", members: [{_id: 0, host: "mongo:27017"}]})'
    ./docker-compose up -d
  • Open http://HOST:4000 and login with email admin@gmail.com (initial password admin -- change it immediately in the UI)

  • Create your apps

  • Upgrade apps to business plan:

    ./docker-compose exec mongo mongo kadira --eval 'db.apps.update({},{$set:{plan:"business"}},{multi:true})'
  • Visit http://HOST:4000 to monitor your apps.

Meteor Setup

If your server is running on https, use the port-22022 endpoint to kadira-engine. For example, add the following line to server/kadira.js:

Kadira.connect(APP_ID, APP_SECRET, {endpoint: 'https://HOST:22022'})

If your server is running on http, use the port-11011 endpoint:

Kadira.connect(APP_ID, APP_SECRET, {endpoint: 'http://HOST:11011'})

Project Statistics

Sourcerank 3
Repository Size 5.86 KB
Stars 17
Forks 4
Watchers 2
Open issues 0
Dependencies 0
Contributors 1
Tags 0
Last updated
Last pushed

Top Contributors See all

Erik Demaine

Something wrong with this page? Make a suggestion

Last synced: 2017-10-18 22:07:38 UTC

Login to resync this repository