Self-hosted
AI coding assistant with private code
Tabby for inline completion and Continue for in-editor chat, both pointed at a local model served by vLLM. Continue can be installed from a downloaded extension file and configured against local models for air-gapped environments; telemetry is switched off deliberately.
- Source
- Editorial recipe — no step evidence has been fetched yet
- Verified
- Evidence not verified
- Confidence
- Low
01Objective
Give developers completion and chat inside their editor while the source code, the prompts and the completions stay on infrastructure the company controls.
02Recommended stack
| Role | Component |
|---|---|
| Gatewayoptional | LiteLLM |
| Inference | Qwen2.5-32B-Instruct or Qwen3-32B for chat and edit |
| Inference | Tabby |
| Inference | vLLM serving a code-capable model |
| Ui | Continue (VS Code and JetBrains) |
Architecture and data flow
Components
- Developers (IDE: Continue + Tabby extensions) — people
- LiteLLM gateway (per-developer keys) — network, optional
- Tabby server (completion + chat) — application
- Gateway usage log — database
- vLLM (chat and edit model) — inference server
- Qwen2.5-32B-Instruct · completion model — model
- Shared GPU server (48 GB) — hardware
Connections
- Developers (IDE: Continue + Tabby extensions) to LiteLLM gateway (per-developer keys) — HTTPS (confidential data)
- LiteLLM gateway (per-developer keys) to Tabby server (completion + chat) — reverse proxy (confidential data)
- Tabby server (completion + chat) to Gateway usage log — chats, users, settings (personal data)
- Tabby server (completion + chat) to vLLM (chat and edit model) — prompt (confidential data)
- vLLM (chat and edit model) to Qwen2.5-32B-Instruct · completion model — loaded weights
- Qwen2.5-32B-Instruct · completion model to Shared GPU server (48 GB) — GPU memory
- vLLM (chat and edit model) to Shared GPU server (48 GB) — GPU memory
External data transfer · NONE
DashedOptional — not included in the cost or the hardware sizing: LiteLLM gateway (per-developer keys).
- No edge in this design crosses out of the company network.
- Source code, prompts and completions stay inside the network. Verify by packet capture from a developer machine, since IDE extensions can have their own telemetry endpoints.
- Model weights are downloaded once at setup; an air-gapped install copies them in by hand.
03Suitable for
- Organisation size
- 5–1000 employees
- Data classes
- confidential
- Constraints
- a contractual, regulatory or policy reason the code cannot go to a hosted assistant; a 48 GB GPU for a 32B model shared by a team, or 24 GB for a smaller model; developers who will tell you honestly whether it is good enough — it may not be
- Industries
- Technology, Financial services, Public sector, Telecommunications
- Jurisdictions
- European union
04Hardware
On-premise single 24 GB GPU server
- GPU
- NVIDIA RTX 4090 24 GB (or NVIDIA L4 24 GB for a rack-mounted, 72 W alternative)
- VRAM
- 24 GB
- System RAM
- 64 GB
- Storage
- 2000 GB
- CPU
- 16-core x86 server CPU (AMD EPYC 7003/9004 or Intel Xeon Scalable)
- Form factor
- Tower server
Indicative costUS$4,000 – US$9,000
indicative build cost for the complete machine, USD, Aug 2026 — verify with a local supplier
The default box for a 20–60 person firm. Fits a 14B model at 4-bit with roughly 8 GB of KV cache left for concurrent chat, or an 8B model at fp16. NVMe storage sized for the model cache plus a document corpus and its embeddings. Add a UPS and an offsite backup target — this machine holds the whole knowledge base.
On-premise single 48 GB GPU server
- GPU
- NVIDIA L40S 48 GB (rack) or NVIDIA RTX 6000 Ada 48 GB (office workstation)
- VRAM
- 48 GB
- System RAM
- 128 GB
- Storage
- 4000 GB
- CPU
- 24–32-core x86 server CPU (AMD EPYC or Intel Xeon Scalable)
- Form factor
- Rack server
Indicative costUS$12,000 – US$22,000
indicative build cost for the complete machine, USD, Aug 2026 — verify with a local supplier
The step up when answer quality matters more than price: a 32B model at 4-bit with generous KV cache, or a 14B model at fp16 with a long context. ECC memory and a standard 2U chassis mean it belongs in a rack or comms room rather than under a desk.
Cloud GPU instance — 1–2 × NVIDIA A100 80 GB
- GPU
- NVIDIA A100 80 GB (AWS P4d, Azure NDasr A100 v4, GCP A2)
- VRAM
- 80 GB
- System RAM
- 256 GB
- Storage
- 2000 GB
- CPU
- 24–48 vCPU
- Form factor
- Cloud instance
Indicative costUS$2 – US$12
indicative on-demand rental, USD per hour, Aug 2026 — verify against the provider price list for your region
For 32B models with long context, or 70B-class models on two cards. The band covers one to two GPUs and the gap between committed-use and on-demand rates. Check that the GPU family you need exists in the region you are required to stay in before committing to a design.
Indicative costUSD · one-off plus monthly
- Software licences
- All components are open source and self-installed. Check each licence for use limits.
- US$0
- Model usage
- Open weights served locally: no per-token charge. The GPU cost sits under infrastructure.
- US$0
- Shared GPU server (48 GB class)
- Hardware profile onprem-medium-48gb — indicative build cost, Aug 2026, verify locally.
- US$12,000 – US$22,000
- Implementation (5–12 FDE-days)
- 5–12 FDE-days at US$760–1940 per day, converted from the HK$6,000–15,000 band at the HKMA Linked Exchange Rate band of HK$7.75–7.85 to one US dollar. One-off; excludes internal staff time.
- US$3,800 – US$23,280
- 5–30 developers sharing one GPU server; heavier completion traffic needs a second card.
- Compare against per-seat hosted assistant pricing over three years before deciding — for a small team the hosted option is usually cheaper, which is why the constraint has to be real.
- Every figure is an assessment from the inputs listed, not a quotation.
05Difficulty
3 / 5
A project week with Linux, Docker and GPU experience
06Skills
- Change managementchange-management
- operations
- Dockerdocker
- infrastructure
- Linuxlinux
- operations
- LLM inferencellm-inference
- ml
- Networkingnetworking
- networking
- Security hardeningsecurity-hardening
- security
07Deployment steps
Commands are copied from each project’s own documentation, and the page they came from is linked under the step. 0 of 7 steps currently open an evidence record. The rest are linked to their source; §10 says which of those documents were fetched and which were fetched without their anchor being found — two different states, named differently there.
- 01
Write down the actual constraint
AssessmentIs it a client contract, a regulator, an internal policy, or a preference? The answer sets the bar: a contract that forbids third-party processing rules out hosted assistants entirely, while a policy might be satisfied by a vendor with a zero-retention commitment. Self-hosting costs quality, so be sure the constraint is real before paying for it.
- 02
Serve the chat model with vLLMversion-sensitive
AssessmentStart vLLM as an OpenAI-compatible endpoint on the shared GPU and set an API key. One 48 GB card comfortably serves in-editor chat for a small team; completion traffic is far heavier and is handled separately below.
docker run --runtime nvidia --gpus all \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=$HF_TOKEN" \ -p 8000:8000 \ --ipc=host \ vllm/vllm-openai:latest \ --model Qwen/Qwen3-0.6Bfrom the vLLM docs — substitute the model you sized for
- 03
Run Tabby for inline completionversion-sensitive
AssessmentTabby runs in Docker with the GPU attached, serving a completion model and a chat model together, and exposes its UI on port 8080. Completion latency is what developers judge: measure it at the editor, not at the server.
docker run -d \ --name tabby \ --gpus all \ -p 8080:8080 \ -v $HOME/.tabby:/data \ registry.tabbyml.com/tabbyml/tabby \ serve \ --model StarCoder-1B \ --chat-model Qwen2-1.5B-Instruct \ --device cudafrom the Tabby docs — substitute the models you have chosen
docker logs -f tabby - 04
Configure Continue against the local endpointversion-sensitive
AssessmentContinue reaches any OpenAI-compatible server: "either Continue will have a built-in provider or the API you use will be OpenAI-compatible, in which case you can use the \"openai\" provider and change the \"baseUrl\" to point to the server". Ship one `config.yaml` to the team so everybody gets the same models and rules.
- 05
Turn off telemetry and install offline where required
AssessmentFor an air-gapped or strictly controlled environment, Continue documents the offline path: download the extension file from the releases page and install it into VS Code, turn off "Allow Anonymous Telemetry" in the user settings, point the default model at a local one, and restart the editor. Verify with a network capture rather than trusting the setting.
- 06
Issue per-developer keys through a gatewayversion-sensitive
AssessmentA gateway gives you one endpoint, a key per developer and a usage log. It is also how you find out, six weeks later, whether anyone is actually using the thing — which is the question that decides whether to buy a bigger GPU. LiteLLM, cited below, is the gateway these commands run; it is optional in the sense that you can point IDEs straight at vLLM and give up the per-developer keys and the spend log with it.
curl -sSL https://docs.litellm.ai/docker-compose.yml | docker compose -f - up -d - 07
Trial with volunteers and ask a blunt question
AssessmentGive it to five willing developers for three weeks, then ask whether they would object to it being taken away. That answer is worth more than any benchmark. If it is lukewarm, the honest options are a bigger model, a bigger GPU, or revisiting the constraint.
08Compliance considerations
Structured issue-spotting to support your own review — not legal advice. Verify against the cited primary sources and your counsel.
Applies everywhere
Intellectual property · Copyrightmedium
Generated code carries licensing questions of its own. Record which model produced substantial contributions, keep the model licence on file, and check whether client contracts require disclosure of AI-assisted development.
Confidentiality · Securityhigh
The entire point is that the codebase stays inside. Confirm it with a network capture from a developer machine, not with a configuration screenshot — an IDE extension can have more than one outbound path.
Open-source licensingmedium
Check the licence of the completion model as well as the server. Some code models carry use restrictions that a permissive server licence does not remove.
Logging · Transparencymedium
Gateway logs may contain source code. Decide whether to log request bodies at all, and tell developers what is recorded.
09Alternatives
A hosted assistant with an enterprise agreement
Materially better completions today. Enterprise plans offer contractual commitments on training and retention — read them against your actual constraint before ruling them out.
- — Best-in-class quality, nothing to run
- — Source code is processed by a third party under contract
- — Per-seat cost that scales with the team
Local models on each developer machine
Ollama on a workstation with a small model: no shared server, no gateway, nothing to operate. Good enough for completion on modern laptops.
- — No infrastructure at all
- — Model size limited by the laptop, and no central view of usage or configuration
No alternative recipe is published yet.
10Evidence
Not yet in the ledger
not yet fetched
not yet fetched
not yet fetched
not yet fetched
not yet fetched
not yet fetched
11Community
Deployed this stack, or hit something this page does not cover? Corrections, sources and implementation reports are what keep a recipe worth reading.
Improve this page
Sign in to contribute
From the field
0 deployments · 0 questions
Nobody has reported deploying this here yet, and no question has been opened against this page. Both appear once a reviewer accepts them.
12Hire an FDE
If you would rather not build it, we can introduce a forward-deployed engineer who has deployed this stack before. The enquiry form starts from this recipe.