Files
opinionated-ai-fieldscan-20…/inference-coop/README.md
T

28 KiB

type, function, region, maturity, ownership
type function region maturity ownership
research-project inference global planned cooperative

inference.coop — Minimum Viable Cooperative Inference Utility

Status: Design/planning phase Category: Cooperative AI infrastructure — proof of concept Goal: A working, membership-based inference cooperative providing API and chatbot access to open models, hosted on renewable energy, with unified account management and cooperative governance.

Design goals

  1. Leverage existing open-source software for the full stack — no custom infrastructure to build
  2. Renewable energy hosting — inference on providers powered by renewables
  3. Unified account management across services (chat, API, billing, governance)
  4. Membership-based payment through a service that supports recurring payments and cooperative governance
  5. Small scale first — viable for a handful of user-testers, then scale

Component 1: Inference engine

The backend that loads and serves open models via an OpenAI-compatible API.

Options

Engine Throughput Key features Best for
vLLM Highest (PagedAttention, continuous batching) OpenAI-compatible API, multi-LoRA, production-grade multi-tenant Production serving, many concurrent users
Ollama Lower (single-user optimized) One-command setup, model library, extreme ease of use MVP/prototyping, small deployments
SGLang ~30% faster than vLLM on some workloads RadixAttention, structured outputs Latency-sensitive workloads
TGI (HuggingFace) Competitive HF ecosystem integration HF-centric workflows

Recommendation

Start with Ollama, migrate to vLLM at scale. Ollama is available as a Cloudron app (one-click install), handles model management, and exposes an OpenAI-compatible API. For <10 concurrent users, Ollama is sufficient. When usage grows, swap the backend to vLLM behind the same Open WebUI frontend — the API contract is identical.

The Ollama → vLLM migration is straightforward:

  1. Both expose the same OpenAI-compatible /v1/chat/completions endpoint
  2. Open WebUI just needs the base URL changed from the Ollama endpoint to the vLLM endpoint
  3. No data migration needed — models are stateless, conversation history lives in Open WebUI's database
  4. The only real work is deploying vLLM (Docker container with GPU config) and updating one config value in Open WebUI

Why not start with vLLM directly? vLLM is not in the Cloudron app store, so it would need to be run as a standalone Docker container outside Cloudron's management — losing SSO integration, automatic updates, and the security sandboxing that Cloudron provides. For the MVP with 5-10 user-testers, Ollama's throughput is sufficient and the Cloudron integration is worth more than multi-tenant performance you won't use yet.

When to migrate: When concurrent users exceed ~10-15 or when you need to serve larger models (70B+) where Ollama's throughput becomes a bottleneck. At that point, deploy vLLM as a Docker container (either on the same server or a dedicated GPU instance) and point Open WebUI at it.

Model selection

Start with 2-3 models covering capability tiers:

  • Lightweight: Qwen 3.5 7B or Llama 4 Scout 13B — fast, cheap, handles 80% of queries
  • Mid-range: DeepSeek V4 Lite or Qwen 3.5 32B — research assistance, complex reasoning
  • Frontier (brokered): Access via OpenRouter API for models too large to self-host

Recommendation: use OpenRouter for frontier access

OpenRouter provides a single API to 300+ models from 60+ providers with pay-as-you-go pricing. For the MVP, self-host lightweight/mid-range models and broker frontier access through OpenRouter. This avoids the cost of renting H100 GPUs for frontier models while still offering full model coverage.


Component 2: Chat frontend

The user-facing web interface for chatting with models.

Options

Frontend Stars Key features Cloudron app?
Open WebUI 141K+ ChatGPT-style, multi-user, RAG, model switching, document upload, pipelines, Python extensibility ✅ Yes
LibreChat — ChatGPT-like with model switching, multi-user ✅ Yes
Lobster — Clean chat interface ❌

Recommendation: Open WebUI

Open WebUI is the leading self-hosted chat interface (141K+ GitHub stars). It's available as a one-click Cloudron app, supports multi-user accounts with role-based access, model switching, document upload for RAG, and connects to both Ollama and any OpenAI-compatible API (including vLLM and OpenRouter). It also has a Python pipeline system for extensibility.


Component 3: Hosting (renewable energy)

Options

