Skip to content
Closed
20 changes: 4 additions & 16 deletions doc/admin/install/aws.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,13 @@ If you're just starting out, we recommend [installing code-server locally](../..
>example: `ssh -i "/Users/John/Downloads/TestInstance.pem" ubuntu@ec2-3-45-678-910.compute-1.amazonaws.co`
- You should see a prompt for your EC2 instance like so<img src="../../assets/aws_ubuntu.png">
- At this point it is time to download the `code-server` binary. We will of course want the linux version.
- Find the latest Linux release from this URL:
- Download the latest Linux release with this command:
```
https://github.com/codercom/code-server/releases/latest
bash <(curl -s https://raw.githubusercontent.com/codercom/code-server/master/scripts/update.sh)
```
- Replace {version} in the following command with the version found on the releases page and run it (or just copy the download URL from the releases page):
- Navigate to the `code-server` directory with this command:
```
wget https://github.com/codercom/code-server/releases/download/{version}/code-server-{version}-linux-x64.tar.gz
```
- Extract the downloaded tar.gz file with this command, for example:
```
tar -xvzf code-server-{version}-linux-x64.tar.gz
```
- Navigate to extracted directory with this command:
```
cd code-server-{version}-linux-x64
```
- If you run into any permission errors, make the binary executable by running:
```
chmod +x code-server
cd ~/code-server-linux
```
> To ensure the connection between you and your server is encrypted view our guide on [securing your setup](../../security/ssl.md)
- Finally, run
Expand Down
23 changes: 6 additions & 17 deletions doc/admin/install/digitalocean.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,15 @@ If you're just starting out, we recommend [installing code-server locally](../..
- Launch your instance
- Open a terminal on your computer and SSH into your instance
> example: ssh root@203.0.113.0
- Once in the SSH session, visit code-server [releases page](https://github.com/codercom/code-server/releases/) and copy the link to the download for the latest linux release
- Find the latest Linux release from this URL:
```
https://github.com/codercom/code-server/releases/latest
```
- Replace {version} in the following command with the version found on the releases page and run it (or just copy the download URL from the releases page):
```
wget https://github.com/codercom/code-server/releases/download/{version}/code-server-{version}-linux-x64.tar.gz
```
- Extract the downloaded tar.gz file with this command, for example:
```
tar -xvzf code-server-{version}-linux-x64.tar.gz
```
- Navigate to extracted directory with this command:
- Once in the SSH session, run the following commands to download and install the latest linux release

- Download the latest Linux release with this command:
```
cd code-server-{version}-linux-x64
bash <(curl -s https://raw.githubusercontent.com/codercom/code-server/master/scripts/update.sh)
```
- If you run into any permission errors when attempting to run the binary:
- Navigate to the `code-server` directory with this command:
```
chmod +x code-server
cd ~/code-server-linux
```
> To ensure the connection between you and your server is encrypted view our guide on [securing your setup](../../security/ssl.md)
- Finally start the code-server
Expand Down
40 changes: 10 additions & 30 deletions doc/admin/install/google_cloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,40 +24,20 @@ If you're just starting out, we recommend [installing code-server locally](../..
```
gcloud compute ssh --zone [region] [instance name]
```

- Find the latest Linux release from this URL:
```
https://github.com/codercom/code-server/releases/latest
```

- Replace {version} in the following command with the version found on the releases page and run it (or just copy the download URL from the releases page):
```
wget https://github.com/codercom/code-server/releases/download/{version}/code-server-{version}-linux-x64.tar.gz
```

- Extract the downloaded tar.gz file with this command, for example:
```
tar -xvzf code-server-{version}-linux-x64.tar.gz
```

- Navigate to extracted directory with this command:
```
cd code-server-{version}-linux-x64
```

- Make the binary executable if you run into any errors regarding permission:
```
chmod +x code-server
```

> To ensure the connection between you and your server is encrypted view our guide on [securing your setup](../security/ssl.md)

- Download the latest Linux release with this command:
```
bash <(curl -s https://raw.githubusercontent.com/codercom/code-server/master/scripts/update.sh)
```
- Navigate to the `code-server` directory with this command:
```
cd ~/code-server-linux
```
> To ensure the connection between you and your server is encrypted view our guide on [securing your setup](../security/ssl.md)
- Start the code-server
```
sudo ./code-server -p 80
```

> For instructions on how to keep the server running after you end your SSH session please checkout [how to use systemd](https://www.linode.com/docs/quick-answers/linux/start-service-at-boot/) to start linux based services if they are killed
> For instructions on how to keep the server running after you end your SSH session please checkout [how to use systemd](https://www.linode.com/docs/quick-answers/linux/start-service-at-boot/) to start linux based services if they are killed

- Access code-server from the public IP of your Google Cloud instance we noted earlier in your browser.
> example: 32.32.32.234
Expand Down
23 changes: 23 additions & 0 deletions scripts/update.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash


# Updates Code Server to the latest version
case $(uname -s) in
Darwin) # Mac
curl -s https://api.github.com/repos/codercom/code-server/releases/latest | \
grep "browser_download_url.*code-server.*darwin-x64.zip" | cut -d '"' -f 4 | \
awk '{print "url = "$1""}' | curl --create-dirs -o ~/code-server-darwin.zip --progress-bar -LK -
mkdir -p ~/code-server-darwin && tar -C "$_" xpvf ~/code-server-darwin.zip
chmod +x ~/code-server-darwin/code-server
;;
Linux)
curl -s https://api.github.com/repos/codercom/code-server/releases/latest | \
grep "browser_download_url.*code-server.*linux-x64.tar.gz" | cut -d '"' -f 4 | \
wget -O ~/code-server-linux.tar.gz --show-progress -qi -
mkdir -p ~/code-server-linux && tar -xzvf ~/code-server-linux.tar.gz --strip 1 -C "$_"
chmod +x ~/code-server-linux/code-server
;;
*)
echo "Unsupported operating system"
;;
esac