Skip to content

Instantly share code, notes, and snippets.

@madawei2699
Forked from wongcyrus/cloud9-code-server
Created August 19, 2021 15:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save madawei2699/3bb08a8e454e2a2f122a90a85f4661f1 to your computer and use it in GitHub Desktop.
Save madawei2699/3bb08a8e454e2a2f122a90a85f4661f1 to your computer and use it in GitHub Desktop.
Install and run Visual Studio Code (Code-Server) in AWS Cloud9
ip=$(curl http://169.254.169.254/latest/meta-data/public-ipv4)
echo "Code Server"
echo "http://$ip:8443"
security_group=$(ec2-metadata -s | cut -d " " -f 2);
aws ec2 authorize-security-group-ingress --group-name $security_group --protocol tcp --port 8443 --cidr 0.0.0.0/0
version="1.32.0-310"
wget https://github.com/codercom/code-server/releases/download/$version/code-server-$version-linux-x64.tar.gz
tar -xvzf code-server-$version-linux-x64.tar.gz
cd code-server-$version-linux-x64
chmod +x code-server
./code-server -p 8443
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment