💻

Setsi sa khoutu

Lisebelisoa tsa Nts'etsopele

Khoutu ea VS e sebetsang ka har'a sebatli bakeng sa nts'etsopele e hole kae kapa kae

Lintlha tsa ho kenya

Ho romelloa ha basebetsi: 2-5 min
sehlopha: Lisebelisoa tsa Nts'etsopele
RAM e tlase: 1024MB
Tšehetso: Litekete le imeile

Tseba lengolo lena

Tlhaloso

Code-server ke VS Code e sebetsang ka browser ea hao, e u fang matla a IDE ea desktop e tummeng ea Microsoft e fumanehang ho sesebelisoa sefe kapa sefe se nang le browser ea webo. E hahiloe 'me e hlokomeloa ke Coder, code-server e u lumella ho ngola, ho lokisa liphoso le ho romella khoutu ho sebaka sefe kapa sefe, joalo ka tablet ea hau, Chromebook kapa komporo efe kapa efe, ha tikoloho ea hau ea nts'etsopele e sebetsa ho server e matla ea kantle.

Sebopeho sa code-server ke hore se fana ka boiphihlelo bo tšoanang le VS Code bo tsebang le bo ratoang ka tsona, empa bo fumanehang ka browser ea webo. Likarolo tsohle li teng: ho phethela khoutu ka IntelliSense, ho lokisa liphoso, terminal e kopantsoeng, kopanyo ea Git, mmaraka oa li-extension o nang le li-plugin tse makete a mangata, le sebopeho se tsebahalang. Phapang feela ke hore u fihlella ka HTTPS ntle le ho sebetsa lehae, empa boiphihlelo ba ho hlophisa bo utloahala e le sa tlhaho 'me bo arabela.

Ho sebetsa ka tikoloho ea hau ea nts'etsopele ho server ho fana ka melemo e mengata haholo. U fumana tikoloho e tsitsitseng le e ka pheta-phetoa ho lihlopha tsohle tsa hau, e felisang mathata a "ho sebetsa ka komporo ea ka" ka ho sa feleng. Hardware e matla ea server e bolela ho haha, ho leka le ho sekaseka ka potlako ho feta li-laptop tsa lehae. Khoutu ea hau le boemo ba nts'etsopele li lula li fumaneha ho sesebelisoa sefe kapa sefe, e etsang hore e be molemo bakeng sa mosebetsi oa kae kapa oa kantle, ho fetoha lisebelisoa kapa ho sebetsa ka pair programming le basebetsi-'moho.

Polokeho le sephiri li hahelitsoe moralong oa code-server. Puisano eohle pakeng tsa browser ea hao le server e enkripshiloe ka TLS/SSL. Netefatso ea mantsoe a sephiri le OAuth2 ea khetho ka proxy ea reverse e sirelletsa phihlello ea tikoloho ea hau ea nts'etsopele. Khoutu ea hau ha e tsoe server ntle le haeba u e romella ka mokhoa o hlakileng ho version control, e etsa hore e be molemo bakeng sa ho sebetsa ka likhoutu tse nang le data e bohlokoa kapa ho latela melao ea polokeho e thibelang khoutu likhomphuteng tsa lehae.

Code-server e tsoetse pele mesebetsing ea nts'etsopele ea maru. E romelle ho instance e matla ea maru e nang le inthanete e potlakileng, 'me u fumane ho kopanya khoutu ka potlako, ho kenya lipakeje ka potlako le bokhoni ba ho SSH ho li-server tsa production ho tsoa terminal e kopantsoeng. Port forwarding e kahare e u lumella ho bonts'a lits'ebetso tsa webo ka kotloloho ho browser ea hao, ka HTTPS e ikemetseng le netefatso. U ka sebetsa le likhoutu tse kholo ntle le ho tšoenyeha ka sebaka sa disk ea lehae kapa memori.

Tikoloho ea li-extension e pharalletse haholo, hoo li-extension tse ngata tsa VS Code li sebetsang ka bonolo le code-server. Tšehetso ea lipuo, linter, formatter, lihlooho le lisebelisoa tsa ts'ebetso tsohle li teng. U ka kopanya litlhophiso tsa hau le li-extension ho li-instance tse ngata ka ho khoma lifolo ea tlhophiso ea VS Code. Li-extension tse ling li ka hloka liphetoho tse nyane, empa marakeng oa motheo ho na le li-extension tse makete a mangata tse loketseng ho sebetsisoa.

Ha u le moqapi oa lenaneo ea sebetsang ka boits'oarelo lihoteleng tsa kofi, sehlopha sa kantle se hlokang tikoloho e tsitsitseng ea nts'etsopele, mosuoe ea rutang khoutu ka inthanete, kapa mokhatlo o kenyang melao ea polokeho ea zero-trust, code-server e fana ka lisebelisoa tsa nts'etsopele tsa boemo ba bonngoe, tse fumanehang sebakeng sefe kapa sefe ntle le ho senya likarolo kapa ts'ebetso.

