Running a own Kadira instance Update: now with a guide!


That is just hilarious to me :smile:
Like those arcade game ports where you have to press a button to add coins

Kadira seems to start fine fine for me, and is connecting to mlab, but for some reason I just get “This site can’t be reached” when I connect with my browser. I know the port is open, as I just tried hosting a meteor app on it, which worked.


it will be meaningful if you explain which part is hilarious to you :slight_smile:

About the “this site can’t be reached” you may want to check env var.


see “Updating to the business plan” on -kudos @lampe .

By the way can you get your App to connect to Kadira-engine? I am getting Chrome console error;

XMLHttpRequest cannot load https://kadira-engine.<KADIRA_OPTIONS_ENDPOINT>/simplentp/sync. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://<ROOT_URL>' is therefore not allowed access.


You may want to check out our fork I made it work with docker-compose. You need to create stripe and meteor apps to obtain your api keys. Only configuration step is making these changes in meteor settings:

  • replace stripe apiKey and publishableKey (if you provide test keys then you can use credit card number 424242424xxx to avoid real charges :slight_smile: )
  • add "meteorDevelopers": { "clientId": "your client id", "secret": "your secret" }

In the future we are going to remove SaaS features so you can run it as self hosted version.


I got it working :smiley:
The problem was I that I was already using port 4000, and I foolishly thought I could just change the port Kadira used in docker-compose.yml
I now instead changed the port of the other process, and let Kadira use its default, which worked!

I got my apps connecting to it now too! Pretty smooth setup with the docker image, other than the port issue :slight_smile:


Kadira process are running fine.

kadiradocker_kad npm run start Up>1
ira-engine_1 1011/tcp
kadiradocker_kad npm run start Up
kadiradocker_kad su -c /usr/bin/e Up>40
ira-ui_1 ntrypoint. … 00/tcp, 80/tcp

I am using the nginx conf for kadira-ui and kadira-engine as in the link below.

But, i am not able to access the url i specified in server_name.

am i missing something ?


Here are some ideas If all processes are running properly.

  1. By looking at your server name (assumed first part of the string is server name), I would look into network settings(e.g. iptables) for docker containers. My understanding about docker is each container creates virtual interface.
  2. Another idea would be mongoDB being not reachable, but this usually lead to Meteor landing page complains about it.

If you have some log, please post it.

Hope this help :slight_smile:


Did you solve this? I got the same issue, but it was because of wrong port in the app ENV var. I used :4000, but it should be :11011. Then it worked. :slight_smile:

I have now successfully installed Kadira APM on a Amazon EC2 instance running Ubuntu. Is it necessary to write a short guide how to successfully make that work? If someone is interested, let me know.


yes, a guide to setup kadira will be wonderful. I may be missing some of the config steps after the docker compose command to make it work.


MongoDb looked fine…I see it connect successfully

I believe there are some more steps after docker compose that I am missing to make it work on hosting space like Amazon. It would be great to have those details.


I will write a short guide using the Docker images on Amazon EC2.

In the meantime, doublecheck that you do not have any other running processes on the ports 4000 or 11011. If you do, kill them before running docker-compose up.

