Openvscode
Overview
Deploy a full-featured web-based IDE with local AI coder (Llama 3 via Ollama), automation via n8n, secure HTTPS with Nginx & Certbot, and robust system security on a dedicated Ubuntu 24.04 LTS VPS/server. The final product delivers browser access at https://ide.illuni.in with AI chat, code generation, and workflow automation tools.<ref name="1"/><ref name="2"/><ref name="4"/><ref name="6"/>
Requirements
- OS
Ubuntu 24.04 LTS (64-bit)
- Hardware
Minimum 8 vCPUs, 12 GB RAM, 100 GB SSD
- Network
Incoming ports 22 (SSH), 80/443 (HTTP/HTTPS)
- Domain
A-record for ide.illuni.in pointed to server IP
- Security
SSH key auth only, UFW firewall, Fail2Ban, unattended-upgrades enabled<ref name="4"/>
System Preparation
Update System and Install Essentials
<syntaxhighlight lang="bash"> apt update && apt -y upgrade apt -y install software-properties-common git unzip curl wget tar ufw fail2ban ca-certificates </syntaxhighlight>
Harden Security
Configure firewall: <syntaxhighlight lang="bash"> ufw allow 22 ufw allow 80 ufw allow 443 ufw enable </syntaxhighlight>
Set up Fail2Ban and enable automatic upgrades: <syntaxhighlight lang="bash"> systemctl enable --now fail2ban apt install unattended-upgrades dpkg-reconfigure unattended-upgrades </syntaxhighlight>
Use SSH key authentication—disable password login in /etc/ssh/sshd_config (PasswordAuthentication no).<ref name="4"/>
OpenVSCode Server Installation
Create Directory & Download
<syntaxhighlight lang="bash"> cd /opt sudo mkdir openvscode-server sudo chown $USER:$USER openvscode-server cd openvscode-server curl -L https://github.com/gitpod-io/openvscode-server/releases/download/openvscode-server-v1.103.1/openvscode-server-v1.103.1-linux-x64.tar.gz -o openvscode-server.tar.gz tar -xzf openvscode-server.tar.gz --strip-components=1 rm openvscode-server.tar.gz </syntaxhighlight>
Create Service User
<syntaxhighlight lang="bash"> useradd -m -s /bin/bash vscode chown -R vscode:vscode /opt/openvscode-server </syntaxhighlight>
Setup systemd Service
Create /etc/systemd/system/openvscode.service:
<syntaxhighlight lang="ini">
[Unit]
Description=OpenVSCode Server
After=network.target
[Service] Type=simple User=vscode WorkingDirectory=/opt/openvscode-server ExecStart=/opt/openvscode-server/bin/openvscode-server --host 0.0.0.0 --port 3100 --without-connection-token Restart=always RestartSec=3
[Install] WantedBy=multi-user.target </syntaxhighlight>
Load and start the service: <syntaxhighlight lang="bash"> sudo systemctl daemon-reload sudo systemctl enable --now openvscode sudo systemctl status openvscode ss -tulpn | grep 3100 </syntaxhighlight>
Ollama Installation (Local AI Models)
Install Ollama
<syntaxhighlight lang="bash"> curl -fsSL https://ollama.com/install.sh | sh </syntaxhighlight>
Confirm install: <syntaxhighlight lang="bash"> ollama --version </syntaxhighlight>
Pull AI Models
<syntaxhighlight lang="bash"> /usr/local/bin/ollama pull llama3 /usr/local/bin/ollama pull codellama:7b /usr/local/bin/ollama pull mistral:latest /usr/local/bin/ollama list </syntaxhighlight>
Configure Ollama as a Service (open to network)
Edit /etc/systemd/system/ollama.service:
<syntaxhighlight lang="ini">
[Unit]
Description=Ollama AI Service
After=network.target
[Service] Type=simple User=root ExecStart=/usr/local/bin/ollama --host 0.0.0.0 --port 11434 serve Restart=always RestartSec=5
[Install] WantedBy=multi-user.target </syntaxhighlight>
Reload and start service: <syntaxhighlight lang="bash"> sudo systemctl daemon-reload sudo systemctl enable --now ollama sudo systemctl status ollama ss -tulpn | grep 11434 </syntaxhighlight>
Nginx Reverse Proxy with HTTPS (Certbot)
Install Nginx
<syntaxhighlight lang="bash"> sudo apt install nginx -y sudo systemctl enable --now nginx sudo systemctl status nginx </syntaxhighlight>
Configure Reverse Proxy
Create /etc/nginx/sites-available/openvscode.conf:
<syntaxhighlight lang="nginx">
server {
listen 80;
server_name ide.illuni.in;
location / {
proxy_pass http://127.0.0.1:3100;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
</syntaxhighlight>
Enable config: <syntaxhighlight lang="bash"> ln -sf /etc/nginx/sites-available/openvscode.conf /etc/nginx/sites-enabled/openvscode.conf sudo nginx -t sudo systemctl reload nginx </syntaxhighlight>
Install Certbot and Issue SSL
<syntaxhighlight lang="bash"> sudo apt install certbot python3-certbot-nginx -y sudo certbot --nginx -d "ide.illuni.in" -m "admin@illuni.in" --agree-tos -n sudo systemctl reload nginx </syntaxhighlight>
Certbot automates SSL certificate provisioning and renewal.<ref name="4"/>
Install n8n (Automation Tool)
Follow official n8n installation guide for Ubuntu. Example for npm: <syntaxhighlight lang="bash"> npm install -g n8n n8n start </syntaxhighlight>
For production, consider running n8n as a systemd service and configuring a reverse proxy.
Install and Configure Continue Extension
Access OpenVSCode: Visit https://ide.illuni.in/ Install Continue Extension: In the left sidebar, find the Extensions pane, search for "Continue", and click Install.<ref name="5"/><ref name="2"/> Configure Continue for Ollama:
Open a terminal in OpenVSCode as vscode user:
<syntaxhighlight lang="bash">
mkdir -p ~/.continue
nano ~/.continue/config.json
</syntaxhighlight>
Paste (replace <SERVER_IP>):
<syntaxhighlight lang="json"> { "models": [ { "title": "Ollama (Llama 3)", "provider": "ollama", "model": "llama3", "api_base": "http://<SERVER_IP>:11434" } ] } </syntaxhighlight>
Confirm connection: <syntaxhighlight lang="bash"> curl http://<SERVER_IP>:11434/api/tags </syntaxhighlight>
Reload/refresh the Continue extension UI.
Final Verification
Open https://ide.illuni.in/ in browser.
Try out code completion, AI chat, and automation workflows.
Confirm secure HTTPS lock; certificates should auto-renew via Certbot.
Ensure only SSH key authentication is allowed; periodic security updates run automatically.
Conclusion
This setup delivers a secure, scalable, browser IDE with local AI coding assistant and workflow automation—all on Ubuntu 24.04 LTS. This workflow is suitable for remote development teams, solo devs, and anyone needing advanced code capabilities balanced with maximum data control and security.
References
<references/>