diff --git a/src/freedombone-app-hackmd b/src/freedombone-app-hackmd
index de147dfabd1ffcffad2b9ce5230216e1d70aecea..e74093b1e2bfac9eb9e176c9c01991a6c49b1889 100755
--- a/src/freedombone-app-hackmd
+++ b/src/freedombone-app-hackmd
@@ -339,6 +339,8 @@ function hackmd_create_config {
 }
 
 function install_hackmd {
+    apt-get -yq install phantomjs
+
     install_mariadb
 
     get_mariadb_password
@@ -377,6 +379,23 @@ function install_hackmd {
     chmod +x bin/setup
     ./bin/setup
     hackmd_create_config
+    npm install
+    npm install ejs
+    npm install passport
+    npm install method-override
+    npm install cookie-parser
+    npm install compression
+    npm install express-session
+    npm install connect-session-sequelize
+    npm install morgan
+    npm install passport.socketio
+    npm install helmet
+    npm install i18n
+    npm install connect-flash
+    npm install lodash
+    npm install deep-freeze
+    npm install winston
+    npm install markdown-pdf
     npm run build
 
     chmod g+w "/var/www/$HACKMD_DOMAIN_NAME/htdocs"