Capstone: Register, Deploy, and Connect

July 16, 2026 ยท View on GitHub

This stage creates external state. Read every current policy, hostname, slot, charge, and nameserver value before submission.

Step 1: Prepare the DNS Zone

In the authoritative DNS service, create a zone for the exact domain you intend to register. Record every assigned nameserver in the project notebook.

Verify that the service recognizes the zone before using the nameservers for registration.

Step 2: Register the Domain

In the DigitalPlat Dashboard:

  1. Read current notices.
  2. Open Register.
  3. Read the policies for the selected suffix.
  4. Check the intended label.
  5. Review availability, slot use, and any price.
  6. Enter assigned authoritative nameservers when requested.
  7. Verify the final complete domain.
  8. Submit only when every value matches the plan.

Record the registration result and displayed expiration date. Do not copy private account data into public project documentation.

Step 3: Verify Delegation

dig NS example.dpdns.org
dig +trace NS example.dpdns.org

Replace the fictional name. The delegated nameservers must match the intended service.

Ask an authoritative server directly:

dig @ns1.dns-service.example SOA example.dpdns.org

Do not proceed if the authoritative server does not publish the zone.

Step 4: Prepare the Server

On the authorized Linux server:

sudo apt update
sudo apt upgrade
sudo apt install nginx
sudo mkdir -p /var/www/example.dpdns.org
sudo chown -R "$USER":"$USER" /var/www/example.dpdns.org

Confirm listeners and firewall intent:

sudo ss -lntp

Step 5: Deploy Files

From the local project parent directory:

rsync -av ./capstone-site/ user@192.0.2.10:/var/www/example.dpdns.org/ \
  --exclude '.git/' \
  --exclude 'notes/' \
  --exclude '.env'

Do not use --delete for the first deployment. Replace the server address and user.

On the server:

find /var/www/example.dpdns.org -maxdepth 2 -type f -print

Confirm that only intended public files were copied.

Step 6: Configure Nginx

Create /etc/nginx/sites-available/example.dpdns.org:

server {
    listen 80;
    listen [::]:80;

    server_name example.dpdns.org www.example.dpdns.org;
    root /var/www/example.dpdns.org;
    index index.html;

    location / {
        try_files $uri $uri/ =404;
    }

    access_log /var/log/nginx/example.dpdns.org.access.log;
    error_log /var/log/nginx/example.dpdns.org.error.log;
}

Enable and validate:

sudo ln -s /etc/nginx/sites-available/example.dpdns.org /etc/nginx/sites-enabled/example.dpdns.org
sudo nginx -t
sudo systemctl reload nginx

Never reload after a failed configuration test.

Step 7: Test Before DNS

curl -I -H 'Host: example.dpdns.org' http://192.0.2.10
curl -I -H 'Host: www.example.dpdns.org' http://192.0.2.10

Both requests should reach the intended virtual host.

Step 8: Add DNS Records

Open the external authoritative DNS service used in Step 1. Create the following records there, not in DigitalPlat.

Root IPv4:

Name:  @
Type:  A
Value: real-server-ipv4
TTL:   3600

Root IPv6 only when tested:

Name:  @
Type:  AAAA
Value: real-server-ipv6
TTL:   3600

www alias:

Name:  www
Type:  CNAME
Value: example.dpdns.org
TTL:   3600

Step 9: Verify Public HTTP

dig A example.dpdns.org
dig AAAA example.dpdns.org
dig CNAME www.example.dpdns.org
curl -I http://example.dpdns.org
curl -I http://www.example.dpdns.org

If IPv6 is published, test it independently. Remove an incorrect AAAA rather than leaving some visitors on an unreachable path.

Step 10: Record the Change

Document:

  • Domain and registration date
  • Expiration date
  • Nameservers
  • DNS records and TTLs
  • Server address
  • Deployment revision
  • Nginx test result
  • HTTP verification result
  • Rollback values

Continue to Secure, Monitor, and Back Up.