|
| 1 | +--- |
| 2 | +title: 'Installing an AI agent on an OVHcloud VPS' |
| 3 | +excerpt: 'Find out how to deploy an AI agent like OpenInterpreter or GPT4All on an OVHcloud VPS' |
| 4 | +updated: 2025-06-26 |
| 5 | +--- |
| 6 | + |
| 7 | +## Objective |
| 8 | + |
| 9 | +This guide explains how to deploy an on-premises AI agent on an OVHcloud VPS, without depending on the cloud of external providers. You will use a ready-to-use Docker container containing an open-source AI agent, such as [OpenInterpreter](https://github.com/KillianLucas/open-interpreter), [GPT4All](https://github.com/nomic-ai/gpt4all) or [Auto-GPT](https://github.com/Torantulino/Auto-GPT). |
| 10 | + |
| 11 | +**Find out how to deploy an AI agent such as OpenInterpreter or GPT4All on an OVHcloud VPS.** |
| 12 | + |
| 13 | +## Requirements |
| 14 | + |
| 15 | +- You must have a [VPS](https://www.ovhcloud.com/en-gb/vps/) that works (Debian 11 or higher is recommended) |
| 16 | +- administrative (sudo) access to your server via SSH |
| 17 | +- Python ≥ 3.10 installed on the VPS |
| 18 | + |
| 19 | +## In practice |
| 20 | + |
| 21 | +### Update your VPS and install Python <a name="step1"></a> |
| 22 | + |
| 23 | +Open a terminal and connect to your VPS with the following command (replacing `IP_DU_VPS` with the real IP): |
| 24 | + |
| 25 | +‘bash |
| 26 | +ssh <user>@IP_VPS |
| 27 | +“ |
| 28 | + |
| 29 | +Update the packages: |
| 30 | + |
| 31 | +‘bash |
| 32 | +sudo apt update && sudo apt upgrade -y |
| 33 | +“ |
| 34 | + |
| 35 | +Verify that Python ≥ 3.10 is installed: |
| 36 | + |
| 37 | +‘bash |
| 38 | +python3 --version |
| 39 | +“ |
| 40 | + |
| 41 | +If necessary, install Python 3.10+ and pip: |
| 42 | + |
| 43 | +‘bash |
| 44 | +sudo apt install -y python3 python3-pip python3-venv |
| 45 | +“ |
| 46 | + |
| 47 | +### Create a virtual environment and install Open Interpreter <a name="step2"></a> |
| 48 | + |
| 49 | +Recent environments limit the use of “pip” globally. It is recommended that you create and use a virtual environment: |
| 50 | + |
| 51 | +‘bash |
| 52 | +python3 -m venv ~/venv-openinterpreter |
| 53 | +source ~/venv-openinterpreter/bin/activate |
| 54 | +“ |
| 55 | + |
| 56 | +Install Open Interpreter: |
| 57 | + |
| 58 | +‘bash |
| 59 | +pip install --upgrade pip |
| 60 | +pip install open-interpreter |
| 61 | +“ |
| 62 | + |
| 63 | +### Configure an AI template for the agent (local or remote) <a name="step3"></a> |
| 64 | + |
| 65 | +#### Option 1 - Use OpenAI (GPT-4o, GPT-3.5, etc.) |
| 66 | + |
| 67 | +You must have an OpenAI API key. Add it when you launch it for the first time, or set it beforehand: |
| 68 | + |
| 69 | +‘bash |
| 70 | +export OPENAI_API_KEY="API_KEY" |
| 71 | +interpret |
| 72 | +“ |
| 73 | + |
| 74 | +Then follow the instructions. |
| 75 | + |
| 76 | +#### Option 2 - Use a local model (via Ollama) |
| 77 | + |
| 78 | +If you do not want to use OpenAI, run a local model using Ollama: |
| 79 | + |
| 80 | +‘bash |
| 81 | +interpreter --local |
| 82 | +“ |
| 83 | + |
| 84 | +This will give you several options (Ollama, LM Studio, etc.). We recommend using Ollama, as it is easy to install and compatible with several modern models such as `llama3` or `mistral`. |
| 85 | + |
| 86 | +Install Ollama: |
| 87 | + |
| 88 | +‘bash |
| 89 | +sudo apt install curl -y |
| 90 | +curl -fsSL https://ollama.com/install.sh | sh |
| 91 | +exec $SHELL |
| 92 | +“ |
| 93 | + |
| 94 | +Load the model: |
| 95 | + |
| 96 | +‘bash |
| 97 | +ollama pull mistral |
| 98 | +“ |
| 99 | + |
| 100 | +Then try again: |
| 101 | + |
| 102 | +‘bash |
| 103 | +interpreter --local |
| 104 | +“ |
| 105 | + |
| 106 | +#### Common errors |
| 107 | + |
| 108 | +**Model requires more system memory (6 GiB) than is available (1 GiB)** |
| 109 | + |
| 110 | +This error indicates that your VPS does not have enough RAM. Here are your options: |
| 111 | + |
| 112 | +- Change machine with at least 8GB RAM. |
| 113 | +- Use the OpenAI API (see `Option 1` above). |
| 114 | +- Use a lighter model, like mistral. |
| 115 | + |
| 116 | +### Test your AI Agent <a name="step4"></a> |
| 117 | + |
| 118 | +Test the following use cases: |
| 119 | + |
| 120 | +“console |
| 121 | +What is in the /tmp folder? |
| 122 | +“ |
| 123 | + |
| 124 | +Sample response: |
| 125 | + |
| 126 | +{.thumbnail} |
| 127 | + |
| 128 | +“console |
| 129 | +Writes a Python script that lists the files in the current folder. |
| 130 | +“ |
| 131 | + |
| 132 | +The agent interprets your request, generates code, and executes it locally. |
| 133 | + |
| 134 | +Sample response: |
| 135 | + |
| 136 | +{.thumbnail} |
| 137 | + |
| 138 | +### Conclusion <a name="step5"></a> |
| 139 | + |
| 140 | +With this guide, you have installed an AI agent on your OVHcloud VPS, capable of executing commands from simple natural language instructions. Whether you have opted for a remote model like GPT-4 via OpenAI or a local model like Mistral via Ollama, you now have an intelligent assistant directly in your terminal, without dependency on a web interface or a third-party service. |
| 141 | + |
| 142 | +## Go further |
| 143 | + |
| 144 | +For specialized services (SEO, development, etc.), contact [OVHcloud partners](https://partner.ovhcloud.com/en-ca/directory/) |
| 145 | + |
| 146 | +Join our [community of users](/links/community). |
0 commit comments