Install vs code server manual di ubuntu server


Ada kalanya ketika kita mau remote ssh ke server proses install vscode server berjalan lama atau malah stuck di install vscode server berikut ini langkah2nya kalau kita mau install manual mudah2an bermanfaat

Masuk ke remote server kemudian tuliskan script dibawah

#!/bin/bash

# Install dependencies
sudo apt update
sudo apt install -y curl

# Download Visual Studio Code Server
curl -fsSL https://code-server.dev/install.sh | sh

# Configure code-server service
cat <<EOT | sudo tee /etc/systemd/system/code-server.service > /dev/null
[Unit]
Description=code-server
After=network.target

[Service]
Type=simple
Environment=PASSWORD=your_password_here
ExecStart=/usr/bin/code-server --bind-addr=127.0.0.1:8080 --user-data-dir=/home/your_username_here/.code-server --auth=none
User=your_username_here
Group=your_username_here
WorkingDirectory=/home/your_username_here

[Install]
WantedBy=multi-user.target
EOT

# Enable and start code-server service
sudo systemctl daemon-reload
sudo systemctl enable code-server.service
sudo systemctl start code-server.service

# Optional: set up automatic startup on boot
sudo systemctl enable code-server.service

echo "Visual Studio Code Server has been installed and configured."





kemudian chmod +x namascript.sh kemudian jalankan dengan ./namascript.sh

Dan jangan lupa ganti variable2 seperti password, username,directory dll

Semoga berhasil dan bermanfaat, Happy Coding

Advertisement

Author: susiloharjo

Khoirunnas anfa'ahum linnas A Father, Husband and love to learn person Love my Family, Electronics, Photography, Robot, Dreaming, Programming

Ditunggu komennya ...

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: