diff --git a/commafeed-server/src/main/java/com/commafeed/CommaFeedApplication.java b/commafeed-server/src/main/java/com/commafeed/CommaFeedApplication.java
index cfd7b0ce5..5bfb3f052 100644
--- a/commafeed-server/src/main/java/com/commafeed/CommaFeedApplication.java
+++ b/commafeed-server/src/main/java/com/commafeed/CommaFeedApplication.java
@@ -54,6 +54,8 @@
 
 import io.dropwizard.Application;
 import io.dropwizard.assets.AssetsBundle;
+import io.dropwizard.configuration.EnvironmentVariableSubstitutor;
+import io.dropwizard.configuration.SubstitutingSourceProvider;
 import io.dropwizard.db.DataSourceFactory;
 import io.dropwizard.forms.MultiPartBundle;
 import io.dropwizard.hibernate.HibernateBundle;
@@ -117,6 +119,10 @@ public DataSourceFactory getDataSourceFactory(CommaFeedConfiguration configurati
 
 		bootstrap.addBundle(new AssetsBundle("/assets/", "/", "index.html"));
 		bootstrap.addBundle(new MultiPartBundle());
+
+		// Enable variable substitution with environment variables
+		bootstrap.setConfigurationSourceProvider(
+				new SubstitutingSourceProvider(bootstrap.getConfigurationSourceProvider(), new EnvironmentVariableSubstitutor(false)));
 	}
 
 	@Override