First Launch an instance (ubuntu is preferred) with port 22,80 and 443 open for ssh, http and https respectively.
after successfully ssh-ing into your server using ssh -i <ssh_key.pem> ubuntu@<your_server_ip>
run following commands
go to nodesource and choose method to install latest LTS node