, a hosting provider beloved by developers, provides a highly intuitive interface for deploying and managing application infrastructure. In this tutorial I’m going to show you how to install and deploy a app on Digital Ocean. In just a few commands, and a few minutes, you’ll be up and running with a Cosmic-powered app on a scalable Digital Ocean Droplet, ready for team collaboration. Digital Ocean Cosmic-powered Nuxt.js Getting Started To get started, let’s go over what we will be installing on our Digital Ocean Droplet. We will be installing: 1. 2. 3. 4. Node.js The Cosmic CLI Nuxt.js Website Boilerplate Nginx Creating the Droplet Go to to login / signup. After logging in, create a new droplet. I recommend the Ubuntu with 2GB Memory. Then click “Create”. https://www.digitalocean.com Set up your Droplet After creating your Droplet, you should have received an email with your SSH login and password instructions. Login to your server using your command line tool of choice with the information that was sent to you. SSH into your Droplet ssh root@your-droplet-ipEnter your password: the-password-they-emailed-to-you Now that you’re logged in to your Droplet, start by installing with the following commands: Install Node.js Node.js version 10 curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -sudo apt-get install -y nodejs Check that Node.js is installed: nodejs -v # this should output v10.x.x **Install the Cosmic CLI**If you haven’t already, . create your free Cosmic JS account Now you can install the , which is a powerful tool to help you scaffold new projects and execute actions in your Cosmic JS account. Cosmic CLI npm i -g cosmic-cli Next, we’ll need to login to Cosmic JS via the CLI. Enter your email and password after logging in with the following command: Login and install the App cosmic login If you go to the , you’ll notice there is a single command to install this application. Run this command: Nuxt.js Website Boilerplate App page cosmic install-app nuxtjs-website-boilerplate You will then be prompted to create a new Bucket or select an existing Bucket. Select “Create New Bucket” and add a Title for your Bucket. At this point, a couple things will happen: Example content will be imported to your newly created Bucket and the Nuxt.js app code will be downloaded to your Digital Ocean Droplet. Then you’ll see the status of the install: Success!App code located at /root/nuxtjs-website-boilerplate Run this command to start the app: cosmic start-app Once you see the status “OPEN ", your app is built and you can go to your Droplet IP on port 3000 to view your app. (See screenshot below to find your Droplet IP address). http://localhost:3000 So looking at the above screenshot, I’ll go to and I’ll see the app: http://167.99.234.7:3000 Now that we have our app installed, let’s install . Nginx will make it possible to run our app on port 80 (which is the port assigned to websites running on a domain on http). This will allow us to view the app on just the IP address (no port) and point a domain to the IP. Install Nginx Nginx Stop your running app (Control+C) and run the following command to install Nginx: sudo apt-get install -y nginx Next, let’s configure Nginx to run a proxy from port 80 to port 3000: sudo rm /etc/nginx/sites-enabled/defaultsudo vim /etc/nginx/sites-available/ cosmicjs And edit this file to look like this: exactly server { listen 80; server_name example.com; location / { proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header Host $http_host; proxy_pass "http://127.0.0.1:3000"; }} Notice we set the proxy_pass to port 3000, this allows Nginx to act as a reverse proxy by forwarding all incoming requests on port 80 to your Node.js app on port 3000. Next, we need to symlink our configuration to for it to be used by Nginx, since it's currently in : sites-enabled sites-available sudo ln -s /etc/nginx/sites-available/cosmicjs /etc/nginx/sites-enabled/cosmicjs Restart Nginx Now we need to restart Nginx to apply the changes: sudo service nginx restart Now run the start command again: cosmic start-app Once the app starts, go to your IP address (without the port number) and you should see your application running cleanly without the port number in the URL. At this point, you may want to run this process in the background. For this, is a great solution. PM2 When you’re ready to add a domain to your website, you’ll need to do two things: Add your Domain 1. Go to your Domain Registrar and add the IP address to your A Name Records.2. Add your domain to your Nginx config from above (server_name), then restart Nginx, and your website is LIVE! To invite team members to help manage content, login to Cosmic JS and go to Your Bucket > Users. OR run the following command to invite team members via the Cosmic CLI! Invite Team Members cosmic add-user --email someone@myteam.com --role editor Conclusion Digital Ocean is an intuitive application hosting service provider that makes spinning up servers fast and easy. With the tools that come with Cosmic JS, you can have a website connected to a CMS, launched on Digital Ocean, ready to share with your team members in a matter of minutes. If you have any questions about , join the conversation and reach out to us on . Looking forward to seeing what you build! Cosmic-powered apps on Slack Twitter This article originally appears on . the Cosmic JS website