Writing Article

I'm Building a GPU PC, So I Made It a Private AI Server for My Friends

· 7 min read
Project GPUShare

I've been planning a new desktop build for a while. Nothing absurd, I'm thinking an RTX 5070 Ti that I can actually use for gaming, 3D rendering, and increasingly, AI inference. But as I started pricing it out, I kept thinking: this GPU is going to sit idle for most of the day. When I'm not using it, it could be running local models for people I trust, covering its own electricity cost in the process.

That turned into GPUShare: a self-hosted platform for sharing your GPU's idle compute with friends and family, billing them only for the electricity it uses. No cloud markup, no opaque pricing, no data leaving your house. Just hardware, your local grid, and a Cloudflare tunnel keeping it accessible from anywhere.


The Problem with Cloud AI

ChatGPT and Claude are free to use, but the infrastructure running them is not clean. U.S. data centres draw heavily from fossil fuels: natural gas supplies over 40% of their electricity, with coal adding another ~15%. 1 Water usage follows a similar pattern: Microsoft's consumption rose 34% year-on-year to 1.7 billion gallons in 2023. 2 This isn't a quirk of a few inefficient operators; it's how hyperscale inference works at the moment.

I'm based in New Zealand, where around 85% of electricity comes from renewables, mostly hydro and geothermal. 3 By Q4 2025, that figure was sitting at 96%. 4 When I run inference locally, it's overwhelmingly powered by rain falling on mountains, not methane combustion.

The same logic applies if you're in Norway, Iceland, or anywhere with a clean grid. Local inference isn't always greener than cloud; it depends entirely on where you are and where the data centre is. But if you're in a renewable-heavy country routing queries to a U.S. data centre, you're probably sending clean-grid requests through a coal-and-gas facility halfway around the world.


Your Prompts Stay on Your Machine

Every prompt you send to a cloud AI leaves your device and lands on a server you have no visibility into. OpenAI's privacy policy permits using conversations for model training unless you opt out; Anthropic's is similar. You're trusting that these companies handle your data responsibly and don't quietly shift their policies down the line.

With GPUShare, inference runs on hardware in your home. The model weights are on your disk. Conversations don't touch the internet beyond the Cloudflare tunnel routing requests to your machine, and that tunnel carries encrypted HTTPS traffic. Source code, medical information, business data: none of it leaves your local network in plaintext.

This is particularly useful if you're sharing access with people who don't think much about what they type into chat interfaces.


What It Actually Costs

GPUShare meters inference by electricity consumed:

cost = GPU watts × inference time × electricity rate per kWh

The formula is simple, but the numbers are easier to understand when you can play with them. Try adjusting the model, response length, and your local electricity rate:

GPUShare Cost Calculator

See what local inference actually costs on a 5070 Ti vs cloud APIs.

504,000
1500
$0.01$0.60
Per response
NZ$0.0001
Daily
NZ$0.0066
Monthly
NZ$0.20
vs cloud
2x cheaper
Cloud equivalent (GPT-4o mini): $0.45/mo
Local (Llama 3.1 8B): NZ$0.20/mo

Local cost = 150W GPU draw x inference time x electricity rate. Cloud comparison uses GPT-4o mini output token pricing. Actual throughput varies with quantisation, context length, and batch size.

Fractions of a cent per response. Cloud providers charge orders of magnitude more for comparable output; the markup covers their margins, infrastructure amortisation, and cooling overhead, and time-sharing with thousands of other customers. For people sharing my GPU, this means effectively unlimited use within reasonable limits. The billing is there to prevent waste and to be transparent, not to generate income.


What a 5070 Ti Can Actually Run

Not GPT-4. But more than you might expect.

The 5070 Ti has 16GB of VRAM. For local inference with Ollama, that comfortably covers:

Model VRAM Usage Speed Quality
Llama 3.1 8B (BF16) ~8GB 40-70 t/s Strong for everyday tasks
Qwen3 14B (Q4) ~10GB 30-45 t/s Good reasoning, multilingual
Gemma 3 12B (Q4) ~8GB 35-55 t/s Solid coding + instruction following
Qwen3 32B (Q4) ~18GB (needs offload) ~15 t/s with CPU offload Near GPT-4-mini territory
Llama 3.1 70B (Q4) ~35GB (heavy offload) Slow Not ideal on 16GB

