Point DNS to your VPS
Create an A (or AAAA) record for yourdomain.com pointing to your server IPv4/IPv6 address before requesting TLS certificates.
Choose a Linux VPS with a public IP for one-command automatic HTTPS, or run on a home Mac, PC, or NAS behind Cloudflare Tunnel.
Works on Ubuntu 22.04+, Debian 12+, or any systemd Linux host with Node.js 24+ and a domain pointed at your server IP.
Create an A (or AAAA) record for yourdomain.com pointing to your server IPv4/IPv6 address before requesting TLS certificates.
The script checks Node 24, creates an isolated oksky system user and /var/lib/oksky SQLite directory, installs the systemd unit, configures optional Caddy auto-HTTPS, and prints a one-time /setup token URL.
curl -fsSL https://oksky.ai/install.sh | sudo sh
Open the printed https://yourdomain.com/setup?token=... URL to verify the one-time token, confirm your domain, create the admin @yourdomain.com handle, configure any of 9 model provider presets, and select your iOS push mode. Finishing locks /setup permanently (HTTP 410) and runs a /.well-known/sky-server self-check.
Clone the open-source repository and start services/oksky-homeserver/deploy/docker-compose.yml with Caddy TLS termination.
cd services/oksky-homeserver/deploy && docker compose up -d
Run your homeserver locally on 127.0.0.1:8787 and expose HTTPS on your own domain without opening router ports.
OkSky intentionally does not operate a proprietary "Connect" reverse tunnel. Home machines without a public IP use standard Cloudflare Tunnel (cloudflared) directly under your own Cloudflare account and domain.
Run oksky-homeserver bound to 127.0.0.1:8787. In Step 2 of /setup, choose Home / No Public IP to generate a ready-to-paste cloudflared configuration.
Route your domain directly to localhost:8787 so /.well-known/sky-server, /v1/federation/*, and /ws/dm are reachable over TLS.
tunnel: oksky
credentials-file: /path/to/<tunnel-id>.json
ingress:
- hostname: yourdomain.com
service: http://127.0.0.1:8787
- service: http_status:404
Authenticate with cloudflared tunnel login, bind DNS via cloudflared tunnel route dns oksky yourdomain.com, and run cloudflared tunnel run oksky.
cloudflared tunnel login
cloudflared tunnel create oksky
cloudflared tunnel route dns oksky yourdomain.com
cloudflared tunnel run oksky
Apple Push Notification service requires a signed certificate tied to the iOS app bundle. OkSky gives every self-hoster three explicit choices.
| Mode | Traffic Path | What Leaves Your Server | Setup Needed |
|---|---|---|---|
| push.oksky.ai (Default) | Homeserver -> push.oksky.ai -> Apple APNs | Fixed enum key (new_message / proactive), opaque conversation UUID, ephemeral device token, Ed25519 signature. Zero message text. Zero token storage. | Zero config; works out of the box with official iOS builds. |
| disabled | None (Pull / active E2EE session only) | Nothing. Zero requests sent to push.oksky.ai or Apple APNs. | Select "Disabled" during /setup or set OKSKY_PUSH_MODE=disabled. |
| direct_apns (Self-Signed .p8) | Homeserver -> Apple APNs directly | Signed ES256 JWT directly to api.push.apple.com using your own Apple Developer credentials. | Your own Apple Developer Team ID, Key ID, .p8 key, and custom iOS bundle build. |
Confirm your discovery document and health endpoint respond over HTTPS before pairing clients.
curl -fsSL https://yourdomain.com/healthz
curl -fsSL https://yourdomain.com/.well-known/sky-server