Socket
Book a DemoInstallSign in
Socket

mgserver

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mgserver

CLI to automate nginx + letsencrypt setup on digital ocean

latest
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

MGServer Guide (digital ocean server init automation)

This is a guide for how to create a digital ocean instance with:

  • Docker
  • Letsencrypt
  • Nginx (+ proxy_pass)

There are two "Getting Started" sections. One is a two liner, the other is more interactive.

Getting Started (Short Version)

# 1. Create a docker-machine
# 1.1 Setup DNS while this is being created (see below)...
docker-machine create --driver digitalocean --digitalocean-access-token $DIGITALOCEAN_ACCESS_TOKEN --digitalocean-monitoring=true --digitalocean-image=ubuntu-18-04-x64 --digitalocean-region=nyc3 <MACHINE_NAME>

# 2. Init server
mgserver init:remote <MACHINE_NAME>

Getting Started (Long Version)

# 1. Create a docker-machine
# 1.1 Setup DNS while this is being created (see below)...
docker-machine create --driver digitalocean --digitalocean-access-token $DIGITALOCEAN_ACCESS_TOKEN --digitalocean-monitoring=true --digitalocean-image=ubuntu-18-04-x64 --digitalocean-region=nyc3 <MACHINE_NAME>

# 2. ssh into the docker machine
docker-machine ssh <MACHINE_NAME>

# 3. Install nodejs v10
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - && sudo apt-get install -y nodejs

# 4. Install mgserver
npm install -g mgserver

# 5. Run mgserver init & fill out the prompts...
mgserver init

Setting up DNS

  • Go to https://cloud.digitalocean.com/networking/domains
  • Add app url.
  • Add @ as an A record to redirect to droplet.
  • Add www as an A record to redirect to droplet.

Google Domains

Source: https://www.digitalocean.com/community/tutorials/how-to-point-to-digitalocean-nameservers-from-common-domain-registrars#registrar-google-domains-beta

  • Sign in to your Google Domains account.
  • Select the domain name that you want to use with your Droplet.
  • At the top of the screen, click on the icon that represents Configure DNS.
  • Click on Use custom name servers
  • Enter the following nameservers:
  • ns1.digitalocean.com
  • ns2.digitalocean.com
  • ns3.digitalocean.com
  • Select Save to apply your changes. Now you are ready to move on to connecting the domain with your Droplet in the DigitalOcean control panel. Check out the Conclusion section below to read about what to do next.

FAQs

Package last updated on 20 Oct 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts