If you have an older laptop collecting dust, you can breathe new life into it by turning it into a dedicated local AI server. This setup allows you to offload resource-heavy Large Language Models (LLMs) to a separate machine, keeping your main development desktop lightweight and fast.
This comprehensive guide covers preparing a bootable drive, installing a lightweight Linux OS, configuring Ollama to accept external connections, and bridging it seamlessly with your existing desktop VS Code setup without overriding current AI workflows.
PHASE 1 / PREPARE THE SERVER
Preparing and installing Linux
To ensure maximum performance on older hardware, use a lightweight, stable Linux distribution such as Ubuntu Server or Debian. Since these distributions do not require a heavy graphical user interface (GUI), they preserve precious RAM and CPU cycles entirely for running your models.
- Download the operating system image. Navigate to the official download page of your chosen distribution (e.g., Ubuntu Server LTS) and download the .iso file to your main desktop machine.
- Flash the installer to a USB drive. Insert a USB flash drive (at least 4 GB) into your desktop. Download a flashing utility like Rufus (Windows) or BalenaEtcher (cross-platform). Select your downloaded .iso file, select your flash drive, and click Flash/Write to create a bootable installer.
- Boot the old laptop from USB. Turn off your target laptop. Insert the bootable USB drive. Turn the laptop back on while repeatedly tapping your system's boot menu key (typically F12, F11, F9, or Esc depending on the manufacturer). Select the USB flash drive from the boot menu.
- Complete the OS installation. Follow the on-screen prompts to partition your drive. Select the option to format the entire hard drive for a clean installation. When prompted, ensure you check the box to Install OpenSSH Server—this allows you to manage the laptop remotely without needing a dedicated monitor, keyboard, or mouse later on. Once complete, remove the USB drive and reboot.
PHASE 2 / INSTALL OLLAMA
Install Ollama and choose a model
Once your Linux machine is up and running, log in and prepare the environment for Ollama.
- Download and install Ollama. Run the installation command in your Linux terminal:
bashcurl -fsSL https://ollama.com | sh- Pull your preferred AI model. Download a model appropriate for your laptop's hardware specifications (e.g., llama3, mistral, or a lightweight coding model like qwen2.5-coder:1.5b or deepseek-coder):
bashollama pull llama3PHASE 3 / NETWORKING
Networking and cross-machine troubleshooting
By default, Ollama listens on the local machine. To allow your desktop to talk to the laptop, configure its network binding and firewall rules.
Step 1: Find the laptop's network address
Identify your laptop's private local IP address by running this network routing utility:
baship route get 1 | awk '{print $7;exit}'Note down the resulting IP address (e.g., 192.168.1.50). Both machines must reside on the same local network subnet.
Step 2: Open Ollama to the local network
If your environment does not leverage standard systemd management utilities, you can pass the network binding configuration directly into the runtime session environment.
- Launch with global bindings. Terminate any standalone processes and explicitly initialize the backend engine bound to all local interfaces (0.0.0.0):
bashOLLAMA_HOST=0.0.0.0 ollama serve- Audit active listening ports. In a separate terminal session on the laptop, execute a sockets status audit to verify the server is listening broadly:
bashss -tlnp | grep 11434Successful confirmation status will output: LISTEN 0 4096 *:11434.
Step 3: Configure the firewall
If your devices successfully ping each other but your browser requests time out, software barriers may be dropping incoming packets. Permit TCP routing through port 11434 on the Linux host:
bashsudo ufw allow 11434/tcp
sudo ufw reloadFrom your primary desktop machine, open a browser and visit the laptop's network endpoint:
texthttp://<YOUR_LAPTOP_IP>:11434When configured correctly, the screen will read: “Ollama is running”.
Step 4: Make the network configuration permanent
- Open your user profile environment configuration file:
bashnano ~/.bashrc- Append the host assignment to the very bottom line of the script:
bashexport OLLAMA_HOST=0.0.0.0Save and close (Ctrl+O, Enter, then Ctrl+X).
PHASE 4 / VS CODE
Integrate with VS Code without overriding existing AI workflows
One of the best aspects of this architecture is that adding a local Ollama server will not break, override, or clash with your existing cloud-based AI tools (like GitHub Copilot or Codex extensions). They live as distinct entities inside your development workspace.
While your existing extensions continue to handle standard ghost-text code completions inline, you can add a modular extension like Continue to handle dedicated deep-chat windows powered entirely by your laptop.
Step-by-step integration with the Continue extension
- Install the extension. Open VS Code on your desktop, navigate to the Extensions Marketplace (Ctrl+Shift+X), and search for and install Continue.
- Access the configuration. Click on the new Continue icon in your left activity sidebar. Locate and select the gear icon positioned in the lower-right quadrant of the interface panel to open your workspace config.json file.
- Append the offloaded model mapping. Within the models array layout, inject a customized JSON block pointing to your laptop's network resource. You can maintain your other providers in the same array:
json{
"models": [
{
"title": "Laptop Server (Llama 3)",
"provider": "ollama",
"model": "llama3",
"apiBase": "http://<YOUR_LAPTOP_IP>:11434"
}
]
}- Run and toggle seamlessly. Save your configuration file. You will now see your laptop's model inside the drop-down selector panel at the base of the Continue interface.
You can now use your cloud tools for high-speed autocomplete tabs, and switch over to your offline, private Linux server whenever you want to process large text files, perform code structural refactoring, or analyze complex data blocks locally.
