Hands-on tutorial
Tutorials · AI
How to Run a Private LLM on Your Own GPU Server
Serve an open large language model inside your network: choose a model that fits your GPU memory, run it in a container with an OpenAI-compatible API, and protect it with authentication, TLS and logging.
Before you start
- A GPU server with drivers and container support installed
- A model licence that allows your use
- A DNS name and certificate for the internal service
Step by step
Pick a model that fits
Estimate memory: about 2 bytes per parameter in FP16, 1 in 8-bit and 0.5 in 4-bit, plus 10 to 30% for active requests. Choose a size and quantisation that fit your total GPU memory with headroom.
Download the model to local storage
Store model files on the server's NVMe drives (or a nearby storage server) so restarts do not depend on the internet.
Start an inference server
Run an open-source inference server in a container, for example vLLM (OpenAI-compatible API) or Ollama for simpler setups. Give it access to the GPUs and the model folder, and split large models across several GPUs with the server's tensor-parallel option.
Test locally
Send a request with curl to the local API and check the answer, response time and GPU memory use.
Put a reverse proxy in front
Publish the API through a reverse proxy with TLS and an authentication method (API keys or single sign-on). Do not expose the inference port directly.
Restrict network access
Allow only the user and application VLANs that need the service, using firewall rules on the server and the network gateway.
Log and monitor
Keep access logs, watch GPU usage and response times, and set alerts for errors and high temperatures.
Write a usage policy
Tell users what data they may send, how long prompts are kept and who can read logs.
Pro tips
- Start with a smaller model and measure before buying more GPUs.
- Keep one GPU free for testing new models if you can.
- Back up the model folder and configuration with your normal backups.
Last reviewed:
FAQ
Frequently asked questions
Does the data leave my network?
No. The model runs on your server, so prompts and answers stay inside your network unless you connect it to outside services.
Can existing apps use it?
Many tools support the OpenAI-compatible API format; point them at your internal URL and key.
Keep learning
Related guides
NavCloud AI Insights turns alarms, inventory and telemetry from every site into a network health index and a short, prioritised list of findings with the action that fixes each one.
Read more →How to Set Up AI Smart Events on IP Cameras (Intrusion, Line Crossing, Human/Vehicle)AI cameras classify people and vehicles on the camera itself, so you get far fewer false alarms from trees, rain and animals. Configure smart events and record only what matters.
Read more →How to Plan the Network for AI Cameras and Video AnalyticsAI video means more streams, higher resolutions and analytics servers pulling video from many cameras. Size bandwidth, PoE and storage before you install.
Read more →Stuck on a step?
Ask Navijin technical support or an authorised partner for help with your configuration.