Question

Deploying a Meteor.JS app to digital ocean servers.

Posted June 6, 2014 20.7k views
Hi! I am relatively new to server side development. But I am very interested in learning how to deploy my meteor.js app to my digital ocean account. I am wondering if it would be possible to develop a step-by-step tutorial to guide me through this process? Thanks!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
5 answers
Getting set up with Meteor.JS is simple, just run:


curl https://install.meteor.com/ | sh
meteor create ~/my_cool_app
cd ~/my_cool_app
meteor


Now the bare bones app is running at http://your.ip.address:3000

There are a number of ways to deploy a Meteor app you developed locally. Check out:

http://docs.meteor.com/#deploying

If you create a bundle of your app with:


meteor bundle myapp.tgz


You can copy that to a DigitalOcean droplet and extract it there. You'll need need node.js and MongoDB installed. You can then extract and run it with:


PORT=3000 MONGO_URL=mongodb://localhost:27017/myapp node bundle/main.js


To install node.js see:

https://www.digitalocean.com/community/articles/how-to-install-node-js-on-an-ubuntu-14-04-server

To install MongoDB, see:

https://www.digitalocean.com/community/articles/how-to-install-mongodb-on-ubuntu-12-04

Let us know how it goes!
by Etel Sverdlov
MongoDB is a document database used commonly in modern web applications. This tutorial should help you setup a virtual private server to use as a dedicated MongoDB server for a production application environment. This tutorial is written for Ubuntu 12.04.
Use Meteor Up[0]. It it used by many developers to deploy their Meteor app specially on DO.


[0] - https://github.com/arunoda/meteor-up

You might also need this command (if you are having a problem running meteorite). Also, remember that you don’t need node or npm, just run the command that Andrew gives above (curl https://install.meteor.com/ | sh) and meteor brings in node and npm.

export PATH=~/.meteor/tools/latest/bin:$PATH

Here is a tutorial on this subject.

http://code.krister.ee/hosting-multiple-instances-of-meteor-on-digitalocean/

This article says there are issues with Ubuntu 14, but I haven’t had any trouble so I’m not sure what he is talking about.

The above article does not work with current DO Ubuntu 14.04/Nodejs setups.

Submit an Answer