MCPcopy Index your code
hub / github.com/octelium/octelium

github.com/octelium/octelium @v0.37.0 sqlite

repository ↗ · DeepWiki ↗ · release v0.37.0 ↗
11,347 symbols 28,513 edges 747 files 871 documented · 8%
README

License License Discord Slack

<img src="https://github.com/octelium/octelium/raw/v0.37.0/unsorted/logo/main.png" alt="Octelium Logo" width="350"/>
<h1>Octelium</h1>

Table of Contents

What is Octelium?

Octelium is a free and open source, self-hosted, unified zero trust secure access platform that is flexible enough to operate as a modern zero-config remote access VPN, a comprehensive Zero Trust Network Access (ZTNA)/BeyondCorp platform, an ngrok/Cloudflare Tunnel alternative, an API gateway, an AI/LLM gateway, a scalable infrastructure for access and deployment to build MCP gateways and AI agent-based architectures/agentic meshes, a PaaS-like deployment platform for containerized applications, a Kubernetes gateway/ingress and even as a homelab infrastructure.

Octelium provides a scalable zero trust architecture (ZTA) for identity-based, application-layer (L7) aware secretless secure access via both private client-based access over WireGuard/QUIC tunnels as well as public clientless access, for both humans and workloads, to any private/internal resource behind NAT in any environment as well as to publicly protected resources such as SaaS APIs and databases, via context-aware access control on a per-request basis.

Octelium

Use Cases

Octelium is a versatile platform that can serve as a complete or partial solution for many different needs. Here are some of the key use cases:

  • Modern Remote Access VPN: A zero-trust, layer-7 aware alternative to commercial remote access/corporate VPNs like OpenVPN Access Server, Twingate, and Tailscale, providing both zero-config client access over WireGuard/QUIC and client-less access via dynamic, identity-based, context-aware Policies.
  • Unified ZTNA/BeyondCorp Architecture: A comprehensive Zero Trust Network Access (ZTNA) platform, similar to Cloudflare Access, Google BeyondCorp, or Teleport.
  • Self-Hosted Secure Tunnels: A programmable infrastructure for secure tunnels and reverse proxies for both secure identity-based as well as anonymous clientless access, offering a powerful, self-hosted alternative to ngrok or Cloudflare Tunnel. You can see an example here.
  • Self-Hosted PaaS: A scalable platform to deploy, manage, and host your containerized applications, similar to Vercel or Netlify. See an example for Next.js/Vite apps.
  • API Gateway: A self-hosted, scalable, and secure API gateway for microservices, providing a robust alternative to Kong Gateway or Apigee. You can see an example here.
  • AI Gateway: A scalable AI gateway with identity-based access control, routing, and visibility for any AI LLM provider. See an example here.
  • Unified Zero Trust Access to SaaS APIs: Provides secretless access to SaaS APIs for both teams and workloads, eliminating the need to manage and distribute long-lived and over-privileged API keys. See a generic example here, AWS Lambda here, and AWS S3 here.
  • MCP Gateways and A2A-based Architectures A secure infrastructure for Model Context Protocol (MCP) gateways and Agent2Agent Protocol (A2A)-based architectures that provides identity management, authentication over standard OAuth2 client credentials and bearer authentication, secure remote access and deployment as well as identity-based, L7-aware access control via policy-as-code and visibility (see an example here).
  • Homelab: A unified self-hosted Homelab infrastructure to connect and provide secure remote access to all your resources behind NAT from anywhere (e.g. all your devices including your laptop, IoT, cloud providers, Raspberry Pis, routers, etc...) as well as a secure deployment platform to deploy and privately as well as publicly host your websites, blogs, APIs or to remotely test heavy containers (e.g. LLM runtimes such as Ollama, databases such as ClickHouse and Elasticsearch, Pi-hole, etc...). See examples for remote VSCode, and Pi-hole.
  • Kubernetes Ingress Alternative: A more advanced alternative to standard Kubernetes ingress controllers and load balancers, allowing you to route to any Kubernetes service via dynamic, L7-aware policy-as-code (see an example here).

