Prompt Library

Copy/paste from below into the respective terminals and claude sessions.

The library will keep expanding as I make more videos

Pack 1 · Droplet + Claude Code

Setup your development machine & connect Claude Code

Follow along with the video with these Step by Step Prompts & Terminal Commands to securely connect Claude Code to your Droplet

Before you start

Go to DigitalOcean & create your droplet

General advice: do not go smaller than "Regular CPU" 2 vCPU / 2 GB RAM (~$18/mo). If you're serious about building apps and software, I'd recommend "Premium AMD/Intel" at the same specs (~$24/mo). You can always upsize later as your needs grow. My current production droplet is 16GB RAM / 8 Intel vCPU, but that's way overkill starting out. DO NOT click "Create Droplet" until you've done the steps below.

Go to DigitalOcean
Stage 1 · Your SSH key

Generate a new SSH key - in Mac Terminal

Open Mac Terminal and paste the command below. It will ask you where to save the key. If you already have a key, give this one a new path like /Users/YOUR_USERNAME/.ssh/YOUR_KEY_NAME so it doesn't overwrite the old one. A passphrase is optional extra security (just don't lose it if you set one).

ssh-keygen
Stage 1 · Your SSH key

Copy your public key

During droplet setup you'll use an SSH key, not a password. The command below copies your public key so you can paste it into the droplet setup screen. Paste it there now, select the key's checkbox, name your droplet if you'd like, and click "Create Droplet".

pbcopy < ~/.ssh/YOUR_KEY_NAME.pub
Stage 2 · Claude account

Create your Claude account

Go to Claude.com and create an account. Most people can get away with the $100/mo Max plan. Then go to Claude.com/download and download the desktop app.

Download Claude Desktop
Stage 3 · Claude Code

Install Claude Code on the droplet

Open the Web Console from DigitalOcean inside your droplet's menu (it can take a few minutes after creation to become available). Type "cd .." (that's c-d-space-period-period), then "cd opt", then paste the command below. The installer is one line and needs no Node.js; the second line adds Claude to your PATH and reloads your shell so it works right now.

curl -fsSL https://claude.ai/install.sh | bash
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc
Stage 3 · Claude Code

Confirm it installed + sign in

Check the version, then launch Claude Code. It prints a URL - open it in the Mac browser that you created/signed into Claude with, approve, and paste the code back into the terminal.

claude --version
claude
Stage 4 · Non-root user

Create a non-root user

Working as root runs every command with the master key. Make a normal account that asks for admin powers only when it needs them. You'll set a password (this is what sudo asks for later); press Enter through the optional fields. 'claude' is just a username - use whatever you like and swap it into the commands below.

adduser claude
Stage 4 · Non-root user

Grant sudo + copy your key over

First line adds the user to the sudo group (keeps everything they had, plus sudo). Second line clones root's .ssh into the new user's home with correct ownership, so the same Mac key logs into both accounts.

usermod -aG sudo claude
rsync --archive --chown=claude:claude ~/.ssh /home/claude
Stage 5 · SSH config

Create your SSH config

Open a new Terminal window on your Mac (leave your current terminal window open). Run the command below - it opens an editor right in the terminal.

nano ~/.ssh/config
Stage 5 · SSH config

Add the host block

If there are already lines in the editor, scroll to the bottom. Paste the block below. Fill in the Host alias, your droplet's IP address (found in DigitalOcean), and your private key name (not the key itself - the name, likely something like ~/.ssh/YOUR_KEY_NAME; you used the public version of it to copy your key for the droplet). Then save and exit nano (Ctrl+O, Enter, Ctrl+X).

Host YOUR_HOST_ALIAS
    HostName YOUR_DROPLET_IP
    User root
    IdentityFile ~/.ssh/YOUR_KEY_NAME
    IdentitiesOnly yes
Stage 6 · First connection

Connect to the droplet

In Mac Terminal, use the alias from your config file (last step). The first time, you'll see a prompt about host authenticity - type yes. That's just the first handshake with a new machine.

ssh YOUR_HOST_ALIAS
Stage 7 · Claude Desktop

Add your droplet in Claude Desktop

Open the Claude Desktop app and choose "Add SSH Host". Enter the host as claude@YOUR_DROPLET_IP, set the Identity File to the PATH of your private key (e.g. /Users/YOUR_USERNAME/.ssh/YOUR_KEY_NAME - the path, not the key contents), use port 22, and connect.

claude@YOUR_DROPLET_IP
Stage 7 · Claude Desktop

Test the connection

Once connected, navigate to the /opt directory in the session, then ask Claude to list it. If it returns the contents of /opt on your droplet, Desktop is correctly driving Claude Code on the server.

Can you list what is in the opt directory
Stage 8 · Cursor (IDE)

Add Cursor as your IDE

Cursor connects to the droplet over Remote-SSH so you can edit files and run the project on the server with a full IDE. Install Cursor, open the command palette (Cmd+Shift+P), run "Remote-SSH: Connect to Host", pick YOUR_HOST_ALIAS, then open the /opt folder.

Get Cursor
Good habits

A few things that keep this working

Only the public key (.pub) is ever pasted anywhere external; the private key never leaves your Mac. Always test new SSH access from a second terminal window before closing the working one. Use one key per droplet so a compromised key only means rotating one machine. And ~/.ssh is hidden in Finder - toggle hidden files with Cmd+Shift+. or jump there with Cmd+Shift+G then ~/.ssh/.

Some links above are affiliate or referral links - if you sign up through them I may earn a credit or commission, at no extra cost to you. I only point you at tools I actually use.