Provider Renewable claim GPU types Location Notes
Scaleway 100% renewable (wind + hydro, GO certified) at DC5 (Paris) L4, L40S Paris, Amsterdam, Warsaw EU data residency, GDPR. No H100. Best for lightweight models.
Hetzner Certified data centers in Germany/Finland (mixed energy) GPU dedicated servers Germany, Finland Best value CPU/GPU servers, but not 100% renewable
IREN 100% renewable-powered data centers H100, H200, B200 Global (AU, US, CA) For GPU-heavy workloads
Lambda Labs Not renewable-specific H100, A100 US Best price/reliability for GPU rental
GreenPT (backend) 100% renewable (uses Scaleway infra) Not disclosed Netherlands Could white-label, but €17.50/seat/month is expensive

Recommendation

Two-tier approach:

  1. Chat/lightweight models: Hetzner or Scaleway VPS with Cloudron + Ollama running small models on CPU or modest GPU. Scaleway DC5 for 100% renewable. ~€15-30/month for the VPS + Cloudron license.
  2. Frontier/heavy models: Broker via OpenRouter (no GPU hosting needed). When self-hosting frontier becomes necessary, move to IREN or Lambda Labs with renewable energy credits.

For the MVP, a single Scaleway or Hetzner server running Cloudron + Ollama + Open WebUI can serve 5-10 user-testers with lightweight models. Add OpenRouter API access for frontier model needs.


Component 4: Unified account management (Cloudron)

What Cloudron provides

Cloudron is a self-hosting platform that runs on your VPS and provides:

  • One-click app installation from an app store (100+ apps)

  • Single Sign-On (SSO) — users log in once, access all apps

  • Centralized user management — LDAP-based directory, admin/user roles

  • Automatic SSL, DNS, backups, updates

  • Access control — restrict which users can access which apps

  • Cloudron

  • Cloudron docs: user management

  • Cloudron pricing: ~€15/month for the Cloudron license + your VPS cost

Key Cloudron apps for inference.coop

App Purpose In Cloudron store?
Open WebUI Chat frontend ✅
Ollama Model serving ✅
LibreChat Alternative chat frontend ✅
Gitea Git hosting (for skills/agents) ✅
Nextcloud File sharing, collaboration ✅
Loomio Democratic decision-making / governance ✅
Discourse Forum / community discussion ✅
Matrix/Element Chat / communication ✅

This means the entire cooperative platform — inference, chat, governance, communication, file sharing — can be deployed through Cloudron with unified SSO. Members log in once and access all services.

Alternatives to Cloudron

Platform Open source? SSO? Notes
Coolify ✅ Yes (self-hostable) Partial Open-source Cloudron alternative. 280+ one-click services. No built-in SSO/LDAP.
YunoHost ✅ Yes ✅ Yes Free, Debian-based. Simpler than Cloudron. Fewer apps. Already used on Nathan's server.
Cosmo Cloud ✅ Yes ✅ Yes Newer, Cosmos Server based.

Recommendation

Cloudron is the right choice for inference.coop. The security model is materially stronger than YunoHost for running untrusted or semi-trusted software like model inference engines.

Cloudron security model (per Cloudron security docs):

  • Docker app isolation: Each app runs in its own Docker container. One app cannot access another app's database or files.
  • Read-only rootfs: Apps cannot tamper with their own application code.
  • AppArmor profiles: System calls restricted, /proc and /sys filesystems blocked.
  • Non-root execution: All apps run as non-root user by default.
  • Per-app subdomains: Prevents XSS in one app from compromising others (unlike sub-path deployments).
  • Dropped capabilities: CAP_SYS_ADMIN and other dangerous capabilities are dropped.
  • Automatic SSL/TLS: All apps HTTPS-only, A+ SSL Labs rating, HSTS, wildcard certs to avoid certificate transparency leaks.
  • Rate limiting: Built-in protection against brute force on passwords, SSH, email, database.
  • Signed updates: Platform updates GPG-signed, keys maintained offline.
  • No remote access: No mechanism for cloudron.io to access your server.
  • Automatic OS security updates: Ubuntu unattended-upgrades enabled.

YunoHost security model — YunoHost does not provide Docker-based app isolation by default. Apps are installed directly on the system (not in containers), meaning a vulnerability in one app can potentially affect others. There is no AppArmor profiling, no read-only rootfs, no per-app sandboxing. This is acceptable for trusted, well-maintained apps on a personal server, but is a real concern for:

  • Running model inference engines that process untrusted user input
  • Running multiple services for multiple members (not just yourself)
  • A cooperative that has a duty of care to its members' data