Then when all is running, open up your public DNS in your browser: (like with the port 4000.


can you say how you solved it?


I checked the ports are not in use. I started the process and then tried to access the app.
I have setup nginx and tried with the domain configured there.

We have already mapped the machine to the domain, but still it does not work.


Hi folks,

When trying to use @vladgolubev’s Docker images, I had the same problem as @antoineschaller in kadira-rma "Error: couldn't initialize connection to host undefined, address is invalid"and realized that it was due to the kadira-rma/ script requiring a Mongo replica set.

To allow it to work without a replica set, first create a directory structure as follows:

- docker-compose.yml
- kadira-rma
  - Dockerfile

Then copy the contents of into your local file above and update it as follows:

  1. Replace this: $(pick-mongo-primary $MONGO_URL)
    with this: $MONGO_URL

  2. Replace this: $(pick-mongo-primary $MONGO_METRICS_URL)
    with this: $MONGO_URL

Next, create a Dockerfile under your kadira-rma directory above to use your updated file as follows:

FROM vladgolubev/kadira-rma:latest


ADD /app

CMD [ "npm", "run", "start" ]

And then copy @vladgolubev’s docker-compose.yml file into your PROJECT_ROOT directory and update it to build your own kadira-rma image from your Dockerfile rather than using his kadira-rma image as follows:


    #image: vladgolubev/kadira-rma
      context: ./kadira-rma

After making those changes, I was able to start up Kadira successfully by following @vladgolubev’s 3 steps and the connection error in kadira-rma was fixed:

  1. Create MongoDB deployment on
  2. export KADIRA_MONGO_URL="mongodb://....."
  3. docker-compose up


I have runned Kadira over the weekend for 1 live app, and 1 staging app. Now the account is already maxed with the free tier (500MB storage). That was really fast buildup, so I wonder if that is correct or if there is some misconfiguration?

If the app uses 500MB over 3-4 days, this will require a big volume which will be really expensive for just 1 app…

Any ideas, suggestions etc?

Regarding the Amazon EC2 writeup/guide, i will work on it today. :slight_smile:


I tried following you instruction on a new digital ocean droplet and got the below error.
Have you seen this error at your end ?

kadira-engine_1 | Killed
kadira-engine_1 |
kadira-engine_1 | npm ERR! Linux 4.4.0-78-generic
kadira-engine_1 | npm ERR! argv “/usr/bin/node” “/usr/bin/npm” “run” "start"
kadira-engine_1 | npm ERR! node v0.12.10
kadira-engine_1 | npm ERR! npm v2.14.9
kadira-engine_1 | npm ERR! code ELIFECYCLE
kadira-engine_1 | npm ERR! kadira-engine@ start: node server.js
kadira-engine_1 | npm ERR! Exit status 137
kadira-engine_1 | npm ERR!
kadira-engine_1 | npm ERR! Failed at the kadira-engine@ start script ‘node server.js’.
kadira-engine_1 | npm ERR! This is most likely a problem with the kadira-engine package,
kadira-engine_1 | npm ERR! not with npm itself.
kadira-engine_1 | npm ERR! Tell the author that this fails on your system:
kadira-engine_1 | npm ERR! node server.js


waiting for the guide…


on our kadira instance we see that mongodb eats more RAM everyday.

So we have a cronjob were we restart kadira once a week


How is the space useage for your mongo DB? Are you over 500MB in total?


Kadira on Amazon EC2

Short guide on how to get this setup, by using the Docker images from vladgolubev and

    1. Setup a Ubuntu EC2 instance on Amazon. You can use the smallest plan you’d like. I am using t2.micro.
    1. After this is done, open up the security group allocated to the new instance, and add inbound TCP ports 11011 and 4000
      Port 11011 is the kadira engine, and port 4000 is the kadira dashboard. Both must be open.
    1. Setup a mongo database on, and have the connection string ready (with username and password)
    1. Start the Ubuntu instance, and install Docker Compose. Use this guide:
    1. Verify that you got docker compose installed correctly and can use it.
    1. Check if some processes are using the ports 4000 or 11011, and if some is, kill them.
  • 7.Create a file named docker-compose.yml with nano, and insert this as a template (this is the exact same as earlier in this thread):
version: '2'

    image: vladgolubev/kadira-engine
      - "11011:11011"
      - PORT=11011

    image: vladgolubev/kadira-rma

    image: vladgolubev/kadira-ui
      - "4000:4000"
    1. I had trouble using the export $KADIRA_MONGO_URL variable, so I had to hardcode the string in each place instead. So I changed “$KADIRA_MONGO_URL” with the connection string.
  • 9.The connection string should not have any " wrapping around it. Example:
    1. Run docker-compose up to start
    1. Check for errors in the console output. There should not be any if I have remembered everything here now.
    1. Open your instance public URL with port :4000 to see if you got kadira login. Example:
    1. Login with and pw admin
  • 14.To connect your meteor app with a custom endpoint, use this in your settings.json (obviosly change to your EC2 instance url):
"kadira": { 
            "appId": "<>", 
            "appSecret": "<>",
            "options": {

Things that is not working 100%:

  • Error reporting, since my app is on SSL, and my kadira instance not, this will not work. Struggling a bit to activate SSL on my instance (not very used to Amazon servers etc)
  • Kadira seems to use a lot of space on mlab, after 3-4 days of use the DB is at 500MB. Need to solve this somehow.