← Back to dashboard
openshiphostingfreshReader view (for NotebookLM)

Openship Integration Guide

What is Openship?

The real model

The self-hosted deploy tier — and the reason codeAmani maintains a fork rather than running it stock.

Two compose files share a shape and have opposite jobs: docker/docker-compose.yml is the self-host stack (pulls ghcr.io/oblien/*, includes the OpenResty edge on :80/:443, mounts /var/run/docker.sock) while the ROOT docker-compose.yml is the from-source control plane and cannot host your apps. That socket mount is effectively host root, so an Openship Compose box is fully trusted infrastructure — never co-tenanted; on boxes that only manage remote servers, openship up --no-host-control drops the container-to-host SSH key. Upstream is at 0.9.3 (npm openship now ships the CLI plus the Ship SDK: openship/client and openship/native), and 0.8.0 encrypts env vars at rest with BETTER_AUTH_SECRET in a one-way migration — back up the database and the key together. codeAmani runs codeAmani-Solutions/open-ship (still on 0.6.8, Bun + Turbo monorepo) with a compose override that moves the fleet off the CLI's :4000 onto dashboard 3246 / API 3247, a deploy-agent SSH container because the API cannot SSH the WSL host, and Hazina-injected secrets split across .env (compose) and .env.local (operator) so mailbox passwords never enter the API container. Two fork fixes are load-bearing: the deploy-agent image must carry docker-buildx-plugin or docker build --progress=plain exits 125, and host /etc/letsencrypt must be bind-mounted because certsExist() inspects the deploy target's filesystem, not the edge's. Against the managed guides — vercel stays the default, render owns always-on managed processes, R2 serves assets at zero egress — Openship is the deliberate pick when the box has to be yours: several cost-sensitive KES-denominated apps on one Hetzner VPS, with Postgres, Redis, and a mail engine on the same host. Its edge does rate limits, bans, and analytics, but no CDN, caching, Brotli, or HTTP/3, so put Cloudflare in front for low-bandwidth users.

Six things you reach for first

One control plane, three interfaces, and an MCP endpoint — the CLI is also how you install and operate the instance.

Text
 ██████╗ ██████╗ ███████╗███╗   ██╗███████╗██╗  ██╗██╗██████╗
██╔═══██╗██╔══██╗██╔════╝████╗  ██║██╔════╝██║  ██║██║██╔══██╗
██║   ██║██████╔╝█████╗  ██╔██╗ ██║███████╗███████║██║██████╔╝
██║   ██║██╔═══╝ ██╔══╝  ██║╚██╗██║╚════██║██╔══██║██║██╔═══╝
╚██████╔╝██║     ███████╗██║ ╚████║███████║██║  ██║██║██║
 ╚═════╝ ╚═╝     ╚══════╝╚═╝  ╚═══╝╚══════╝╚═╝  ╚═╝╚═╝╚═╝

Openship Integration Guide

Focus: Running codeAmani's own deploy platform. Install the control plane, deploy a repo end to end, drive it from code (Ship SDK) and agents (MCP), and operate the local fork (codeAmani-Solutions/open-ship) that fronts the fleet.

Overview

Openship is an open-source, self-hostable deployment platform with built-in CI/CD, licensed Apache-2.0 (repo LICENSE, npm metadata). Point it at a GitHub repo, a folder on disk, or a prebuilt image and it runs one pipeline: detect the stack, build an image, run it on loopback, then write an OpenResty reverse-proxy route and issue a Let's Encrypt certificate. Push-to-deploy, PR previews, rollbacks, managed Postgres/MySQL/MongoDB/Redis, a built-in Postfix + Dovecot mail server, and backups all live in the same control plane.

Four interfaces drive the same backend: a desktop app (Electron), a web dashboard (Next.js), the CLI, and since 0.8.0 the Ship SDK (openship/client, openship/native), all in one npm package. A REST API and an MCP endpoint let agents drive it.

⚠️ Name collision. openshiporg/openship is an unrelated e-commerce order-fulfilment project. This guide covers oblien/openship, the deployment platform at https://openship.io.

Current version (verified 2026-10-20)

npm openship0.9.3 (published 2026-10-17). Description: "Openship SDK and CLI for native and remote deployments"
GitHub releasev0.9.3 (2026-10-17). Release cadence is about weekly.
Nodeengines.node >=22 (the CLI warns on 20 and 21, and refuses below 20)
LicenseApache-2.0
codeAmani fork0.6.8, 13 fork commits, last commit 2026-08-29. It is four minor versions behind (see Breaking changes)

What changed since this guide was written (0.6.7 → 0.9.3)

ReleaseDateHeadline
0.6.8 – 0.7.2Aug 25 – Sep 5Fix releases (release notes are "bump + announce" only)
0.8.0Sep 27Server clusters (managed WireGuard private networking + k3s), app replicas 1–100, clustered PostgreSQL and sharded Redis, shared volumes, S3 DB backups, Node SDK, much larger MCP surface, releaseCommands, wildcard TLS, env/build-args encrypted at rest
0.8.1Oct 6Openship Cloud managed servers with monthly plans, passkeys + TOTP 2FA, GitHub access decoupled from sign-in
0.8.2Oct 6Desktop updater fix ("Redirect was cancelled")
0.9.0Oct 12Openship Actions (GitHub-style CI on your own Linux/macOS runners), move the control plane between Desktop and a server, GitHub deployment Checks on by default, Cloud Pages for static sites
0.9.1Oct 13Public app catalog, runtimeVersion / runtimeImage overrides, path-only domain routing
0.9.2Oct 16Workers and schedulers declared in openship.json, managed Cloudflare Tunnel ingress, reusable BuildKit caches
0.9.3Oct 17Opt-in GitHub PR previews (same-repo, non-draft, isolated vars and volumes), command-variable → encrypted env migration

Where it sits next to the managed hosts and the other self-hosted PaaS

VercelRailwayRenderCoolify / DokployOpenship
ModelManaged serverlessManaged containersManaged containersSelf-hosted PaaSSelf-hosted PaaS (+ optional managed Cloud)
Who runs the machineVercelRailwayRenderYouYou (or Openship Cloud)
Long-running processes / workers✗ functions✓✓✓✓ (workers + schedulers since 0.9.2)
Cost at restPer seat + usageUsagePer serviceVPS rentVPS rent (Cloud: $5–$99/mo per server)
TLS / routingAutomaticAutomaticAutomaticTraefik + LEOpenResty + LE; you own renewals
Edge featuresGlobal CDN, WAFCDNCDNTraefik middlewaresReload-free per-route rate limits, IP/geo/UA bans, built-in analytics. No CDN, no cache, no HTTP/3, no WAF
Multi-servern/an/an/aSSHSSH + WireGuard + k3s clusters (0.8.0)
Agent surfaceMCPMCPMCPMCP (Coolify read-only, Dokploy full API)MCP, write-capable, every call re-authorized
DistinctiveDX, previewsDXManaged always-onCoolify: 280+ templatesAdopts running Coolify/Dokploy/Dokku stacks and proxies; built-in mail server; desktop mode with no daemon

The Coolify / Dokploy / Dokku column and Openship's "no CDN / HTTP/3 / WAF" caveat come from Openship's own migration guide, which states its own gaps candidly. It is still a vendor comparison, so verify it before you lean on it.

Reach for Openship when infra has to stay in-house, when one €5–€20 VPS must carry several apps that would each be a paid Render or Railway service, or when the same box also hosts Postgres, Redis, and mail. Stay on Vercel (codeAmani's default) for marketing sites, the dashboard, and anything where a git push shipping itself is worth more than owning the box.

Official Documentation


Self-hosting requirements

NeedDetail
Control-plane host (Compose mode, recommended for a VPS)Linux with Docker. Runs Postgres, Redis, API :4000, dashboard :3001, and an OpenResty edge on :80/:443 (host networking, so Linux only).
Bare modemacOS, Windows, or Linux without Docker. One process with embedded PGlite. It deploys out to SSH servers or Cloud and does not host apps itself.
Node22+ for npm i -g openship. The install script supplies its own Node.
Service managersystemd (Linux), launchd (macOS), or a Scheduled Task on Windows (best effort). Without systemd, use openship up --foreground or raw Compose.
Target serversAny SSH-reachable Linux (Ubuntu/Debian work well), with key, password, or agent auth. Openship installs docker + git on setup, then openresty, certbot, and rsync on first need. Cloudflare Access SSH is supported, so :22 does not have to be public.
Clusters (0.8.0+)Two or more SSH servers with bidirectional private connectivity: an existing private network, or Openship-managed WireGuard. Openship installs k3s. Provider firewall rules are shown before apply.
Public HTTPSA domain with A/AAAA records to the box (HTTP-01), or a connected DNS provider for wildcard certs, or a managed Cloudflare Tunnel (0.9.2). Push-to-deploy and OAuth for MCP both need an always-on public origin.
Data you must keepThe database plus the instance encryption key (BETTER_AUTH_SECRET on API installs). Compose installs keep generated secrets in ~/.openship/compose/.env (previous copy kept at .env.bak).

Install

Bash
# macOS / Linux: checksum-verified bundle; brings its own Node when yours is < 22
curl -fsSL https://get.openship.io | sh

# pin a release (set the variable on sh, not on curl)
curl -fsSL https://get.openship.io | OPENSHIP_VERSION=0.9.3 sh

# or with a package manager on your own Node 22+
npm i -g openship@0.9.3
PowerShell
# Windows. The docs print git.openship.io/windows, which does not resolve.
# get.openship.io/windows redirects to scripts/install.ps1 in oblien/openship.
irm https://get.openship.io/windows | iex

Then run the wizard. It creates the first admin, wires your domain, and installs Openship as a boot service:

Bash
openship            # guided setup, then the control panel
openship open       # dashboard (default http://localhost:3001)
openship status
openship doctor     # also re-probes the host-control channel

Headless / CI (no prompts). Export OPENSHIP_ADMIN_PASSWORD from Hazina first so it stays out of shell history:

Bash
openship up --non-interactive \
  --admin-email ops@example.com --admin-name "Ops" \
  --domain-kind custom --hostname ops.example.com \
  --acme-email ops@example.com --edge migrate

--domain-kind takes byo (your own proxy), custom (Openship's edge issues LE), free (<slug>.opsh.io, needs Cloud connect first), or none. --edge migrate|takeover|cancel pre-answers what happens to an existing proxy holding :80/:443. Add --dry-run to preview.

CommandPurpose
openship up [--compose|--bare] [--public-url URL] [--foreground] [--no-ui]Install and start as a service
openship up --no-host-controlDo not create the container→host SSH key (see Security)
openship stop / openship update [--check] [--via npm|bun]Stop / update. Re-run openship up after update, because the running service keeps the old version until restarted
openship uninstall [--keep-data] [--keep-images] [--yes]Remove the control plane. Deployed apps keep running

Raw Docker Compose (no CLI)

Bash
git clone https://github.com/oblien/openship.git && cd openship
cp .env.example .env          # fill in secrets first
docker compose --env-file .env -f docker/docker-compose.yml up -d

docker/docker-compose.yml pulls ghcr.io/oblien/*. The root docker-compose.yml is the from-source SaaS control plane (no edge, no socket) and cannot host your apps. Raw Compose does not provision the host-control SSH channel, so :80/:443 takeover, the mail engine, and host-written catalog configs refuse until you do the five manual steps in .env.example (see /docs/troubleshooting/host-channel). openship update will not touch a raw-Compose stack. Upgrade it by pinning OPENSHIP_VERSION in .env, then pull and up -d.


Deploy a project

Bash
cd your-project
openship init
openship deploy --watch
openship logs

CI: openship project git auto-deploy my-app --enable adds a GitHub webhook that re-runs the pipeline on push and rebuilds only the monorepo services that changed. Since 0.9.0, repository deployments also publish GitHub Checks by default. That needs a GitHub App with Checks write access, because a PAT alone is not enough. 0.9.3 adds opt-in PR previews: same-repository, non-draft PRs only, with preview-only variables and isolated volumes. Production variables are never copied, and forks are excluded.

openship.json additions since August

KeySinceWhat it does
releaseCommands0.8.0Run in order after build, against the candidate release's env (migrations). 10-minute budget each. Failure blocks activation, and rollbacks skip them. Single-app Docker and Bare only.
runtimeVersion / runtimeImage0.9.1Pin the runtime (for example PHP 8.3/8.4), or override the production base image for Docker source builds.
Workers / schedulers (roles)0.9.2Extra containers from the app image with their own command and no published ports. Schedulers are singletons. Single-app self-hosted Docker only.

Detected stacks: Node, Python, Go, Rust, PHP, Ruby, Java, .NET, Dockerfiles, Compose files, and monorepos. Next.js standalone and Nuxt output are prepared automatically (0.9.3).


Ship SDK (0.8.0+)

The same openship package now exports a typed SDK. Imports are passive: importing does not start the CLI or open a database.

ImportUse
openship/client → OpenshipClientTalk to an existing self-hosted or Cloud API (https://api.openship.io for Cloud)
openship/native → createShipEmbed an engine in your own Node app (PGlite storage, explicit start() / close(), needs a ≥32-byte encryption key)
openshipBoth, plus OperationError, iteratePages, consumeDeploymentEvents, and types
TypeScript
import { resolve } from "node:path";
import { OpenshipClient } from "openship/client";

const ship = new OpenshipClient({
  baseUrl: "https://open-ship-api.codeamani.com",   // no credentials or query string allowed
  token: process.env.OPENSHIP_TOKEN!,                // opsh_pat_..., from Hazina
  organizationId: process.env.OPENSHIP_ORGANIZATION_ID!,
});

const run = await ship.deploy({ name: "my-app", source: { type: "directory", path: resolve("./app") } });
const outcome = await ship.deployment(run.deployment_id).wait({ timeoutMs: 600_000 });
if (!outcome.success) throw new Error(outcome.status);

Behaviour to know: the client never follows redirects and never retries mutations. On a lost response, inspect state before you resubmit. Aborting a log stream or a wait() does not cancel the deployment, so call deployment(id).cancel(). ready and no_changes are the success states. Full runnable versions are in examples/ (type-checked against openship@0.9.3).


CLI map (0.9.3)

GroupCommands
Run / update the instanceup, stop, update, install, uninstall, open, status, doctor, reset-admin-password
Deployinit, deploy, deployment, logs, app
Resourcesproject (git, routing, volume, database, connections), service (env), domain (dns)
Access & APIlogin, logout, context, token, access, api, credential
Servers & fleetserver (cluster, network, managed, containers, tunnel, github), edge (rules), dns (ingress)
Opsbackup (policy, run, destination), job, mail, migration, notification, webhook, analytics, audit, system, settings, billing

Openship Actions has no dedicated command group yet. Drive it through openship api. Global flags: --json (use it from scripts and agents), --version, --help. Contexts live in ~/.openship/config.json.

PATs are opsh_pat_ + 43 random characters. Narrow them:

Bash
openship token create "ci-readonly" --read-only --expires 90
openship token create "deploy-bot" --grant project:proj_123:read,write
openship login --token opsh_pat_xxxxxxxxxxxx

A token is bound to the organization it was created in and acts as its creator, never more. Bearer tokens sent from the dashboard's own browser origin are rejected (401 BEARER_NOT_ALLOWED_FROM_BROWSER).


Architecture

  • The API is the single writer to the database.
  • Routing happens after the app is up, so a DNS or cert failure shows as "action required" and does not fail the deploy.
  • There is no resident agent on target servers. Openship drives them agentlessly over SSH (dockerode multiplexes the Docker API over SSH streamlocal). The "deploy agent" in codeAmani's fork is an SSH target container, not an upstream component.

Security model: what the deploy path can touch

This is the part to read before exposing an instance.

SurfaceWhat it isBlast radiusControl
Docker socket in the api container (Compose mode)Needed to build and run appsHost root for anyone who controls the APITreat dashboard access as host access. Never co-tenant. Keep the dashboard off the public internet (OPENSHIP_BIND_ADDR, Cloudflare Tunnel + Access)
Host-control channelSSH key that openship up authorizes for the invoking user, reached via host.docker.internalHost shell, :80/:443 takeover, port scansopenship up --no-host-control on boxes that only manage remote servers. It is CLI-only by design, and it is defense in depth, not isolation
SSH credentials to target serversKey, password, or agent. Stored by the control planeWhatever that user can do (usually root)Use a dedicated key per server and prefer agent auth. Cloudflare Access transport keeps :22 private
Runtime isolationDocker: one container per deployment, per-project bridge network openship-<slug>, project-prefixed volumes, random loopback portsKernel-levelBare mode shares the host filesystem, network, and users and has no CPU/memory caps. Run only trusted code there
Openship Actions runners (0.9.0)Native runners, or runners with a host Docker socketRun trusted code with that server user's accessFork code is blocked by default. Approved fork runs use disposable Cloud runners without secrets. For stronger separation, use disposable VMs
Secrets at restEnv, build args, and Compose snapshots encrypted since 0.8.0. 2FA secrets are encrypted with BETTER_AUTH_SECRETLosing the key means losing the secretsBack up the DB and the key together. "Download .env" and project export are plaintext, so treat those files as secrets
MCPPOST /api/mcp, OAuth 2.1 or PATExactly the grantEvery tools/call re-runs auth and per-resource checks. tokens, auth, and mcp modules can never become tools. Tools carry readOnlyHint / destructiveHint
Unauthenticated floodsPer-IP guard before auth (0.8.0)n/aBehind a proxy, set TRUST_PROXY / OPENSHIP_TRUST_EDGE=true so the guard sees real client IPs
AccountPasskeys + TOTP 2FA + recovery codes (0.8.1)n/aTurn on 2FA for every admin on any internet-reachable instance
UpdatesPulled from public GitHub releases. Checksum-verified bundle. Desktop verifies SHA-256 and publisher signaturen/aAuto-update is off by default on servers. Pin OPENSHIP_VERSION for Compose
TelemetryStructured error upload is disabled for Desktop, self-hosted, native, and CLI (0.9.0)n/aOnly Openship Cloud stores sanitized events

Driving Openship from Claude Code (MCP)

Bash
# OAuth 2.1: browser consent where you pick read-only/full and which projects/servers/repos
claude mcp add --transport http --scope user openship https://openship.example.com/api/mcp

# Static-token fallback: mint a read-only or scoped PAT for agents
claude mcp add --transport http openship https://openship.example.com/api/mcp \
  --header "Authorization: Bearer opsh_pat_…"
  • The endpoint is stateless Streamable-HTTP JSON-RPC 2.0, POST only (GET returns 405), with no batching.
  • Use the public HTTPS origin. localhost breaks OAuth discovery, and hosted agents (for example hosted Codex tasks) cannot reach a private instance at all.
  • Start an agent session with get_permissions_workspaces to get the organizationId. Tokens and OAuth grants are bound to one organization.
  • Since 0.8.0 the tool set covers networking, clusters, replica scaling, managed databases, shared files, backup/restore, migration, and diagnostics, with ordered prompts (prompts/list) for multi-step flows. Call tools/list to see what your grant exposes.
  • A scope miss returns 404, not 403.

codeAmani's fork — the local fleet control plane

The working checkout lives in WSL Ubuntu at ~/projects/grok-projects/open-ship (read-only snapshot taken 2026-10-20):

originhttps://github.com/codeAmani-Solutions/open-ship.git
upstreamhttps://github.com/oblien/openship.git. v0.6.8 merged (0adc1e79). The local upstream/main ref has not been fetched past 0.6.8
Branch / versionmain, package.json 0.6.8, 13 commits ahead of the local upstream/main ref, last commit 2026-08-29
Uncommitteddocker-compose.override.yml modified, plus untracked AGENTS.md, decisions.md, status.md, scripts/migrate-ghost-postgres.sh, and others
ShapeBun + Turbo monorepo: apps/{api,cli,dashboard,desktop,edge,email,web}, packages/*

Upstream's ports (:4000 / :3001) are not what this machine runs, because 127.0.0.1:4000 belongs to the global openship CLI. docker-compose.override.yml supplies the fleet topology:

SurfaceHost portURL
Dashboard3246http://127.0.0.1:3246
API3247http://127.0.0.1:3247/api/health
Marketing web3236http://127.0.0.1:3236
Deploy-agent SSH2222ssh -p 2222 -i ssh-keys/id_ed25519 root@127.0.0.1
Webmail20000http://127.0.0.1:20000
Public dashboardCloudflare tunnelhttps://open-ship.codeamani.com → :3246
Public APICloudflare tunnelhttps://open-ship-api.codeamani.com → :3247

Bring-up (repo root, inside WSL):

Bash
hazina inject open-ship --check    # names only, never values
hazina inject open-ship            # writes .env.local
docker compose -f docker-compose.yml -f docker-compose.override.yml up -d
node scripts/dev-status.mjs

The fork deliberately runs the from-source root compose, not openship up. Its docs (2efb47c3) warn that openship up is a different stack and must not replace it.

What the fork adds

  1. deploy-agent/: an SSH target the control plane can reach. In Compose the API cannot SSH to the WSL host (no host sshd), so an Ubuntu 24.04 container is the target: openssh-server (PasswordAuthentication no, PermitRootLogin prohibit-password), docker-ce-cli, docker-compose-plugin, and docker-buildx-plugin (Openship passes --progress=plain, and the legacy builder exits 125). It runs network_mode: host on SSH_PORT=2222, mounts the host Docker socket, /var/lib/openship, and /etc/letsencrypt (certsExist() checks the target's filesystem). It persists sshd host keys under /var/lib/openship/sshd, and a systemctl shim starts OpenResty without systemd. Since 2efb47c3, host-control SSH also points at the deploy-agent on :2222.
  2. Product-issue operator loop. scripts/openship-api.mjs issues, dev-status.mjs [--strict], fleet-reconcile.mjs (recycles the stale API SSH pool after a deploy-agent recreate), and ops-watch.mjs --once.
  3. Agent MCP over subscription logins. Grok Build and Claude Code connect over Openship OAuth (grok login / claude login), not XAI_API_KEY / ANTHROPIC_API_KEY. The PAT fallback (OPENSHIP_MCP_TOKEN) is an Openship token.
  4. Dashboard additions (since August): a project Preview tab with desktop/mobile viewports, and grok-browser preview plus Chrome DevTools analytics capture (c611123f, 62fdfde4, df4c7d4a).
  5. Webmail (apps/email): mailbox identity, CID HQ signature, Outlook-style settings, PWA offline, OpenPGP passphrase encryption on send, and in-app redirects instead of VITE_PUBLIC_APP_URL (1067be4d).

⚠️ Deploy-agent exposure (found 2026-10-20)

Read-only check: the deploy-agent's sshd listens on 0.0.0.0:2222 and [::]:2222. No ListenAddress is set, and network_mode: host publishes it on every interface of the WSL VM. Behind that login sit root, the host Docker socket, and /etc/letsencrypt. Pubkey-only auth is the only barrier. Until the fork is changed, do not enable WSL mirrored networking or forward :2222 past the Windows firewall. The fix belongs in the fork (ListenAddress 127.0.0.1 in entrypoint.sh), plus a key used only by the API. It was not applied, because this refresh is read-only on the fork.

Upgrading the fork to 0.9.x (not done; plan it)

  • Back up Postgres and the BETTER_AUTH_SECRET value first. 0.8.0 runs DB migrations and encrypts legacy plaintext service config on first start. Downgrading needs the matching pre-upgrade DB backup.
  • Update the API and dashboard together. Instance moves require matching versions at both ends.
  • Re-test the fork's patches against 0.8.0+ code paths: host-control SSH (now also used by k3s/cluster setup), certsExist(), the SSH pool reconcile, and the webmail app (upstream rewrote large parts of mail and webmail in 0.8.0–0.9.3).
  • Re-verify that the fork's MCP recipes still work. Tokens are now org-bound, and get_permissions_workspaces is the discovery step.

Secrets: Hazina, not .env by hand

All secrets for this checkout flow through Hazina project open-ship. There are two files, deliberately not collapsed:

FileOwnerConsumed by
.envCompose stackenv_file for api / dashboard
.env.localhazina inject open-shipscripts/auto-login-local.mjs, operator tooling

Do not env_file: .env.local into compose, or mailbox passwords enter the API container. Bound names: OPENSHIP_ADMIN_EMAIL, OPENSHIP_ADMIN_PASSWORD, BETTER_AUTH_SECRET, INTERNAL_TOKEN, POSTGRES_PASSWORD, CLOUDFLARE_TUNNEL_TOKEN, PORKBUN_API_KEY / PORKBUN_SECRET_KEY, RESEND_API_KEY, OPENSHIP_MCP_TOKEN.


Environment variables

Secrets (store in the vault, never commit):

Bash
POSTGRES_PASSWORD=change-me
BETTER_AUTH_SECRET=change-me-32-plus-random-bytes
INTERNAL_TOKEN=change-me
OPENSHIP_ADMIN_PASSWORD=change-me
OPENSHIP_TOKEN=opsh_pat_xxxxxxxxxxxx
OPENSHIP_ENCRYPTION_KEY=change-me-32-plus-random-bytes

OPENSHIP_TOKEN is used by the SDK and CLI. OPENSHIP_ENCRYPTION_KEY is needed only for the native SDK (createShip), must be at least 32 bytes, and must persist.

Non-secret settings:

VariablePurpose
OPENSHIP_VERSIONPin a release for reproducible image pulls / installs (for example 0.9.3)
OPENSHIP_PUBLIC_URLPublic origin. Without it, remote login is rejected
OPENSHIP_BIND_ADDRInterface published ports bind to (keep 127.0.0.1 behind a tunnel)
TRUST_PROXYtrue behind a reverse proxy / tunnel
OPENSHIP_TRUST_EDGEtrue delegates the pre-auth per-IP flood ceiling to the upstream proxy
OPENSHIP_EDGE_MODEHost OpenResty vs container edge (set by the CLI)
OPENSHIP_CLOUDFLARED_PATHAbsolute path to cloudflared for Cloudflare Access SSH targets
OPENSHIP_VENDOR_NODE1 / 0 to accept or decline the CLI's private Node 22 download non-interactively
OPENSHIP_URL, OPENSHIP_ORGANIZATION_IDSDK example inputs (API origin, workspace id)
API_PORT / DASHBOARD_PORTDefaults 4000 / 3001
GITHUB_CLIENT_IDOptional GitHub OAuth device flow on self-hosted

Breaking and behaviour changes since August (0.6.8 → 0.9.3)

ChangeSinceImpact
Env vars, build args, and Compose/deploy snapshots encrypted at rest. Legacy plaintext is converted on start0.8.0One-way. Back up the DB + BETTER_AUTH_SECRET before upgrading. Moving config between instances with different keys needs Data Transfer with secrets
npm openship is now SDK + CLI (exports map: ., ./client, ./native; ESM + CJS)0.8.0No CLI break. Projects pinning <0.8.0 have no SDK entry points
Tokens and OAuth/MCP connections bound to one organization0.8.x docsScripts that switched orgs with one token need a token per org
Desktop 0.8.0/0.8.1 updater broken0.8.2Desktop users on those versions must manually install ≥0.8.2 once. Server/CLI is unaffected
GitHub deployment Checks on by default0.9.0New Checks appear on PRs. Disable them per project if unwanted. They need GitHub App Checks permission
Static sites default to Cloud Pages on Cloud0.9.0Choose "Managed server hosting" to keep an nginx container
Omitted CPU/RAM limits no longer become caps0.9.2Containers share full host capacity unless limits are set. Existing saved limits stay
Cloud plans repriced: Hobby $5 / Starter $20 / Pro $39 / Scale $99 per server per month0.8.1Cloud only. No per-project count limit on new offers
PORT stripped from worker/scheduler roles0.9.2Roles never publish ports

codeAmani notes

  • Secrets server-side only, always via Hazina. hazina inject open-ship writes .env.local, and compose reads .env. Never commit either, and never print admin, tunnel, mailbox, PAT, or SSH key values. --check prints names only, so use it anywhere an agent can see. Exported .env downloads and project exports are plaintext: keep them out of repos and chat.
  • The Docker socket is the blast radius, now in three places: the api container, the fork's deploy-agent, and any Openship Actions runner given a socket. Each is host root. Keep the dashboard behind login + 2FA, publish only through the Cloudflare tunnel, and give agents read-only or scoped PATs. Write scope stays with the operator.
  • AI routing. Agents drive Openship over MCP on subscription logins (Claude Code / Grok Build). Openship itself calls no LLM, so no ANTHROPIC_API_KEY belongs in its env.
  • Openship Actions is not a replacement for GitHub Actions for releases. It explicitly does not implement attestations or protected environments. Per the SLSA policy in CLAUDE.md, anything codeAmani ships as an artifact still builds on GitHub's isolated SLSA L3 builders. An Openship deploy is a deploy, not an artifact, and its build snapshot is reproducibility, not attestation.
  • Payments. Stripe is the default. A self-hosted Openship app with a real domain and auto-renewing LE cert is a valid Stripe webhook or Daraja callback host, but only in always-on server/Cloud mode (not desktop/loopback). Verify signatures, and for M-Pesa deduplicate on CheckoutRequestID per MPESA_PATTERNS.md. Use releaseCommands for DB migrations so a failed migration blocks activation.
  • Cost is the argument for Kenya-targeted builds. Several KES-denominated WhatsApp + M-Pesa apps on one Hetzner/DigitalOcean box, with Postgres, Redis, and workers on the same host, beat a per-service USD bill. Pick a region near the users. Correction to the August guide: the Openship edge does not do Brotli, HTTP/3, or response caching (its own docs say so). For 2G/3G users, put Cloudflare in front (the managed Tunnel or proxied DNS) and follow AFRICAN_MARKET_GUIDE.md on bundle size.
  • Routing is not the primary host. Vercel stays the default. Render or Railway is the answer for a managed always-on process. Cloudflare R2 serves assets at zero egress. Openship is the option you pick deliberately, when owning the box is the point.

Troubleshooting

IssueFix
openship open fails / API not respondingopenship up, then retry. openship doctor for a diagnosis
Updated but still on the old versionThe service keeps running the old build. Run openship up after openship update
Update stops naming POSTGRES_PASSWORD / BETTER_AUTH_SECRETRan as a different user (for example sudo reads /root/.openship). Re-run as the install owner, or restore ~/.openship/compose/.env from .env.bak
Host operations hang (:80/:443 takeover, mail, host terminal)The container→host SSH channel is missing or blocked by ufw on filter/INPUT. See /docs/troubleshooting/host-channel
docker build exits 125 on a custom targetInstall docker-buildx-plugin (Openship passes --progress=plain)
SSL verify says "no certs" though the edge issued themcertsExist() reads the target's filesystem, so bind-mount host /etc/letsencrypt
Agent unreachable after recreating the deploy targetStale API SSH pool. Fork: node scripts/fleet-reconcile.mjs
MCP tools/call returns 404The resource is outside the token/OAuth grant (or another org). Re-authorize with it included
SDK call "hangs" on redirect / baseUrl rejectedThe client never follows redirects and refuses credentials or a query string in baseUrl. Use the final HTTPS origin
Desktop updater "Redirect was cancelled"Desktop 0.8.0/0.8.1 bug. Install ≥0.8.2 manually once
Windows installer URL does not resolveUse https://get.openship.io/windows, not the docs' git.openship.io/windows
npm i -g openship fails on Node versionNode 22+ is needed. Use the install script, or OPENSHIP_VENDOR_NODE=1