Skip to main content

DigitalOcean Account Setup

DigitalOcean is the primary cloud platform for initial HackerOps labs. It’s developer-friendly, cost-effective, and perfect for learning cloud infrastructure fundamentals.

Tip

Free Credit: New DigitalOcean accounts receive $100-200 in free credits, which is more than enough for all lab activities.

Create DigitalOcean Account

Sign up options:

Info

Credit Card Required: DigitalOcean requires a credit card for verification to prevent spam and abuse. You won’t be charged if you stay within the free credit limits.

Generate API Token

For Terraform automation and CLI access, you’ll need an API token:

  1. Access API Section - In the DigitalOcean dashboard, navigate to β€œAPI” in the left sidebar or bottom menu

  2. Generate New Token - Click the β€œGenerate New Token” button in the Personal Access Tokens section

  3. Configure Token - Give your token a descriptive name like β€œhackerops-labs” and ensure β€œWrite” access is enabled

  4. Save Token Securely - Copy and save the API token immediately as you won’t be able to see it again

  5. Keep Token Private - Never share this token as it provides full access to your DigitalOcean account

Caution

Security Warning: Your API token has full access to your DigitalOcean account. Store it securely and never commit it to GitHub repositories.

Install DigitalOcean CLI (doctl)

The DigitalOcean CLI tool is useful for managing resources:

Configure doctl

Authenticate doctl with your API token:

  1. Authenticate doctl - Run doctl auth init and enter your API token when prompted

  2. Verify Access - Test with doctl account get to display your account information

  3. List Available Resources - Try doctl compute droplet list to see your current droplets (should be empty for new accounts)

Test Your Setup

Verify everything is working:

Terminal window
# Check account details
doctl account get
# List available regions
doctl compute region list
# List available droplet sizes
doctl compute size list
# List available images
doctl compute image list --public | head -10

Tip

Success! If these commands return data without errors, DigitalOcean is properly configured and ready for the labs.

Useful DigitalOcean Regions

Recommended regions for HackerOps labs:

  • NYC1 (New York) - East Coast US
  • SFO3 (San Francisco) - West Coast US
  • LON1 (London) - Europe
  • SGP1 (Singapore) - Asia Pacific

Choose the region closest to your location for best performance.

Next Steps

With DigitalOcean configured:

  1. Complete other cloud setups - Configure AWS and Azure if needed
  2. Start Lab 1 - Deploy your first virtual machine
  3. Explore the dashboard - Familiarize yourself with the DigitalOcean interface

Cost Management

Caution

Important: Always destroy lab resources when finished to avoid consuming your free credits unnecessarily.

Cost-saving tips:

  • Use the smallest droplet sizes for learning ($5-10/month)
  • Destroy droplets immediately after labs
  • Monitor your account balance in the DigitalOcean dashboard
  • Set up billing alerts for spending thresholds
  • Take advantage of the $100+ free credit for new accounts