Main Features

  • A Modern, Unified Zero Trust Architecture Built on a scalable architecture of identity-aware proxies to control access at the application layer (L7), Octelium unifies access for humans and workloads to both private and protected public resources. It supports both zero-config VPN-like client-based access over WireGuard/QUIC and client-less BeyondCorp access, all built on top of Kubernetes for automatic scalability (read in detail about how Octelium works here).

  • Dynamic Secretless Access Octelium's layer-7 awareness enables Users to seamlessly access resources protected by application-layer credentials without exposing, managing and distributing such secrets (read more here). This works for HTTP APIs without sharing API keys and access tokens, SSH servers without sharing passwords and private keys, Kubernetes clusters without distributing kubeconfigs, PostgreSQL/MySQL databases (including compatible PostgreSQL/MySQL databases such as MariaDB and CockroachDB) without sharing passwords as well as any L7 protocol protected by mTLS.

  • Modern, Dynamic, Fine-grained Access Control Octelium provides you a modern, centralized, scalable, fine-grained, dynamic, context-aware, layer-7 aware, attribute-based access control system (ABAC) on a per-request basis (read more here) with policy-as-code using CEL and OPA (Open Policy Agent). Octelium has no notion of an "admin" user, enforcing zero standing privileges by default.

  • Context-aware, identity-based, L7-aware dynamic configuration and routing Route to different upstreams, different credentials representing different upstream contexts and accounts using policy-as-code with CEL and OPA on a per-request basis. You can read in detail about dynamic configuration here.

  • Continuous Strong Authentication A unified authentication system for both human and workload Users, supporting any web identity provider (IdP) that uses OpenID Connect or SAML 2.0 as well as GitHub OAuth2 (read more here). It also allows for secretless authentication for workloads via OIDC-based assertions (read more here). Built-in support for MFA/re-authentication/login via FIDO2/WebAuthn/Passkey, TOTP and TPM 2.0 Authenticators.

  • Clientless access through remote sandboxes Cordium is a free and open source, self-hosted, identity-based, general-purpose sandbox platform built on Kubernetes and Octelium. It provides isolated, reproducible sandboxes for developers, AI agents, and automated workloads that can be used for remote access to Octelium Services without having to install, manage and distribute the Octelium CLIs on the Users' machines. Cordium is accessible through web-based terminals via the Cordium web portal (see a short video demo), SSH, CLI, and gRPC APIs.

  • OpenTelemetry-native Auditing and Visibility Real-time, identity-based, L7-aware visibility and access logging. Every request is logged and exported to your OpenTelemetry OTLP receivers for seamless integration with your log management and SIEM tools.

  • Effortless, Passwordless SSH Octelium clients can serve SSH even without root access, enabling you to SSH into containers, IoT devices, or other hosts that can't run an SSH server (read more here).

  • Effortlessly deploy, scale and secure access to your containerized applications as Services Octelium provides you out-of-the-box PaaS-like capabilities to effortlessly deploy, manage and scale your containerized applications and serve them as Services to provide seamless secure client-based private access, client-less public BeyondCorp access as well as public anonymous access. You can read in detail about managed containers here.

  • Centralized and Declarative Management Manage your Octelium Clusters like Kubernetes with declarative management using the octeliumctl CLI (read this quick management guide here). You can store your Cluster configurations in Git for easy reproduction and GitOps workflows.

  • No change in your infrastructure is needed Your upstream resources don't need to be aware of Octelium at all. They can be listening to any behind-NAT private network, even to localhost. No public gateways, no need to open ports behind firewalls to serve your resources wherever they are.

  • Avoids Traditional VPN Networking Problems Octelium’s client-based networking eliminates a whole class of networking and routing issues that traditional VPNs suffer from. Support for dual-stack private networking regardless of the support at the upstreams and without having to deal with the pain and inconsistency of NAT64/DNS64. Unified private DNS using your own domain. Simultaneous support for WireGuard (Kernel, TUN as well as unprivileged implementations via gVisor) as well as experimentally QUIC (both TUN and unprivileged via gVisor) tunnels via a lightweight zero-config client that can run in any Linux, MacOS, Windows environment as well as container environments (e.g. Kubernetes sidecar containers for your workloads).

  • Open source and designed for self-hosting Octelium is fully open source and it is designed for single-tenant self-hosting. There is no proprietary cloud-based control plane, nor is this some crippled demo open source version of a separate fully functional SaaS paid service. You can host it on top of a single-node Kubernetes cluster running on a cheap cloud VM/VPS and you can also host it on scalable production cloud-based or on-prem multi-node Kubernetes installations with no vendor lock-in.

Install your First Cluster