Likarolo tsa bohlokoa

VS Code e Felletseng ho Browser

Boiphihlelo bo felletseng ba VS Code ka likarolo tsohle: IntelliSense, ho lokisa liphoso, li-extension, lihlooho le terminal e kopantsoeng

Sebetsa Sebakeng Sefe Kapa Sefe

Kena tikolohong ea hau ea nts'etsopele ho sesebelisoa sefe kapa sefe se nang le browser: li-tablet, li-Chromebook kapa komporo efe kapa efe

Nts'etsopele e Matla ea Kahole

Sebelisa hardware ea server bakeng sa compilation, tlhahlobo le lintho tse hahiloeng ha u ntse u hlophisa khoutu ka browser ka ho arabela

Tšehetso e Pharalletseng ea Li-extension

Fihlella li-extension tse makete a mangata tsa VS Code, ho kenyeletsoa li-language server, linter, formatter le lisebelisoa tsa ts'ebetso

E Sireletsehile ka Mokhoa oa Kamehla

Enkripshene ea TLS, netefatso ea lekhetho, OAuth2 ea khetho ka reverse proxy, le khoutu e lula server ho latela melao

Port Forwarding e Kahare

Bonts'a lits'ebetso tsa webo ka HTTPS e ikemetseng le tunneling ea netefatso ka code-server

Mehlala ea ho sebelisa

• Remote Development Teams: Tikoloho e tsitsitseng ea nts'etsopele bakeng sa lihlopha tse hasaneng, e nang le ho hlophisoa ka potlako
• Cloud-Native Development: Haha le ho leka lits'ebetso tsa maru ka kotloloho lisebelisoeng tsa maru haufi le production
• Education & Training: Rutang khoutu ka tikoloho e hlophisitsoeng pele e fumanehang ka link ea browser
• Contract & Consulting Work: Fumana likhoutu tsa bareki ka polokeho ntle le ho li jarolla lisebelisoeng tsa motho ka mong
• Mobile Development: Ngola khoutu ho iPad kapa tablet e nang le litšobotsi tsohle tsa IDE bakeng sa leeto kapa ho ngola khoutu nakong ea ho tsamaea
• High-Performance Computing: Sebelisa li-instance tse matla tsa maru bakeng sa likhoutu tse kholo, AI/ML, kapa merero e nang le compilation e ngata
• Zero Trust Security: Latela melao e hlokang hore khoutu e lule ho infrastructure ea mokhatlo

Litaelo tsa ho kenya

Kenyo ho Ubuntu 22.04 LTS:

