Skip to content

cmc/aws_vscode_server_claude_tailscale

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ AWS + Tailscale VS Code Server (Claude-ready)

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.


🧩 Features

  • 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_KEY in /etc/environment
  • Opens only port 22 temporarily (everything else over Tailscale)
  • Accessible only within your Tailscale tailnet

βš™οΈ Prerequisites

  1. AWS CLI configured in the default profile
    aws configure
  2. Anthropic API key
    Obtain from https://console.anthropic.com/.
  3. Tailscale Auth key
    Create an ephemeral key at https://login.tailscale.com/admin/settings/keys.
  4. A local SSH client (~/.ssh will hold the auto-generated key).

πŸš€ Usage

chmod +x launch_vscode_server.sh
./launch_vscode_server.sh

You’ll be prompted for both keys.
The script builds the environment, joins your tailnet, and prints your Tailnet IP.


πŸ’» Access

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.


πŸ” Security

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

🧠 Tips

  • 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

βœ… Example Output

==============================================================
 VS Code Server Ready (Tailscale-only)
 Tailnet IP: 100.81.109.100
 Access URL: http://100.81.109.100:8443
 Password: 6b39767a9a634c8c58be7da5
==============================================================

🧑 Credits

About

stands up a vscode server in aws, connects it to tailscale network, enables claude.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages