- In the Digital Ocean portal, go to the project view.
- Click New Droplet.
- Click Create Droplet.
- Click the Marketplace tab.
- Click Docker.
- Choose a plan. Make sure your Droplet has the minimum hardware requirements for Docker.
- Choose any options for backups, block storage, and datacenter region.
- Optional: In the Select additional options section, you can check the User data box and enter a
cloud-config
file in the text box that appears. Thecloud-config
file is used to provide a script to be run on the first boot. An example is below.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var net=require("net"); | |
var tls = require("tls"); | |
/* listen address and port */ | |
var listen_host = "0.0.0.0"; | |
var listen_port = 8080; | |
/* the upstream https servers */ | |
var servers = [ | |
{host: "a.example.com",port:18080}, |