1. Kenya ka Install Script (e khothalelitsoe):
curl -fsSL https://code-server.dev/install.sh | sh
2. Kapa kenya ka letsoho:
# Download latest release
VERSION=$(curl -s https://api.github.com/repos/coder/code-server/releases/latest | grep -oP '"tag_name": "v\K[^"]+')
wget https://github.com/coder/code-server/releases/download/v${VERSION}/code-server_${VERSION}_amd64.deb

# Install package
sudo dpkg -i code-server_${VERSION}_amd64.deb
3. Hlophisa code-server:
# Edit config file
nano ~/.config/code-server/config.yaml
Beha litlhophiso:
bind-addr: 0.0.0.0:8080
auth: password
password: your_secure_password_here
cert: false  # We'll use reverse proxy for SSL
4. Theha Tšebeletso ea Systemd:
sudo systemctl enable --now code-server@$USER
sudo systemctl status code-server@$USER
5. Hlophisa Nginx Reverse Proxy:
sudo apt install nginx -y
sudo nano /etc/nginx/sites-available/code-server
Kenya litlhophiso:
server {
    listen 80;
    server_name code.yourdomain.com;

    location / {
        proxy_pass http://127.0.0.1:8080;
        proxy_set_header Host $host;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection upgrade;
        proxy_set_header Accept-Encoding gzip;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}
Nolofalletsa sebaka:
sudo ln -s /etc/nginx/sites-available/code-server /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl restart nginx
6. Fumana Lengolo la SSL:
sudo apt install certbot python3-certbot-nginx -y
sudo certbot --nginx -d code.yourdomain.com
7. Kena ho code-server:
Bula browser ho https://code.yourdomain.com
- Kena ka lekhetho le tsoang ho config.yaml

8. Kenya Li-extension:
# Via command line
code-server --install-extension ms-python.python
code-server --install-extension esbenp.prettier-vscode

# Or use Extensions panel in UI
9. Hlophisa Firewall:
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw allow 22/tcp  # SSH
10. Boikhethelo: Kenyo ea Docker:
# Run code-server in Docker
docker run -it --name code-server -p 127.0.0.1:8080:8080 \
    -v "$HOME/.config:/home/coder/.config" \
    -v "$HOME/projects:/home/coder/projects" \
    -u "$(id -u):$(id -g)" \
    -e "DOCKER_USER=$USER" \
    codercom/code-server:latest

Litlhahiso tsa ho kenya

Litlhophiso tse Hlokahalang:

1. Faele ea Litlhophiso (~/.config/code-server/config.yaml):
bind-addr: 0.0.0.0:8080
auth: password
password: secure_password_here
cert: false
proxy-domain: code.yourdomain.com
2. Mekhoa ea Netefatso:
# Password authentication (default)
auth: password
password: your_password

# Disable authentication (dangerous, use with reverse proxy auth)
auth: none

# Use hashed password
hashed-password: "$argon2i$v=19$m=4096,t=3,p=1$..."
3. Lintho tsa Tikoloho:
# Set password via env
export PASSWORD="your_password"

# Disable telemetry
export TELEMETRY_LEVEL="off"

# Custom extensions directory
export EXTENSIONS_GALLERY='{"serviceUrl": "https://open-vsx.org/vscode/gallery"}'
4. Litlhophiso tsa Port Forwarding:
# Forward local dev server to public URL
# In code-server terminal:
npm run dev  # Starts on localhost:3000

# code-server automatically detects and offers to forward
# Access at: https://code.yourdomain.com/proxy/3000/
5. Litlhophiso tsa Li-extension:
# Install from marketplace
code-server --install-extension publisher.extension-name

# Install from VSIX
code-server --install-extension /path/to/extension.vsix

# List installed extensions
code-server --list-extensions

# Uninstall extension
code-server --uninstall-extension publisher.extension-name
6. Ho Kopanya Litlhophiso:
// settings.json location: ~/.local/share/code-server/User/settings.json
{
    "workbench.colorTheme": "Default Dark+",
    "editor.fontSize": 14,
    "editor.formatOnSave": true,
    "files.autoSave": "afterDelay",
    "terminal.integrated.shell.linux": "/bin/bash"
}
7. Setup ea Basebelisi ba Bangata:
# Create service for user1
sudo systemctl enable --now code-server@user1

# Create service for user2  
sudo systemctl enable --now code-server@user2

# Each user gets own config in their home directory
# ~/.config/code-server/config.yaml
8. Ho Matlafatsa Polokeho:
# Limit network access
bind-addr: 127.0.0.1:8080  # Only localhost

# Use strong password (20+ chars)
password: $(openssl rand -base64 32)

# Enable HTTPS on reverse proxy
# Use fail2ban for brute force protection
sudo apt install fail2ban

# Configure fail2ban for code-server
sudo nano /etc/fail2ban/jail.local
Kenya:
[nginx-code-server]
enabled = true
port = 80,443
filter = nginx-code-server
logpath = /var/log/nginx/access.log
maxretry = 3
bantime = 3600
9. Ntlafatso ea Ts'ebetso:
# Increase file watcher limit
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf
sudo sysctl -p

# Disable telemetry
export TELEMETRY_LEVEL=off

# Use faster protocol
# In settings.json:
{
    "terminal.integrated.rendererType": "dom"
}
10. Backup le Mafetoho:
# Backup user data
tar -czf code-server-backup.tar.gz \
    ~/.local/share/code-server \
    ~/.config/code-server

# Restore on new server
tar -xzf code-server-backup.tar.gz -C ~
Mekhoa e Molemo ka ho Fetisisa:
- Sebelisa reverse proxy (Nginx/Caddy) bakeng sa SSL termination
- Nolofalletsa HTTPS ea boits'oarelo ka Let's Encrypt
- Beha mantsoe a sephiri a matla (litlhaku tse 20+)
- Ntlafatsa code-server kamehla: curl -fsSL https://code-server.dev/install.sh | sh
- Khoma lifolo tsa merero ka mokhoa o arohaneng bakeng sa backup e bonolo
- Sebelisa systemd bakeng sa ho qala hape ka boits'oarelo ha ho hlaha phoso
- Hlophisa rate limiting ho reverse proxy
- Nolofalletsa fail2ban bakeng sa ts'ireletso khahlanong le brute force
- Sebelisa OAuth2 proxy bakeng sa kopanyo ea SSO
- Arola li-instance tsa dev/staging/prod ho mosebelisi kapa sehlopha ka seng
- Lekola li-log: journalctl -u code-server@$USER -f
- Hlophisa li-backup tse ikemetseng tsa data ea basebelisi le litlhophiso

Likopo tsa theknoloji

Litaelo tsa sistimi

  • Khopolo: 1024MB RAM

Lekanya Sengoloa sena

★★★★★
-
Ho kenya...

Na o se o loketse ho kenya kopo ya hao? Setsi sa khoutu?

Qala ka metsotsoana ka ts'ebetso ea rona e bonolo ea ho kenya VPS

Ho kenya ka ho ka bang 2 metsotso • Full root ho kena • Thuto ka terene le lengolo tsoibila