Cost comparison:

  • Cloudron: €15/month license + VPS cost
  • YunoHost: free + VPS cost
  • The €15/month is the cost of containerized isolation, automatic security updates, and professional app packaging. For a cooperative handling member data and running inference workloads, this is a necessary expense, not a luxury.

Alternative considered: Coolify (open-source, self-hostable). Coolify deploys apps via Docker (better isolation than YunoHost) but lacks built-in SSO/LDAP user management and the polished app store. It's a middle ground but doesn't solve the unified account management problem as well as Cloudron.


Component 5: Payment and membership (Open Collective)

What Open Collective provides

Open Collective is a platform for transparent funding of open projects:

  • Recurring payments — monthly/yearly tiers

  • Fiscal sponsorship — no need to incorporate immediately; a fiscal host handles legal/banking

  • Transparent budget — all income and expenses visible

  • Tier system — different membership levels with different benefits

  • Expense submission — members can submit expenses for reimbursement

  • Open Collective

  • Open Collective: fiscal hosts FAQ

How it fits inference.coop

  1. Create an Open Collective for inference.coop
  2. Set up tiers: Free (limited), Member ($5-10/month), Supporter ($20+/month)
  3. Connect to a fiscal host (e.g., Open Collective Foundation, or a cooperative-specific host)
  4. Members pay through Open Collective → funds held transparently
  5. Expenses (server costs, OpenRouter API costs) paid from the collective

Gaps and additional needs

Open Collective handles money in (membership payments) but not:

  • Access provisioning — automatically granting/denying API access based on payment status
  • Usage metering — tracking token usage per member
  • Rate limiting — enforcing per-tier limits

These would need a lightweight middleware layer between Open Collective's webhook/API and Cloudron's user management. This is the main piece of custom code needed for the MVP.

Alternatives

Platform Recurring payments Fiscal sponsorship Membership management Cooperative-friendly?
Open Collective ✅ ✅ Partial (tiers, not access control) ✅ Designed for collective governance
Patreon ✅ ❌ Partial ❌ Extractive platform
Stripe + custom ✅ ❌ Custom build Neutral
Memberstack ✅ ❌ ✅ Access control, member portals ❌ SaaS, not cooperative
Outseta ✅ ❌ ✅ Full member management ❌ SaaS

Recommendation

Open Collective for payments + fiscal sponsorship, custom middleware for access provisioning. The middleware is a small webhook handler that:

  1. Receives Open Collective webhooks when payments are made/missed
  2. Enables/disables the user's Cloudron account
  3. Optionally sets rate limits in Open WebUI based on tier

This is maybe 200-500 lines of Python — the only custom code needed for the MVP.


Component 6: Governance (missing from original design goals)

A cooperative needs governance infrastructure. Cloudron has Loomio in its app store — an open-source platform for democratic decision-making used by cooperatives and community organizations worldwide.

Recommendation

Install Loomio via Cloudron for member governance:

  • Proposals and voting
  • Discussion threads
  • Working groups
  • Transparent decision history

This gives members a space to decide on model selection, pricing, privacy policies, and platform direction — all within the same SSO ecosystem as the chat and API.


Component 7: API access (missing from original design goals)

In addition to the chat frontend, members need direct API access to use models in their own code, agents, and integrations.

How to provide it

Both Ollama and vLLM expose an OpenAI-compatible API (/v1/chat/completions). Members point their code at:

https://inference.coop/v1/chat/completions

with their API key (issued via Cloudron SSO or a simple key management layer).

Key management

Open WebUI has built-in API key generation for users. Alternatively, a lightweight API gateway (e.g., LiteLLM proxy) can handle:

  • Per-user API keys

  • Rate limiting per tier

  • Usage logging

  • Model routing (lightweight → self-hosted, frontier → OpenRouter)

  • LiteLLM — proxy that unifies 100+ LLM providers behind OpenAI API

Component 8: Privacy and confidential inference

A cooperative handling member data has a stronger duty of care than a corporate provider — members own the cooperative, so the cooperative should not be able to surveil them. This is a structural advantage over corporate AI if we get it right.

Privacy tiers (progressive)

The privacy model should be designed in layers, each stronger than the last:

Tier 1: Self-hosted data sovereignty (MVP baseline)

  • All data stays on cooperative infrastructure — no third-party access
  • Open WebUI stores conversation history in its own database (SQLite or PostgreSQL)
  • Encryption at rest: Use SQLCipher for SQLite or disk-level encryption for PostgreSQL
  • Configurable retention: Open WebUI supports automatic chat deletion after X days (feature request #21027, in development)
  • No training on member data: Models are pre-trained; member conversations are never used for fine-tuning
  • Sources: Open WebUI security docs, Open WebUI hardening guide

Tier 2: Member-controlled retention

  • Members choose their own data retention: session-only, 7 days, 30 days, permanent
  • Session-only mode: conversations deleted when the session ends — no persistent storage at all
  • API access: no conversation logging for API users, only usage metering (token counts)
  • This requires a small configuration layer on top of Open WebUI's existing retention settings

Tier 3: Encrypted inference via TEEs (Confer.to model)

This is where it gets interesting — and where Confer.to's architecture becomes directly relevant.

What Confer.to does

Confer.to (founded by Moxie Marlinspike, Signal founder) provides end-to-end encrypted AI chat:

  1. Client-side encryption: User's prompt is encrypted with WebAuthn passkeys before it leaves the browser
  2. Trusted Execution Environment (TEE): The encrypted prompt enters a hardware-enforced enclave (TEE) on the server. The server's OS cannot read the TEE's memory or execution state. The TEE decrypts the prompt, runs inference, encrypts the output, and sends it back.
  3. Remote attestation: Users can cryptographically verify that the TEE is running the claimed code — the cooperative cannot read conversations even if it wants to.
  4. Statelessness: LLMs are stateless (input in, output out) — making them ideal for TEE deployment since no state persists after the request.

The TEE landscape in 2026

Confidential computing for AI inference matured significantly in 2026:

Technology Hardware Status Overhead
NVIDIA Confidential Computing H100, H200, B200 (GPU TEE) Production-ready. CC-On mode encrypts GPU memory, protected PCIe between CPU and GPU. <7% throughput
Intel TDX Intel CPUs (Trust Domain Extensions) Mature. Creates encrypted VMs. Low
AMD SEV-SNP AMD EPYC CPUs Mature. Encrypted virtualization. Low
AWS Nitro Enclaves AWS cloud Available. Isolated compute environments. Medium

Key developments:

  • NVIDIA H100/H200 Confidential Computing went production in 2025-2026, enabling GPU-accelerated TEE inference
  • TEE overhead dropped below 7% — negligible for most workloads
  • Open-source frameworks emerging: OpenPCC (open-source confidential LLM serving on commodity TEEs, using vLLM, arXiv June 2026)
  • Tinfoil (tinfoil.sh) — open-source, OpenAI-compatible confidential inference API running in hardware enclaves. Collaborating with Red Hat. Production-ready.
  • Sources: GeniusTechLab (Jul 2026), OpenPCC (arXiv Jun 2026), Tinfoil

How inference.coop could build on this

Phase 1 (MVP): Tier 1 + Tier 2. Self-hosted, encrypted at rest, member-controlled retention. The cooperative could technically read conversations, but has a policy commitment not to. This is already stronger than OpenAI/Anthropic, whose terms allow them to read your data.

Phase 2 (growth): Tier 3 with TEEs. When deploying on GPU hardware (for the vLLM migration), choose H100 GPUs with Confidential Computing enabled. Use a framework like OpenPCC or Tinfoil to serve models inside TEEs. At this point, the cooperative cannot read conversations even if it wants to — the privacy guarantee becomes architectural, not just policy-based.

Phase 3 (long-term): Client-side encryption + TEE (full Confer.to model). User's browser encrypts the prompt before transmission. Only the TEE can decrypt it. Even the network operator can't see the content. This requires custom frontend work on top of Open WebUI, but the architecture is proven by Confer.to.

Tinfoil as a potential shortcut

Tinfoil is particularly interesting for the cooperative:

  • Open-source, OpenAI-compatible API
  • Runs models inside hardware enclaves
  • Verifiably private — users can attest the enclave
  • Collaborating with Red Hat on open-source confidential AI infrastructure
  • Could potentially be used as a backend instead of (or alongside) vLLM, providing TEE-protected inference without building the confidential computing layer from scratch

If Tinfoil's API is OpenAI-compatible, it could be a drop-in replacement for the vLLM backend, providing both inference and privacy in one package. Worth investigating for the Phase 2 migration.

Privacy as cooperative advantage

This is the key strategic point: privacy is where the cooperative can structurally outperform corporate AI providers.

Corporate AI (OpenAI, Anthropic) inference.coop Tier 1 inference.coop Tier 3 (TEE)
Can the provider read your data? Yes (per terms of service) Technically yes, but policy prohibits No — architecturally impossible
Can the provider train on your data? Yes (unless you pay for enterprise) No — never No — never
Can you verify the privacy claim? No (trust the company) No (trust the cooperative) Yes — remote attestation
Data leaves your control? Yes (sent to corporate servers) No (stays on co-op infra) No (encrypted before leaving your device)

The cooperative's structural advantage is that it can deploy TEEs and offer verifiable privacy without a business model that depends on reading user data. OpenAI and Anthropic could deploy TEEs, but their business models (training on user data, targeting, enterprise upsells) create a conflict of interest. The cooperative has no such conflict.


Architecture summary (MVP)

┌─────────────────────────────────────────────────┐
│                 Member's browser                  │
│  Chat: https://chat.inference.coop (Open WebUI)  │
│  API:  https://api.inference.coop/v1/...          │
│  Gov:  https://gov.inference.coop (Loomio)        │
│  Pay:  https://opencollective.com/inference-coop  │
└──────────────────────┬──────────────────────────┘
                       │ HTTPS + SSO
┌──────────────────────▼──────────────────────────┐
│              Cloudron (VPS)                       │
│  ┌─────────┐  ┌──────────┐  ┌─────────────────┐ │
│  │ SSO/LDAP│  │ Open WebUI│  │  Loomio         │ │
│  └─────────┘  └────┬─────┘  └─────────────────┘ │
│               ┌────▼─────┐                       │
│               │ Ollama   │ (lightweight models)  │
│               │ or vLLM  │                       │
│               └────┬─────┘                       │
│                    │ OpenAI-compatible API       │
│               ┌────▼─────┐                       │
│               │OpenRouter│ (frontier brokered)   │
│               └──────────┘                       │
│  ┌──────────────────────┐                        │
│  │ Middleware (custom)   │                        │
│  │ OC webhook → Cloudron │                        │
│  │ account enable/disable│                        │
│  └──────────────────────┘                        │
└──────────────────────────────────────────────────┘
         Hosted on: Scaleway DC5 (renewable) or Hetzner

Cost estimate (MVP, 5-10 user-testers)

Component Monthly cost Notes
VPS (Scaleway or Hetzner) €15-30 4-8 vCPU, 8-16GB RAM, modest GPU or CPU-only
Cloudron license €15 If using Cloudron (free if YunoHost)
OpenRouter API (frontier) €5-20 Pay-as-you-go, depends on usage
Domain ~€1 inference.coop or similar
Open Collective 0-5% Platform fee depends on fiscal host
Total €36-66/month

At 10 members paying €10/month = €100/month revenue → surplus of €34-64/month for reinvestment.


What's missing / needs further design

  1. Legal structure — Open Collective fiscal sponsorship for MVP; formal cooperative incorporation later
  2. Data policy — what's logged, retained, shared. FERPA/GDPR considerations. Member-controlled retention (Tier 2).
  3. Model governance — how members decide which models to add/remove
  4. Sustainability metrics — energy per query, CO₂ tracking (à la GreenPT)
  5. API key management — whether to use Open WebUI's built-in keys or a dedicated gateway (LiteLLM)
  6. Migration path — Ollama → vLLM when scale requires it
  7. Agent support — whether to offer agentic capabilities (like Hermes Agent) beyond chat
  8. Confidential inference (Phase 2-3) — TEE deployment via OpenPCC or Tinfoil when GPU hardware is available. Client-side encryption (Confer.to model) as long-term goal. This is the cooperative's structural privacy advantage.

Connections

  • co/core — most architecturally similar project (ATProto, mutual credit)
  • GreenPT — renewable energy AI hosting precedent
  • Public AI Switzerland — consumer-facing AI cooperative model
  • Ollama — inference engine + potential E2C candidate
  • OpenRouter — model brokering for frontier access
  • Campus AI Cooperative — larger-scale version of the same concept