Using Node.js Express on oLab's server


Hey @bakercp, I am trying to set up a simple node server with Express on our oLab server. What ports would I have access/permissions to use? Also, where would that server live?


We can get it set up. Install your server to listen on the port of your choice (port > 1024). Then we’ll set up an nginx proxy to forward the port to a subdomain like



P.S. node (v0.10.22) is already installed on the server.

I set up an express test server here:

Just followed these steps:

and used this app.js

var express = require('express');
var app = express();

app.get('/', function(req, res){
  res.send('Hello World');

var server = app.listen(3000, function() {
    console.log('Listening on port %d', server.address().port);

I did all of that behind a screen command to avoid setting it up as a service … which isn’t super robust, but it should work for testing.


Fantastic, thanks Chris! Where does that project live in our server? Any chance I could get an “” subdomain? No worries if not. Thank you for setting that up (so fast)!


The project is just in the data user’s home directory. You should just create your own.

Have your app listen on port 6578.

I’ll forward requests on to port 6578 via nginx.


All of the thanks! I’d love to learn a bit more about how our nginx proxy setup works. Do you have any links that you recommend?



or other Nginx articles on their community page are pretty stellar resources


I’m not sure if you have access – but you can look at our configuration files here:


I haven’t added one for your subdomain yet, but I think the DNS is working now ( brings you here I think) because it needs to be set up.

If you want to take a stab at writing a config file for your subdomain, be my guest! I’ll get you write access to the conf.d folder and sudo permission to restart nginx if you need it.