Skip to content

Instantly share code, notes, and snippets.

@tvl83
Last active August 6, 2017 19:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tvl83/983fedac46b7c792a53a7f8c3257f7b6 to your computer and use it in GitHub Desktop.
Save tvl83/983fedac46b7c792a53a7f8c3257f7b6 to your computer and use it in GitHub Desktop.
Instructions to set up VPS as a dev machine for firebase

Source: https://www.digitalocean.com/community/tutorials/how-to-create-a-sudo-user-on-ubuntu-quickstart

Source: https://www.digitalocean.com/community/tutorials/how-to-set-up-a-node-js-application-for-production-on-ubuntu-16-04

Login with root

adduser username

usermod -aG sudo username

log out of vps with root and back in with the new user created

Run the following commands:

update apt-get

sudo apt-get update

upgrade packages

sudo apt-get upgrade

add nodejs PPA source

curl -sL https://deb.nodesource.com/setup_6.x -o nodesource_setup.sh

execute script sudo bash nodesource_setup.sh

install nodejs

sudo apt-get install nodejs

install build-essentials which are required to build some nodejs npm packages

sudo apt-get install build-essential

install firebase-tools

sudo npm install i firebase-tools -g i is shorthand for install and -g means global. the -g is important.

you must then login to firebase from the command line firebase login

it will prompt you with a url to click on to authorize your account on firebase and it'll detect it on the console and you'll now be ready to use firebase tools

create a directory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment