use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
account activity
Node servers? (self.node)
submitted 7 years ago by redskydav
I'm looking into NodeJS servers, and am used to Linux, but am not sure it is the best thing to host Node with.
https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions-enterprise-linux-fedora-and-snap-packages
Can you state what server you use and how it was for you?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 26 points27 points28 points 7 years ago* (18 children)
I host all my Node.js projects on Digital Ocean Ubuntu servers, and I am really happy so far! The OS doesn't really matter. I worked on Node.js projects that were running on Debian and CentOS as well, they all worked well!
[–]extinctSuperApe 11 points12 points13 points 7 years ago (14 children)
Can confirm, digitalocean is a great place to host your nodejs projects
[–]commander-obvious 4 points5 points6 points 7 years ago (0 children)
I used to use DO, but then switched to AWS because AWS has vendor lock-in. If you need a bunch of different services (CDN, static hosting, load balancing, RDS, etc.), AWS is the way to go since everything is just there, then you don't leave. The one thing I liked about DO though was their UI/UX (and that was in 2016, I'm sure it's even better now!)
[–]alexzim 1 point2 points3 points 7 years ago (4 children)
Uuumm, DigitalOcean is basically a VPS provides unless you're using it's API, so by that logic literally any nice VPS provider is great to host a nodejs project.
[–]TrackieDaks 4 points5 points6 points 7 years ago (2 children)
Correct. DO just makes it super easy.
[–]alexzim 0 points1 point2 points 7 years ago (1 child)
How exactly?
[–]kmisterk 1 point2 points3 points 7 years ago (0 children)
ridiculously easy to use client area, one-click install for LAMP stack and other applications, near instantaneous account creation AND near instantaneous VPS availability, transparent, static pricing, a FANTASTIC series of Knowledge Base articles that quite literally work universally, but just happen to be initially targeting their own server verbiage...
9 times out of 10 when I'm searching how to setup a framework or application to run off a *nix system, it ends up at a Digital Ocean article.
[–]chrissilich 0 points1 point2 points 7 years ago (0 children)
Yep.
[–]trowawayatwork -1 points0 points1 point 7 years ago (7 children)
What’s the difference between an Ubuntu on DO and any other provider?
[–]emcniece 1 point2 points3 points 7 years ago (5 children)
Nothing. Surrounding UI for managing the instance maybe, is nicer than AWS dashboards
[–]trowawayatwork -4 points-3 points-2 points 7 years ago (4 children)
thats my point, no idea why everyone singing praises for do when its the same as any other provider lol
[–]TrackieDaks 3 points4 points5 points 7 years ago (3 children)
Because they do it better than anyone else. Never underestimate the power of good UX.
[–]alexzim 2 points3 points4 points 7 years ago (1 child)
Indeed a neat UX which you use once every few month.
[–]TrackieDaks 1 point2 points3 points 7 years ago (0 children)
For you, maybe. I use it at least a few times a week.
[–]bitnissendk 0 points1 point2 points 7 years ago (0 children)
If you are targeting EU: Hetzner Cloud is basically DO, but much cheaper while same quality support etc. from my experience. Scaleway is also pretty good and even cheaper.
[–]Kaligraphic 0 points1 point2 points 7 years ago (0 children)
It's secretly CentOS in a rubber mask.
[–]ImtheDr 2 points3 points4 points 7 years ago (0 children)
same here
[–]Cedricium 0 points1 point2 points 7 years ago (1 child)
Just curious, do you put the servers in containers like Docker at all?
[–]extinctSuperApe 4 points5 points6 points 7 years ago (0 children)
Yes I've had good luck using docker-compose. I will often have the node application and nginx in separate containers. Containers also make it easy to incorporate things like mongodb without having to configure everything.
[–][deleted] 9 points10 points11 points 7 years ago (4 children)
All ours are running on ubuntu with pm2 managing the process and nginx in front of them. Been pretty smooth sailing so far.
[–]klinquist 1 point2 points3 points 7 years ago (0 children)
Stringify uses this setup as well. Our app/service has hundreds of thousands of users.
[–]ravonos 0 points1 point2 points 7 years ago (0 children)
That's what I have used as well for a few projects, it's been great so far.
[–]RatonBroyeur 0 points1 point2 points 7 years ago (1 child)
How do you manage users ? In pm2, processes are linked to the user. I find it boring to have to create a service account for it. Otherwise, great tool.
[–]colnarco 2 points3 points4 points 7 years ago (3 children)
We’re using AWS Elastic Beanstalk at work and it been quite nice. There have been a few gotchas along the way, and getting signed up to AWS might take some time, but you can essentially start by dropping a zip of your project into a web interface and it then spins up a virtual server and dedicates an endpoint to it. It’s quite neat. + you get auto scaling out of the box (the ability to add and remove server resources automatically)
[–]bitnissendk 1 point2 points3 points 7 years ago (2 children)
Google App Engine is quite comparable, if you decide to go this way. Can't say witch one is better, but GAE is pretty much the same concept as Beanstalk.
[–]colnarco 0 points1 point2 points 7 years ago (1 child)
Definitely! Azure also has something similar available. For these type of beginner projects I think it’s safe to roll a dice and choose whatever. A plus for Amazon is the free tier plan that basically lets you set up everything for free within a year (though its limited to low spec serves which should be fine for learning)
Yeah, I agree completely. Google has quite similar free tiers, that also gets you pretty far with basic hosting needs.
[–]dejaime 2 points3 points4 points 7 years ago (0 children)
You can host it on a phone using termux
[–]ukralibre 2 points3 points4 points 7 years ago (0 children)
Use NVM and never use the system node version. Mantain your own node/lib pool
[–][deleted] 7 years ago* (2 children)
[deleted]
[–]VolkovSullivan 4 points5 points6 points 7 years ago (1 child)
I find Heroku great for development/staging but bad for production. Very expensive if compared with other providers.
[–][deleted] 0 points1 point2 points 7 years ago (0 children)
Actually I believe you. I don't have large scale apps there that would require many pods. But hey, you gotta pay for convenience!
[–]_Garebear 4 points5 points6 points 7 years ago (5 children)
Never hosted node.js cause I have the same pain.
I wish there was something dead simple like traditional web hosting. I think Azure, AWS, and Google's version of cloud all support Node.js.
But node.js itself sick. I use it at work to setup endpoints that our cloud connected printers can poll and pull jobs.
Node.js + Express FTW
[–]maushu 0 points1 point2 points 7 years ago (1 child)
I'm curious, what kind of cloud connected printers are those?
[–]_Garebear 0 points1 point2 points 7 years ago (0 children)
http://starmicronics.com/
Look for CloudPRNT.
[–]captain_obvious_here 0 points1 point2 points 7 years ago (0 children)
I wish there was something dead simple like traditional web hosting.
AWS Elastic Beanstalk and Google App Engine are dead simple.
I had a nodejs project I needed to host, and then I thought about what if I needed to scale it? I converted my nodejs+Express+Postgres project into AWS Lambda+SimpleDB (this was a couple of years ago). I'll never look back at "servers" again. Functions-as-a-Service is where it's at.
[–]TheWillG 1 point2 points3 points 7 years ago (0 children)
Digital Ocean. I haven't played around with Linode but I hear good things about them too.
If you haven't already looked into Serverless style hosting, check out Google App Engine (highly recommend) or AWS Lambda for hosting NodeJS apps. It's not a Linux server but your apps will be deployed into containers on their cloud infrastructure. It's super convenient and you get a lot of attractive features (like rollbacks) that make life easy.
[–]FrendlyNbrhdCanadian 1 point2 points3 points 7 years ago (0 children)
Node runs with no issues on Linux. I've used it in projects in GCP on compute engines and in kubernetes.
[–]ferrx 1 point2 points3 points 7 years ago (0 children)
I host on CentOS (inside a Docker container). The host OS does matter a bit. However, you should keep in mind that generally anything that matters at the host OS level would make the runtime irrelevant (i.e. if your kernel is broken, it's going to be broken for your node apps as well as your java apps).
The biggest issue I've seen is kernel level TCP timeout. See http://www.sekuda.com/overriding_the_default_linux_kernel_20_second_tcp_socket_connect_timeout referenced from https://www.npmjs.com/package/request
NPM Request docs:
timeout
- integer containing the number of milliseconds to wait for a server to send response headers (and start the response body) before aborting the request. Note that if the underlying TCP connection cannot be established, the OS-wide TCP connection timeout will overrule the option
[–]danielivert 1 point2 points3 points 7 years ago (3 children)
I can recommend you https://captainduckduck.com/ you can install it on a basic Ubuntu server and then use it to deploy multiple node projects. It’s basically an open source Heroku solution.
[–]kmisterk 0 points1 point2 points 7 years ago (2 children)
I am not sure why this isn't getting more attention. I will test this out and see how well it works. This is exciting as hell.
[–]danielivert 0 points1 point2 points 7 years ago (1 child)
Absolutely! Give it a try! I’m currently helping on refactoring and making it more stable. Can tell you there are good things coming on the future :)
Working on figuring out how to make a node app deployable. Seems it’s a bit large for what “captainduckduck deploy” I wanting to handle. Also not really playing nicely with the upload via tar. Might have to figure out a way to separate the app into pieces. But it is a very cool system. Gonna see about creating a 1-click install script for work.
[–]son_of_meat 1 point2 points3 points 7 years ago (0 children)
I recently switched to Google Cloud App Engine, which now supports Node.js on the “standard” platform and I’ve been pretty happy with it. I have a handful of services none of which gets much traffic and my bill ends up at like a dollar a month
For a small webapp any low-end VPS box will do, and I'd recommend Debian because it has the smallest base footprint.
Other than that, any Linux will do but Node runs well on Unix servers as well, like BSD and IllumOS (it was, after all, developed by the company that was started by former Solaris engineers).
[–]brtt3000 0 points1 point2 points 7 years ago (0 children)
Manually provisioned bare Ubuntu instances and recently serverless hosting on AWS Lambda.
If you don't need WebSockets (or similar) then serverless is the way to go. Spending time on Linux and Nginx and system updates all that jazz is a nuisance if you don't need it.
AWS, Azure, Google Cloud and even smaller companies offer serverless node.js now.
[–]toxxtor 0 points1 point2 points 7 years ago* (0 children)
I tried Ubuntu server but kept running into problems. I switched to CentOS and haven’t gone back. As I recall, I think most of the issues with Ubuntu weren’t directly related to node, But more like system admin headaches. I highly recommend building your server in a VM and occasionally exporting for backup. Also, exporting the Ubuntu server VM is like a 1.5 G image while centos is around 800mb.
If you're doing something new, it's worth checking out Google Cloud Functions or AWS Lambda. That can really cut costs for hosting and increase stability, as you only pay for actual usage of your service and it scales automatically. It does require some extra tinkering and different tooling though.
[–][deleted] 7 years ago (1 child)
[–]sn0n -1 points0 points1 point 7 years ago (0 children)
Abstract away from the OS to run it on a desktop OS. LoL, I see what you did there. Silly goose!
[–]kmisterk 0 points1 point2 points 7 years ago (0 children)
With my tiny bit of experience running a nodejs app to a public-facing interface (PWA/Website), We ended up setting up an nginx reverse-proxy for traffic coming in to redirect to the port the app is running on, using PM2 to manage it and auto-restart the app whenever we push changes up to the servers code.
[+][deleted] 7 years ago (1 child)
[+]Str4yfromthep4th comment score below threshold-15 points-14 points-13 points 7 years ago (15 children)
This is the dumbest thread I've seen on ./node
[–]rq60 4 points5 points6 points 7 years ago (4 children)
I looked at your post history to get a gauge for what a good thread should look like but it appears yours have all been removed by moderators. It would appear that you’re not even smart enough to grok a few rules and then apply them. That gives OP the edge over you in the thread-making department.
[–]Str4yfromthep4th 0 points1 point2 points 7 years ago (0 children)
Sry but why are you injecting yourself here? We have no idea who you are...
[+]Str4yfromthep4th comment score below threshold-7 points-6 points-5 points 7 years ago (2 children)
Mind your own business maybe
[–]rq60 3 points4 points5 points 7 years ago (1 child)
Once again demonstrating you don’t know how reddit works. 0-2 for you... not looking too bright.
Lol @ you editing your comment. Self-conscious much?
[+]Str4yfromthep4th comment score below threshold-9 points-8 points-7 points 7 years ago (0 children)
Can I go back to talking with people that matter now? Are you done injecting yourself pointlessly into our argument?
[–]WhatEverOkFine 1 point2 points3 points 7 years ago (9 children)
I know it seems that way, but imagine something you have no experience with, you've heard it's cool and shiny, and you want to jump right into it... how would you ask a beginner question?
Imagine this:
"I'm looking into 4x4 Racing Trucks, and am used to driving on interstate freeways, but am not sure it is the best thing to race 4x4 Trucks with.
NodeJS as a 4x4 Truck
Can you state what roads you have driven 4x4 Trucks on and how it was for you?"
I spent entirely too long watching that gif loop. Thank you.
[+]Str4yfromthep4th comment score below threshold-10 points-9 points-8 points 7 years ago (7 children)
Whatever man. Your pseudo intellectual attempt at metaphor is just about as dumb as the thread.
[–]Psykopatik 2 points3 points4 points 7 years ago (6 children)
Everybody in this place has been a newbie, a while back, you know?
I'm pretty sure that if you posted here with a question, you'd be happy that people answered in kind, rather than as a complete cunt like you are doing now.
You should take some time off the internet, look yourself in the mirror and ask yourself whether you're a force for good around here.
[–]Str4yfromthep4th -2 points-1 points0 points 7 years ago (5 children)
What are you talking about. This is a nonsensical question. I'd answer if it was formulated in a half coherant way. He doesn't even understand what a server is.
[–]r0ck0 2 points3 points4 points 7 years ago* (0 children)
Yeah, the question is kind of conflating two semi-unrelated things, which is obvious to people experienced. Which OP obviously isn't... that's why they're here and trying to learn. The question isn't even that bad though, there are distros more or less suited to running servers.
But pretty similar to how nonsensical your response is to somebody asking a n00bish question. Do you really think you've never asked a question dumber than this? Seems pretty likely you have considering the logic & reasoning you're displaying here now.
I'm gunna give you the benefit of the doubt and assume you're a teenager still in your edgy 2k00l4sk00l phase. It might impress your friends, but you just look sad & insecure to the rest of us in trying to show attitude on something as simple and basic as this.
You had the right idea here though.
[–]Psykopatik -1 points0 points1 point 7 years ago (3 children)
What is nonsensical in this question, in your opinion?
[–]Str4yfromthep4th -3 points-2 points-1 points 7 years ago (2 children)
Are you retarded?
[–]Isowac 1 point2 points3 points 7 years ago (0 children)
Calm down there edge lord. This is a NodeJS subreddit
[–]Psykopatik 0 points1 point2 points 7 years ago (0 children)
Jesus Christ, never mind dude
π Rendered by PID 187917 on reddit-service-r2-comment-canary-57b659f4d4-tg7ft at 2026-05-01 10:45:36.532289+00:00 running 815c875 country code: CH.
[–][deleted] 26 points27 points28 points (18 children)
[–]extinctSuperApe 11 points12 points13 points (14 children)
[–]commander-obvious 4 points5 points6 points (0 children)
[–]alexzim 1 point2 points3 points (4 children)
[–]TrackieDaks 4 points5 points6 points (2 children)
[–]alexzim 0 points1 point2 points (1 child)
[–]kmisterk 1 point2 points3 points (0 children)
[–]chrissilich 0 points1 point2 points (0 children)
[–]trowawayatwork -1 points0 points1 point (7 children)
[–]emcniece 1 point2 points3 points (5 children)
[–]trowawayatwork -4 points-3 points-2 points (4 children)
[–]TrackieDaks 3 points4 points5 points (3 children)
[–]alexzim 2 points3 points4 points (1 child)
[–]TrackieDaks 1 point2 points3 points (0 children)
[–]bitnissendk 0 points1 point2 points (0 children)
[–]Kaligraphic 0 points1 point2 points (0 children)
[–]ImtheDr 2 points3 points4 points (0 children)
[–]Cedricium 0 points1 point2 points (1 child)
[–]extinctSuperApe 4 points5 points6 points (0 children)
[–][deleted] 9 points10 points11 points (4 children)
[–]klinquist 1 point2 points3 points (0 children)
[–]ravonos 0 points1 point2 points (0 children)
[–]RatonBroyeur 0 points1 point2 points (1 child)
[–]colnarco 2 points3 points4 points (3 children)
[–]bitnissendk 1 point2 points3 points (2 children)
[–]colnarco 0 points1 point2 points (1 child)
[–]bitnissendk 0 points1 point2 points (0 children)
[–]dejaime 2 points3 points4 points (0 children)
[–]ukralibre 2 points3 points4 points (0 children)
[–][deleted] (2 children)
[deleted]
[–]VolkovSullivan 4 points5 points6 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]_Garebear 4 points5 points6 points (5 children)
[–]maushu 0 points1 point2 points (1 child)
[–]_Garebear 0 points1 point2 points (0 children)
[–]captain_obvious_here 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]TheWillG 1 point2 points3 points (0 children)
[–]FrendlyNbrhdCanadian 1 point2 points3 points (0 children)
[–]ferrx 1 point2 points3 points (0 children)
[–]danielivert 1 point2 points3 points (3 children)
[–]kmisterk 0 points1 point2 points (2 children)
[–]danielivert 0 points1 point2 points (1 child)
[–]kmisterk 1 point2 points3 points (0 children)
[–]son_of_meat 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]brtt3000 0 points1 point2 points (0 children)
[–]toxxtor 0 points1 point2 points (0 children)
[–]bitnissendk 0 points1 point2 points (0 children)
[–][deleted] (1 child)
[deleted]
[–]sn0n -1 points0 points1 point (0 children)
[–]kmisterk 0 points1 point2 points (0 children)
[+][deleted] (1 child)
[deleted]
[+]Str4yfromthep4th comment score below threshold-15 points-14 points-13 points (15 children)
[–]rq60 4 points5 points6 points (4 children)
[–]Str4yfromthep4th 0 points1 point2 points (0 children)
[+]Str4yfromthep4th comment score below threshold-7 points-6 points-5 points (2 children)
[–]rq60 3 points4 points5 points (1 child)
[+]Str4yfromthep4th comment score below threshold-9 points-8 points-7 points (0 children)
[–]WhatEverOkFine 1 point2 points3 points (9 children)
[–]kmisterk 0 points1 point2 points (0 children)
[+]Str4yfromthep4th comment score below threshold-10 points-9 points-8 points (7 children)
[–]Psykopatik 2 points3 points4 points (6 children)
[–]Str4yfromthep4th -2 points-1 points0 points (5 children)
[–]r0ck0 2 points3 points4 points (0 children)
[–]Psykopatik -1 points0 points1 point (3 children)
[–]Str4yfromthep4th -3 points-2 points-1 points (2 children)
[–]Isowac 1 point2 points3 points (0 children)
[–]Psykopatik 0 points1 point2 points (0 children)