Skip to content

Instantly share code, notes, and snippets.

@olaioo
Last active February 5, 2023 14:50
Show Gist options
  • Select an option

  • Save olaioo/bad64d81d1b9e9aa90c4860d0802bf26 to your computer and use it in GitHub Desktop.

Select an option

Save olaioo/bad64d81d1b9e9aa90c4860d0802bf26 to your computer and use it in GitHub Desktop.
Script for install remote openvscode in a vps
echo '------------ Starting Remote Open Visual Code instalation ------------'
sudo apt -y install jq
echo 'cd /tmp/
wget $(curl --silent "https://api.github.com/repos/gitpod-io/openvscode-server/releases/latest" | jq -r .assets[0].browser_download_url)
tar -xzf openvscode-server-*.tar.gz
cd openvscode-server-*/bin/
sudo iptables -F
./openvscode-server --host 0.0.0.0 --port 1234' > ~/.openvscode.sh
echo '[Unit]
Description=Open Visual Code Service
After=multi-user.target
[Service]
User=ubuntu
ExecStart=/usr/bin/bash /home/ubuntu/.openvscode.sh
Type=simple
[Install]
WantedBy=multi-user.target' | sudo tee /etc/systemd/system/openvscode.service > /dev/null
sudo systemctl start openvscode.service
sudo systemctl enable openvscode.service
echo '------------ Finished Remote Open Visual Code instalation ------------'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment