← ENGINEERING BLOG · ENTERPRISE ARCHITECTURE · 9 MIN READ · NOVEMBER 26, 2026

Shipping Commercial Python On-Premises Without Leaking IP.

Banks, hospitals, defense contractors, and sovereign cloud buyers increasingly demand self-hosted deployments. Yet handing a customer a standard Docker image full of .py files hands them your entire company's intellectual property—and no technical enforcement when their annual contract ends.

1. Separate Build Artifact from Tenant License (--outer)

Never recompile your application per customer. Instead, compile one universal, hardened Linux ELF64 executable using --outer. Inside the compiled C runtime, PyKevlar embeds only an outer AEAD wrapping key—never the master decryption key—until a signed pyarmor.rkey file is present alongside the executable.

pykevlar build run_onprem.py \
    --target linux-x86_64 \
    --protect apps --protect billing --protect ml_pipeline \
    --anti-llm --enable-bcc --outer \
    --project-key .release_v2.key \
    -F -O dist-linux

2. Lock to Host Hardware + Embed Signed Seat Quotas

When provisioning a new enterprise tenant or a 14-day proof-of-concept trial, mint their pyarmor.rkey in 6.2 milliseconds. Use --bind-data to seal authenticated JSON claims inside the Poly1305 tag so your Python app can read tamper-proof entitlements at runtime without any outbound license server call:

pykevlar key --project-key .release_v2.key -O tenants/bank_nord \
    -b spa-dev-89f1c204ab1190e2 \
    -e 2027-12-31 \
    --period 30m \
    --bind-data '{"tenant":"bank-nord","tier":"enterprise","seats":500}'

3. Ship Inside a Distroless / Scratch-Minimal Container

Because pykevlar build -F bundles libpython, C extensions, shared libraries, and static assets into a single native ELF64 binary, your customer Docker image needs zero pip, zero source tree, and zero shell tooling—shrinking attack surface and image size by ~45%.

Automate Linux on-prem builds from macOS or CI
PyKevlar Team ($79/yr) includes zero-Docker Mac→Linux cross-compilation & 25 build seats.
Explore Team Tier →
MORE FROM PYKEVLAR ENGINEERING
Python Hardware Lock & Offline License Expiration: Binding Binaries to Machine UUIDs Read → PyKevlar vs. PyArmor vs. Nuitka: Production Benchmarks on 802 Python Modules Read → How Autonomous LLM Agents (GhidraMCP, REA & PyLingual) Decompile Python—and How to Stop Them Read →