On-Premise Deployment
AgentCube runs as standard Linux containers on any host with Docker installed: the Context Engine (the MCP endpoint your AI platform connects to), its PostgreSQL database, and one connector per Oracle system. This guide covers deployment on a Linux server using Docker or Docker Compose, with nginx as a TLS-terminating reverse proxy in front of the Context Engine. The docker and curl steps are shown for PowerShell 7 first and then bash; the server administration steps (packages, files under /etc, nginx, chmod, systemctl) run on the Linux host and are shown in bash only.
Prerequisites
Section titled “Prerequisites”- Linux server (Ubuntu 22.04 LTS or RHEL 8+ recommended)
- Docker Engine 24.0 or later
- A valid TLS certificate for your Context Engine hostname (Let’s Encrypt or your CA)
- Outbound internet access to your Oracle EPM system, and outbound HTTPS (443) from the Context Engine to
https://licensing.caprus.aifor license validation - An AgentCube license key issued by Caprus AI
- A public HTTPS URL for the Context Engine, reachable by your AI platform (Claude.ai, Copilot Studio)
- PostgreSQL with the
pgvectorextension. The examples below run it as a container; to use an existing server instead, have your DBA runCREATE EXTENSION vector;on the Context Engine database before its first start.
See Container Images & Specifications for image names, GHCR authentication, and resource requirements.
Authenticate with Docker before pulling or running images.
PowerShell:
"{github_pat}" | docker login ghcr.io -u {github_username} --password-stdinbash:
echo "{github_pat}" | docker login ghcr.io -u {github_username} --password-stdinGenerate the credential key
Section titled “Generate the credential key”The Context Engine needs AGENTCUBE_CE_CREDENTIAL_KEY, the encryption key for the secrets it stores in its database: the service-account credentials you enter for connected systems, and the installed license key. Without it you cannot register connected systems or install a license. Generate it once.
PowerShell:
$b = [byte[]]::new(32); [System.Security.Cryptography.RandomNumberGenerator]::Create().GetBytes($b)[Convert]::ToBase64String($b).Replace('+','-').Replace('/','_')bash:
openssl rand -base64 32 | tr '+/' '-_'Store it in your secret manager and back it up with your database backups. A database restored without the matching key cannot decrypt stored credentials.
Connector posture used in this guide
Section titled “Connector posture used in this guide”The connector examples deploy the admin (metadata) lane with a delegated credential: AGENTCUBE_CONNECTOR_MODE=admin and AGENTCUBE_AUTH_MODE=delegated_basic, with no Oracle username or password on the connector. You enter one Oracle service-account username and password when you register the connector in the Context Engine, which stores it encrypted and forwards it on each call. For per-user data access, deploy a second instance of each connector in user mode with single sign-on — see Single Sign-On and Auth Mode Management.
Option A: Docker (Quick Start)
Section titled “Option A: Docker (Quick Start)”Suitable for evaluation and development. Create a Docker network so the Context Engine can reach the connectors by container name (the same command works in PowerShell and bash):
docker network create agentcubePostgreSQL
Section titled “PostgreSQL”PowerShell:
$pgArgs = @( 'run', '-d', '--name', 'agentcube-postgres', '--restart', 'unless-stopped', '--network', 'agentcube', '-v', 'agentcube_pg_data:/var/lib/postgresql/data', '-e', 'POSTGRES_USER=agentcube', '-e', 'POSTGRES_PASSWORD={postgres_password}', '-e', 'POSTGRES_DB=agentcube', 'pgvector/pgvector:pg15')docker @pgArgs
# Once the database is accepting connections:docker exec agentcube-postgres psql -U agentcube -d agentcube -c "CREATE EXTENSION IF NOT EXISTS vector;"bash:
docker run -d \ --name agentcube-postgres \ --restart unless-stopped \ --network agentcube \ -v agentcube_pg_data:/var/lib/postgresql/data \ -e POSTGRES_USER=agentcube \ -e POSTGRES_PASSWORD={postgres_password} \ -e POSTGRES_DB=agentcube \ pgvector/pgvector:pg15
# Once the database is accepting connections:docker exec agentcube-postgres psql -U agentcube -d agentcube -c "CREATE EXTENSION IF NOT EXISTS vector;"Context Engine
Section titled “Context Engine”PowerShell:
$ceArgs = @( 'run', '-d', '--name', 'agentcube-ce', '--restart', 'unless-stopped', '--network', 'agentcube', '-p', '127.0.0.1:8080:8080', '-e', 'AGENTCUBE_CE_DATABASE_URL=postgresql://agentcube:{postgres_password}@agentcube-postgres:5432/agentcube', '-e', 'AGENTCUBE_CE_CREDENTIAL_KEY={credential_key}', '-e', 'AGENTCUBE_CE_ADMIN_USERNAME={admin_username}', '-e', 'AGENTCUBE_CE_ADMIN_PASSWORD={initial_admin_password}', 'ghcr.io/caprusai/agentcube-ce:{version}')docker @ceArgsbash:
docker run -d \ --name agentcube-ce \ --restart unless-stopped \ --network agentcube \ -p 127.0.0.1:8080:8080 \ -e AGENTCUBE_CE_DATABASE_URL=postgresql://agentcube:{postgres_password}@agentcube-postgres:5432/agentcube \ -e AGENTCUBE_CE_CREDENTIAL_KEY={credential_key} \ -e AGENTCUBE_CE_ADMIN_USERNAME={admin_username} \ -e AGENTCUBE_CE_ADMIN_PASSWORD={initial_admin_password} \ ghcr.io/caprusai/agentcube-ce:{version}AGENTCUBE_CE_ADMIN_USERNAME and AGENTCUBE_CE_ADMIN_PASSWORD create the first admin console account on first start. They are only required while no admin account exists: after you sign in and change the password, you can remove them. The Context Engine is published on 127.0.0.1 only; nginx exposes it publicly (see below). For single sign-on and the other Context Engine settings, see Environment Variables.
Essbase
Section titled “Essbase”PowerShell:
$essbaseArgs = @( 'run', '-d', '--name', 'agentcube-essbase', '--restart', 'unless-stopped', '--network', 'agentcube', '-p', '127.0.0.1:8081:8080', '-e', 'ESSBASE_SERVER_URL=https://{essbase_host}', '-e', 'AGENTCUBE_CONNECTOR_MODE=admin', '-e', 'AGENTCUBE_AUTH_MODE=delegated_basic', 'ghcr.io/caprusai/agentcube-essbase:{version}')docker @essbaseArgsbash:
docker run -d \ --name agentcube-essbase \ --restart unless-stopped \ --network agentcube \ -p 127.0.0.1:8081:8080 \ -e ESSBASE_SERVER_URL=https://{essbase_host} \ -e AGENTCUBE_CONNECTOR_MODE=admin \ -e AGENTCUBE_AUTH_MODE=delegated_basic \ ghcr.io/caprusai/agentcube-essbase:{version}Planning
Section titled “Planning”PowerShell:
$planningArgs = @( 'run', '-d', '--name', 'agentcube-planning', '--restart', 'unless-stopped', '--network', 'agentcube', '-p', '127.0.0.1:8082:8080', '-e', 'PLANNING_SERVER_URL=https://{planning_host}', '-e', 'AGENTCUBE_CONNECTOR_MODE=admin', '-e', 'AGENTCUBE_AUTH_MODE=delegated_basic', 'ghcr.io/caprusai/agentcube-planning:{version}')docker @planningArgsbash:
docker run -d \ --name agentcube-planning \ --restart unless-stopped \ --network agentcube \ -p 127.0.0.1:8082:8080 \ -e PLANNING_SERVER_URL=https://{planning_host} \ -e AGENTCUBE_CONNECTOR_MODE=admin \ -e AGENTCUBE_AUTH_MODE=delegated_basic \ ghcr.io/caprusai/agentcube-planning:{version}PowerShell:
$fccsArgs = @( 'run', '-d', '--name', 'agentcube-fccs', '--restart', 'unless-stopped', '--network', 'agentcube', '-p', '127.0.0.1:8083:8080', '-e', 'FCCS_SERVER_URL=https://{fccs_host}', '-e', 'AGENTCUBE_CONNECTOR_MODE=admin', '-e', 'AGENTCUBE_AUTH_MODE=delegated_basic', 'ghcr.io/caprusai/agentcube-fccs:{version}')docker @fccsArgsbash:
docker run -d \ --name agentcube-fccs \ --restart unless-stopped \ --network agentcube \ -p 127.0.0.1:8083:8080 \ -e FCCS_SERVER_URL=https://{fccs_host} \ -e AGENTCUBE_CONNECTOR_MODE=admin \ -e AGENTCUBE_AUTH_MODE=delegated_basic \ ghcr.io/caprusai/agentcube-fccs:{version}The connector ports are bound to 127.0.0.1 only so you can check them from the host; the Context Engine reaches them over the agentcube network. Verify the containers are healthy.
PowerShell:
Invoke-RestMethod http://localhost:8080/health # Context EngineInvoke-RestMethod http://localhost:8081/health # Essbase connectorbash:
curl http://localhost:8080/health # Context Enginecurl http://localhost:8081/health # Essbase connectorOption B: Docker Compose (Recommended)
Section titled “Option B: Docker Compose (Recommended)”Docker Compose is recommended for production on-premise deployments. It manages restarts, environment files, and multiple containers cleanly.
1. Create the environment files
Section titled “1. Create the environment files”Docker Compose runs on the Linux host, so the steps in this option are shown in bash. Store credentials separately from docker-compose.yml. Create /etc/agentcube/postgres.env:
POSTGRES_USER=agentcubePOSTGRES_PASSWORD={postgres_password}POSTGRES_DB=agentcubeCreate /etc/agentcube/ce.env:
AGENTCUBE_CE_DATABASE_URL=postgresql://agentcube:{postgres_password}@postgres:5432/agentcubeAGENTCUBE_CE_CREDENTIAL_KEY={credential_key}AGENTCUBE_CE_ADMIN_USERNAME={admin_username}AGENTCUBE_CE_ADMIN_PASSWORD={initial_admin_password}Create /etc/agentcube/essbase.env:
ESSBASE_SERVER_URL=https://{essbase_host}AGENTCUBE_CONNECTOR_MODE=adminAGENTCUBE_AUTH_MODE=delegated_basicFor the Planning connector, create /etc/agentcube/planning.env:
PLANNING_SERVER_URL=https://{planning_host}AGENTCUBE_CONNECTOR_MODE=adminAGENTCUBE_AUTH_MODE=delegated_basicFor the FCCS connector, create /etc/agentcube/fccs.env the same way and add a matching agentcube-fccs service (image ghcr.io/caprusai/agentcube-fccs:{version}, env_file: /etc/agentcube/fccs.env) to docker-compose.yml below:
FCCS_SERVER_URL=https://{fccs_host}AGENTCUBE_CONNECTOR_MODE=adminAGENTCUBE_AUTH_MODE=delegated_basicAGENTCUBE_CONNECTOR_MODE is required for Planning and FCCS (admin or user, no default). Essbase accepts user (the default) or admin: deploy an admin instance for the Context Engine’s metadata calls alongside a user instance for end-user data queries.
Create /etc/agentcube/postgres-init/01-pgvector.sql so the pgvector extension is created when the database is first initialized:
CREATE EXTENSION IF NOT EXISTS vector;Set restrictive permissions:
sudo chmod 600 /etc/agentcube/*.env2. Create docker-compose.yml
Section titled “2. Create docker-compose.yml”services: postgres: image: pgvector/pgvector:pg15 restart: unless-stopped env_file: - /etc/agentcube/postgres.env volumes: - agentcube_pg_data:/var/lib/postgresql/data - /etc/agentcube/postgres-init:/docker-entrypoint-initdb.d:ro healthcheck: test: ["CMD-SHELL", "pg_isready -U agentcube -d agentcube"] interval: 10s timeout: 5s retries: 5
agentcube-ce: image: ghcr.io/caprusai/agentcube-ce:{version} restart: unless-stopped ports: - "127.0.0.1:8080:8080" env_file: - /etc/agentcube/ce.env depends_on: postgres: condition: service_healthy
agentcube-essbase: image: ghcr.io/caprusai/agentcube-essbase:{version} restart: unless-stopped env_file: - /etc/agentcube/essbase.env
agentcube-planning: image: ghcr.io/caprusai/agentcube-planning:{version} restart: unless-stopped env_file: - /etc/agentcube/planning.env
volumes: agentcube_pg_data:The connectors publish no ports: the Context Engine reaches them on the Compose network at http://agentcube-essbase:8080 and http://agentcube-planning:8080. The images include their own health check, so no healthcheck block is needed for them.
3. Start the services
Section titled “3. Start the services”docker compose up -ddocker compose psInstall the license and register the connectors
Section titled “Install the license and register the connectors”- Install your license. Sign in to the admin console at
https://{ce_hostname}/admin/(orhttp://localhost:8080/admin/from the host) with the admin account above, then open Admin & Security → License. Paste the key into License key exactly as issued and select Save. The Context Engine validates the key with the Caprus AI licensing service and stores it, encrypted, only if the service accepts it. Until a valid license is installed, data sources cannot be added. - Register each connector under Data Sources & Connectors → Connected Systems, using its internal MCP URL (for example
http://agentcube-essbase:8080/mcp) and auth modedelegated_basic, and enter the Oracle service-account username and password there. Then bind it to a data source — see Connecting Data Sources.
Configure TLS with nginx (Options A and B)
Section titled “Configure TLS with nginx (Options A and B)”The Context Engine container serves HTTP on port 8080. nginx acts as a reverse proxy to terminate TLS and forward requests to it. The connectors stay internal and do not need a public hostname.
Install nginx
Section titled “Install nginx”These steps run on the Linux host:
# Ubuntu/Debiansudo apt install -y nginx
# RHEL/CentOSsudo dnf install -y nginxObtain a TLS certificate
Section titled “Obtain a TLS certificate”Using Let’s Encrypt with Certbot:
sudo apt install -y certbot python3-certbot-nginxsudo certbot --nginx -d {ce_hostname}Certbot configures nginx and sets up automatic renewal.
Manual nginx configuration
Section titled “Manual nginx configuration”If managing certificates manually, create /etc/nginx/sites-available/agentcube-ce:
server { listen 443 ssl; server_name {ce_hostname};
ssl_certificate /etc/ssl/certs/{ce_hostname}.pem; ssl_certificate_key /etc/ssl/private/{ce_hostname}.key; ssl_protocols TLSv1.2 TLSv1.3; ssl_ciphers HIGH:!aNULL:!MD5;
location / { proxy_pass http://127.0.0.1:8080; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_read_timeout 120s; }}
server { listen 80; server_name {ce_hostname}; return 301 https://$host$request_uri;}Enable the configuration:
sudo ln -s /etc/nginx/sites-available/agentcube-ce /etc/nginx/sites-enabled/sudo nginx -tsudo systemctl reload nginxDo not publish the connectors through nginx; only the Context Engine needs a public endpoint.
Option C: Kubernetes
Section titled “Option C: Kubernetes”For enterprise environments with an existing Kubernetes cluster.
Deployment manifest
Section titled “Deployment manifest”apiVersion: apps/v1kind: Deploymentmetadata: name: agentcube-essbase namespace: agentcubespec: replicas: 1 selector: matchLabels: app: agentcube-essbase template: metadata: labels: app: agentcube-essbase spec: containers: - name: agentcube-essbase image: ghcr.io/caprusai/agentcube-essbase:{version} ports: - containerPort: 8080 env: - name: ESSBASE_SERVER_URL value: "https://{essbase_host}" - name: AGENTCUBE_CONNECTOR_MODE value: "admin" - name: AGENTCUBE_AUTH_MODE value: "delegated_basic" readinessProbe: httpGet: path: /health port: 8080 initialDelaySeconds: 10 periodSeconds: 15 resources: requests: cpu: "250m" memory: "512Mi" limits: cpu: "500m" memory: "1Gi"---apiVersion: v1kind: Servicemetadata: name: agentcube-essbase namespace: agentcubespec: selector: app: agentcube-essbase ports: - protocol: TCP port: 8080 targetPort: 8080This connector holds no Oracle credential: you enter the service-account credential when you register it in the Context Engine, using its in-cluster MCP URL (http://agentcube-essbase.agentcube.svc:8080/mcp).
Deploy the Context Engine (ghcr.io/caprusai/agentcube-ce:{version}) as its own Deployment and Service the same way, but with resource requests and limits of at least cpu: "1" and memory: 2Gi (the Context Engine minimum; see Container Images), with the environment from ce.env in Option B and a PostgreSQL database that has the pgvector extension installed. Then install the license and register the connectors as described above. Keep its secrets in a Kubernetes Secret.
PowerShell:
kubectl create secret generic agentcube-ce-secret --from-literal=AGENTCUBE_CE_DATABASE_URL={database_url} --from-literal=AGENTCUBE_CE_CREDENTIAL_KEY={credential_key} --from-literal=AGENTCUBE_CE_ADMIN_USERNAME={admin_username} --from-literal=AGENTCUBE_CE_ADMIN_PASSWORD={initial_admin_password} -n agentcubebash:
kubectl create secret generic agentcube-ce-secret \ --from-literal=AGENTCUBE_CE_DATABASE_URL={database_url} \ --from-literal=AGENTCUBE_CE_CREDENTIAL_KEY={credential_key} \ --from-literal=AGENTCUBE_CE_ADMIN_USERNAME={admin_username} \ --from-literal=AGENTCUBE_CE_ADMIN_PASSWORD={initial_admin_password} \ -n agentcubeThe admin username and password create the first admin console account; you can remove them from the Secret after you first sign in and change the password. Reference it from the Context Engine container with envFrom: [{secretRef: {name: agentcube-ce-secret}}]. Expose only the Context Engine via an Ingress with your cluster’s ingress controller (nginx-ingress, Traefik, etc.) and configure TLS termination there; the connector Services stay cluster-internal.
Verify
Section titled “Verify”PowerShell:
Invoke-RestMethod https://{ce_hostname}/health | ConvertTo-Json -Depth 5bash:
curl https://{ce_hostname}/healthThe response includes a license block (installed, status) and a connectors block with counts by status. A connector in delegated_basic mode always reports status: "healthy" and omits backend_connected (that field appears only in basic mode); watch its backend.status for Oracle reachability.
See Verification for the expected response and full verification checklist.
Network Considerations
Section titled “Network Considerations”| Requirement | Details |
|---|---|
| Inbound port 443 | Must be open from the public internet so Claude.ai / Copilot Studio can reach the Context Engine |
| Inbound port 80 | Recommended for HTTP → HTTPS redirect |
| Outbound to Oracle EPM | Connectors must reach your Oracle Essbase, Planning or FCCS URL |
| Outbound to licensing | The Context Engine must reach https://licensing.caprus.ai on 443. |
| Connectors | Internal only — reachable from the Context Engine, not from the internet |
| DNS | The Context Engine hostname must resolve publicly to your server’s IP |
| Firewall / NAT | If behind NAT, configure port forwarding for 443 to the host running nginx |