The sweet spot on 16GB VRAM is 8B to 20B quantised models. 5 40-70 tokens per second feels fast in a chat interface, and for everyday chat, summarisation, drafting, and coding, the quality gap with frontier models is smaller than people expect. For complex multi-step reasoning it's real; frontier models are still ahead there, and that matters for some use cases and not others.


The Render Farm Side Project

Blender rendering is the other half of GPUShare. A Cycles render at 1080p/512 samples that takes an hour on a mid-range CPU renders in a few minutes on a modern GPU. Cloud render farms charge per GPU-minute. On your own hardware, the cost is just electricity.

GPUShare lets users upload .blend files, specify frame ranges and render settings, and receive output via Cloudflare R2. It's not a commercial render farm, but for personal projects and small groups sharing one machine, it works well. Blender files can embed Python scripts, so GPUShare strips those before execution.


How It's Built

Your PC (FastAPI + Ollama + Blender)
              ^
Cloudflare Tunnel (encrypted, no open ports)
              ^
Vercel (React frontend)
              ^
Users' browsers, anywhere

The backend is a FastAPI server on your machine, talking to Ollama for inference and Blender CLI for rendering. A Cloudflare Tunnel makes your local server reachable at a public URL, so no port forwarding, no exposed IP.

The frontend is a React app deployed to Vercel. PostgreSQL (Supabase or Neon's free tiers work fine) handles users, jobs, and billing. Render outputs go to Cloudflare R2. Stripe handles optional payment top-ups.


Setting It Up

Prerequisites: a PC with a modern NVIDIA GPU, Docker, and a free Cloudflare account.

1. Clone and install

git clone https://github.com/Slaymish/GPUShare
cd GPUShare
pnpm install

2. Environment variables

cp .env.example .env

Minimum required:

DATABASE_URL=postgresql+asyncpg://user:password@host/dbname
JWT_SECRET=<64-char random string; run openssl rand -hex 32>
[email protected]

A free PostgreSQL database from Supabase or Neon takes about two minutes to set up.

3. Install Ollama

# Linux
curl -fsSL https://ollama.com/install.sh | sh
ollama pull llama3.1:8b

4. Start the server

# Ollama on host, not in Docker
pnpm docker:up

# Ollama in Docker with NVIDIA runtime
pnpm docker:gpu

5. Set up a Cloudflare Tunnel

  1. Go to Cloudflare Zero Trust -> Networks -> Tunnels
  2. Create a tunnel and copy the token
  3. Add TUNNEL_TOKEN=<your token> to .env
  4. Start with the tunnel profile:
docker compose --profile tunnel up -d

Your server is now reachable at the public hostname you configured, over HTTPS, from anywhere, with no open ports on your router.

6. Deploy the frontend

Fork the repo, connect it to Vercel, set one environment variable:

VITE_API_URL=https://your-tunnel-hostname.example.com

Set the root directory to packages/frontend in Vercel's project settings and it'll build automatically on push.

7. Create your admin account

Sign up at your public URL with the email you set as ADMIN_EMAIL and you'll have admin access automatically. From there you can approve users, adjust credit limits, and monitor usage.


Caveats

A few things worth being upfront about:

Uptime. If your PC is off or you're gaming, the server is unavailable. This runs on desktop hardware, not managed infrastructure. GPUShare supports routing to OpenRouter as a fallback when the local GPU is unavailable, which helps if you don't want to keep the PC on around the clock.

Quantisation trade-offs. Running larger models within 16GB VRAM requires quantisation, which degrades quality. The practical ceiling on 16GB is 7B-13B at BF16 or 20B at Q4. Getting GPT-4-class output locally needs 24GB+ VRAM.

Model quality ceiling. For serious research or complex reasoning, frontier models are still ahead. That gap matters for some use cases and not much for others.


If you have a GPU sitting mostly idle and people in your life who use AI tools, it's worth trying. The setup takes an afternoon and the running cost is negligible.

The code is open source. Fork it, extend it, run it.


Sources

Footnotes

  1. IEA / OilPrice.com - Data Centers, AI, and Energy: Everything You Need to Know

  2. Reccessary - Google, Meta's data centers consume massive water

  3. MBIE - Energy in New Zealand 2025

  4. Low Carbon Power - New Zealand Electricity Generation Mix 2024/2025

  5. LocalScore.ai - NVIDIA GeForce RTX 5070 Ti Results