diff --git a/lib/statsd.js b/lib/statsd.js
index f7278dca5628b18f7f7329cb04043078822ef653..d18f24e75f8e116b8c29d1cfc585353db08b1927 100644
--- a/lib/statsd.js
+++ b/lib/statsd.js
@@ -3,8 +3,15 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 const
-StatsD = require("node-statsd").StatsD,
-config = require('./configuration');
+config = require('./configuration'),
+logger = require('./logging').logger;
+
+var StatsD = false;
+try {
+  StatsD = require("node-statsd").StatsD;
+} catch (requireError) {
+  // its ok, its an optionalDependency
+}
 
 const PREFIX = "browserid." + config.get('process_type') + ".";
 
@@ -23,11 +30,15 @@ module.exports = {
 var statsd_config = config.get('statsd');
 
 if (statsd_config && statsd_config.enabled) {
-  var options = {};
-  options["host"] = options["host"] || "localhost";
-  options["port"] = options["port"] || 8125;
-
-  statsd = new StatsD(options["host"], options["port"]);
+  if (StatsD) {
+    var options = {};
+    options["host"] = options["host"] || "localhost";
+    options["port"] = options["port"] || 8125;
+
+    statsd = new StatsD(options["host"], options["port"]);
+  } else {
+	log.error('statsd config enabled, but node-statsd not installed.');
+  }
 }
 
 process.on('uncaughtException', function(err) {
diff --git a/package.json b/package.json
index 1e45de6881495042a873d00681c892f3c587fa08..66c1b4322238c1866d33f3709367a98506498675 100644
--- a/package.json
+++ b/package.json
@@ -20,7 +20,6 @@
         "mustache": "0.3.1-dev",
         "jwcrypto": "0.3.2",
         "mysql": "0.9.5",
-        "node-statsd": "https://github.com/downloads/lloyd/node-statsd/0509f85.tgz",
         "nodemailer": "0.1.24",
         "mkdirp": "0.3.0",
         "optimist": "0.2.8",
@@ -34,6 +33,9 @@
         "validator": "0.4.9",
         "winston": "0.6.2"
     },
+    "optionalDependencies": {
+        "node-statsd": "https://github.com/downloads/lloyd/node-statsd/0509f85.tgz"
+    },
     "devDependencies": {
         "vows": "0.5.13",
         "awsbox": "0.2.12",