Read this quick guide here to install a single-node Octelium Cluster on top of any cheap cloud VM/VPS instance (e.g. DigitalOcean Droplet, Hetzner server, AWS EC2, Vultr, etc...) or a local Linux machine/Linux VM inside a MacOS/Windows machine with at least 2GB of RAM and 20GB of disk storage running a recent Linux distribution (Ubuntu 24.04 LTS or later, Debian 12+, etc...), which is good enough for most development, personal or undemanding production use cases that do not require highly available multi-node Clusters. Once you SSH into your VPS/VM as root, you can install the Cluster as follows:

curl -o install-cluster.sh https://octelium.com/install-cluster.sh
chmod +x install-cluster.sh

# Replace <DOMAIN> with your actual domain
./install-cluster.sh --domain <DOMAIN>

Once the Cluster is installed. You can start managing it as shown in the guide here.

Try Octelium in a Codespace

You can install and manage a demo Octelium Cluster inside a GitHub Codespace without having to install it on a real VM/machine/Kubernetes cluster and simply use it as a playground to get familiar with ho

Extension points exported contracts — how you extend this code

ObjectI (Interface)
(no doc) [42 implementers]
pkg/apiutils/umetav1/umetav1.go
Server (Interface)
(no doc) [9 implementers]
cluster/vigil/vigil/modes/common.go
CoreV1Utils (Interface)
(no doc) [6 implementers]
cluster/common/octeliumc/octeliumc.go
GoNetCtl (Interface)
(no doc) [4 implementers]
client/octelium/commands/connect/ccommon/ccommon.go
Provider (Interface)
(no doc) [4 implementers]
cluster/authserver/authserver/providers/utils/utils.go
HTTP (Interface)
HTTP implements HTTP-related functions [1 implementers]
octelium-go/octelium.go
PolicyTriggerCtlI (Interface)
(no doc) [1 implementers]
cluster/octovigil/octovigil/octovigil.go
CtlI (Interface)
(no doc) [1 implementers]
cluster/apiserver/apiserver/controllers/sessions/controller.go

Core symbols most depended-on inside this repo

String
called by 815
client/common/cliutils/cliutils.go
Errorf
called by 674
cluster/e2e/e2e/server.go
CoreC
called by 613
cluster/common/octeliumc/octeliumc.go
Error
called by 537
cluster/authserver/authserver/authenticators/common.go
Errorf
called by 242
client/octelium/commands/connect/esocks5/server.go
Close
called by 230
cluster/vigil/vigil/modes/common.go
Cleanup
called by 204
cluster/gwagent/gwagent/wg/wg.go
Set
called by 199
cluster/vigil/vigil/controllers/secrets/controller.go

Shape

Method 7,771
Function 1,988
Struct 1,321
Interface 174
TypeAlias 87
FuncType 5
Enum 1

Languages

Go99%
TypeScript1%

Modules by API surface

apis/main/corev1/corev1.pb.go4,220 symbols
apis/main/userv1/userv1.pb.go561 symbols
apis/main/authv1/authv1.pb.go525 symbols
apis/rsc/rcorev1/rcorev1_grpc.pb.go476 symbols
apis/main/corev1/corev1_grpc.pb.go331 symbols
apis/client/cliconfigv1/configv1.pb.go213 symbols
apis/cluster/cbootstrapv1/cbootstrapv1.pb.go163 symbols
apis/main/metav1/metav1.pb.go159 symbols
apis/rsc/rmetav1/rmetav1.pb.go137 symbols
apis/cluster/coctovigilv1/coctovigilv1.pb.go117 symbols
apis/main/authv1/authv1_grpc.pb.go101 symbols
pkg/apiutils/ucorev1/ucorev1.go90 symbols

Dependencies from manifests, versioned

al.essio.dev/pkg/shellescapev1.6.0 · 1×
cel.dev/exprv0.25.1 · 1×
filippo.io/edwards25519v1.2.0 · 1×
github.com/Azure/go-ansitermv0.0.0-2025010203350 · 1×
github.com/ClickHouse/ch-gov0.68.0 · 1×
github.com/Microsoft/go-winiov0.6.2 · 1×
github.com/agnivade/levenshteinv1.2.1 · 1×
github.com/andybalholm/brotliv1.2.0 · 1×
github.com/andybalholm/cascadiav1.3.3 · 1×
github.com/antlr4-go/antlr/v4v4.13.1 · 1×

Datastores touched

usersCollection · 1 repos
(mongodb)Database · 1 repos
testdbDatabase · 1 repos
(mysql)Database · 1 repos
postgresDatabase · 1 repos

For agents

$ claude mcp add octelium \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact