This script launches a private VS Code Server inside AWS and connects it to your Tailscale tailnet for secure, RDP-free development.
It installs Claude (Anthropic) integration, Python, Git, and Docker automatically.
- Creates a fresh VPC + subnet + IGW + route table automatically
- Deploys an Ubuntu 22.04 t3.large EC2 instance
- Installs:
- code-server (browser-based VS Code)
- Tailscale (for private access)
- Python 3, pip, Git, Docker
- Claude Code extension (Anthropic)
- Prompts for:
- Anthropic API key
- Tailscale Auth Key
- Configures
ANTHROPIC_API_KEYin/etc/environment - Opens only port 22 temporarily (everything else over Tailscale)
- Accessible only within your Tailscale tailnet
- AWS CLI configured in the
defaultprofileaws configure
- Anthropic API key
Obtain from https://console.anthropic.com/. - Tailscale Auth key
Create an ephemeral key at https://login.tailscale.com/admin/settings/keys. - A local SSH client (
~/.sshwill hold the auto-generated key).
chmod +x launch_vscode_server.sh
./launch_vscode_server.shYouβll be prompted for both keys.
The script builds the environment, joins your tailnet, and prints your Tailnet IP.
From any Tailscale-connected device open:
http://<TAILNET_IP>:8443
Login with the password shown at the end of the run.
Open the Claude sidebar in VS Code β ensure the model is claude-4.5-sonnet.
| Layer | Description |
|---|---|
| Network | Only reachable inside your Tailscale tailnet |
| AWS SG | SSH open for bootstrap only |
| Secrets | Anthropic API key stored in /etc/environment |
| TLS | Protected by Tailscaleβs encrypted overlay |
- To SSH over Tailscale:
ssh ubuntu@<tailnet-hostname>.ts.net
- Stop the instance:
aws ec2 stop-instances --instance-ids <id>
- To remove all resources later, delete:
- The EC2 instance
- Its VPC, subnet, and SG created by the script
==============================================================
VS Code Server Ready (Tailscale-only)
Tailnet IP: 100.81.109.100
Access URL: http://100.81.109.100:8443
Password: 6b39767a9a634c8c58be7da5
==============================================================