Deploying meteor app on my server

Hi,

How are you trying to deploy it? Are you using meteor up?

Do you have ssh access to the server? Is it an ubuntu, linux or windows server?

If it is an ubuntu server and you have ssh access the easiest way is by using meteor up. You can follow the guide in this link.

http://meteor-up.com/getting-started.html

1 Like

Hello, I have a simple web host server on ovh I don’t really know if I can access any kind of ssh, I tried using meteor up but I don’t really seem to be able to

If you’re just learning and want to host a meteor app for free that is not intended to be production grade you might want to consider using a Heroku sandbox account + MLab sandbox (mongo) with Horse buildpack located here-> https://github.com/AdmitHub/meteor-buildpack-horse.git

You’ll need to set up the necessary env vars too - https://docs.meteor.com/environment-variables.html

It’s an easy way to get set up and deploy your app

Note Heroku sandbox sites “fall asleep” and take min to wake up once they do, but if you’re just learning or just need a user acceptance test site and don’t care about the sleep thing it’s not a bad way to go.

2 Likes

How is your teacher expecting your to use the ovh server?
What kind of information has he given you about the server?
Which operating system are you using?
What kind of project are you making?

Hello,
So I still haven’t find a way to get my project online. I got an OVH web host account with SSH access but I am not able to use the npm commands. I cannot use any other kind of server as my work needs to be on a certain url.

Hi @antoinej,
We really can’t help unless you answer some of the questions that have been asked so far.

Is it an ubuntu, linux or windows server?
Is it shared between students?
Are you allowed to install packages onto the server?
(you said npm commands don’t work, which means nodejs is not installed, you will need to install nodejs to run Meteor apps)

And most importantly, have you talked to your teacher about issues deploying? They should be able to help install the prerequisites like Node and npm.

Once the prerequisites are sorted out, you will need to follow the steps in the custom deployment guide here:

Hello,
I don’t think it has any operating system as it’s just a web host with ssh/ftp access. I was thinking of upgrading to a cloud host server on ovh as it comes with a nodejs module, but I don’t see any informations about an operating system, does it still need to have ubuntu/windows/linux if it can run nodejs 8/10?

If it has ssh access you should land in some secure shell and you should be possible for you to retrieve the operating system from there.

On unixoid systems you are often good to got with uname -a and on windows there are also options.

As long as it can run node, you should be okay. Your app shouldn’t care too much what platform it’s on, though there can be differences like the type of slash used to denote file paths (’/’ vs ‘’)

Hello, so I decided to buy a Ubuntu VPS server on OVH, will I be able to publish my app online using it?

Yes, start by installing nodejs, the easiest, up to date version, is to use the snap package provided by NodeSource:

sudo snap install node --classic --channel=10

and then follow the instructions in the custom deployment guide

Let us know if you run into any problems and we can work through them with you

Hi,
So I’ve been trying to deploy my app using meteor up since it looks the easiest to me, but when trying to install it I get this message :

root@vps719102:~# npm install --global mup

/usr/local/bin/mup -> /usr/local/lib/node_modules/mup/index.js

npm WARN lifecycle The node binary used for scripts is /snap/bin/node but npm is using /snap/node/2485/bin/node itself. Use the --scripts-prepend-node-path option to include the path for the node binary npm was executed with.

mup@1.4.6 postinstall /usr/local/lib/node_modules/mup

opencollective postinstall || (exit 0)

2019/08/16 08:06:28.097079 cmd_run.go:884: WARNING: cannot create user data directory: cannot create “/nonexistent/snap/node/2485”: mkdir /nonexistent: permission denied

dropping privs did not work

So I thought I would still try to deploy my app no matter what and got this message :

{ Error: spawn meteor ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
at onErrorNT (internal/child_process.js:415:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
errno: ‘ENOENT’,
code: ‘ENOENT’,
syscall: ‘spawn meteor’,
path: ‘meteor’,
spawnargs:
[ ‘build’,
‘–directory’,
‘/tmp/mup-meteor-a182e078-ce50-4352-b600-66ab44a90260’,
‘–architecture’,
‘os.linux.x86_64’,
‘–server-only’ ] }
This error usually happens when meteor is not installed.

What am I supposed to do?

Also thanks for your precious help I am really thankful for that

If you plan on using mup, you need to install it on your local development machine, not on the target server. Their docs could definitely be clearer on this
Then continue following the instructions on mup’s getting started guide:
http://meteor-up.com/getting-started.html

1 Like

Thank you, yes I thought you had to do that on the server.
So I went trough the whole process and still get this error :

{ Error: spawn meteor ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
at onErrorNT (internal/child_process.js:415:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
errno: ‘ENOENT’,
code: ‘ENOENT’,
syscall: ‘spawn meteor’,
path: ‘meteor’,
spawnargs:
[ ‘build’,
‘–directory’,
‘/tmp/mup-meteor-a182e078-ce50-4352-b600-66ab44a90260’,
‘–architecture’,
‘os.linux.x86_64’,
‘–server-only’ ] }
This error usually happens when meteor is not installed.

It seems weird to me because it says it happens when meteor is not installed but I already had installed it just before using mup init and I got the message saying that it was a success :

Started TaskList: Setup Meteor

[ip] - Setup Environment

[ip] - Setup Environment: SUCCESS

Any idea?

Can you please list the steps you followed to reach this error?

Is this error on your development machine?

No it is not it is from my VPS console.
So I installed mup on my machine with using “npm install --global mup” then I uploaded my project on my vps through filezilla, once I did that I went on my vps and on my project path I did

mkdir .deploy && cd .deploy

then I setup mup on my vps using mup setup and kept on following the steps from the console (I believe I had to do mup init or something) and when I got the point of deploying my project I got the error even tho the terminal was saying that mup was succesfuly installed

Also I gotta have it only by monday so I’m kinda starting to freak out lol

This is where things started to veer off course for you. With mup, the only thing that you need to do on the server is to make sure that it allows external access via the access method that you plan on specifying in the mup.js config file (either set up a key pair or a password based access). Everything else happens on your local machine - mup will itself upload the bundle to your server and set things up there.

So all these steps take place on your local development machine:
http://meteor-up.com/getting-started.html

2 Likes

Oh alright thank you, well I now went through the whole process and it went succesfuly, but I still have a problem. When I type in the ip in my browser I don’t see my app but only a message “Unknown path” which is strange because my path in mup.js is “…/” and my mup.js file is in the .deploy folder. Also I got this message : "
Browserslist: caniuse-lite is outdated. Please run next command npm update caniuse-lite browserslist" but I am unable to do the command (it just doesn’t do anything) and after updating all npm packages I still get the message.

Thanks in advance for your help

Progress! :slight_smile:

With default settings, as far as I know (don’t quote me on that), mup does not allow you to access the app simply via ip. You should probably take a look at the proxy object inside your mup.js to get nginx set up correctly. Usually you would specify a domain there that then points to your servers IP. I’m sure somewhere there you can configure just an IP address as well.

The caniuse-lite issue should not prevent you from seeing your app.

1 Like

Hey guys,
I was finally able to get my project up on time and I wanted to thank everyone who helped me doing it, I am really thankful for that !

3 Likes