# iop

> Ship Docker Anywhere

Latest version **0.2.17** (published 2025-08-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install iop
pnpm add iop
yarn add iop
bun add iop
```

Provides the command `iop`.

## Health

**Score 50/100 (C)** — status: stable.

Positive: has types; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 0.2.17 |
| Published | 2025-08-14 |
| First published | 2025-07-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=18 |
| Dependencies | 5 |
| Unpacked size | 720.9 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 328 |
| Author | elitan |
| Maintainers | elitan |
| Keywords | deployment, zero-downtime, docker, ssh, cli |

## Links

- npm: https://www.npmjs.com/package/iop
- Repository: https://github.com/elitan/iop
- Homepage: https://github.com/elitan/iop#readme
- Issues: https://github.com/elitan/iop/issues
- npm.io page: https://npm.io/package/iop

## Dependencies (5)

- [zod](https://npm.io/package/zod.md) ^3.24.4
- [js-yaml](https://npm.io/package/js-yaml.md) ^4.1.0
- [cli-progress](https://npm.io/package/cli-progress.md) ^3.12.0
- [ssh2-promise](https://npm.io/package/ssh2-promise.md) ^1.0.0
- [@types/cli-progress](https://npm.io/package/@types/cli-progress.md) ^3.11.6

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 0.2.17 (latest) — 2025-08-14
- 0.2.16 — 2025-08-13
- 0.2.15 — 2025-08-13
- 0.2.14 — 2025-08-13
- 0.2.13 — 2025-08-12
- 0.2.12 — 2025-08-12
- 0.2.11 — 2025-08-11
- 0.2.10 — 2025-08-11
- 0.2.9 — 2025-08-08
- 0.2.8 — 2025-08-02
- 0.2.7 — 2025-08-01
- 0.2.5 — 2025-08-01
- 0.2.4 — 2025-07-21
- 0.2.3 — 2025-07-21
- 0.2.2 — 2025-07-21
- … 2 more at https://npm.io/package/iop/versions

## README

# iop

> **⚠️ Warning**: This project is in rapid development and should not yet be used in production yet.
>
> [Join our Discord server](https://discord.gg/t4KetSPhWu) to keep up to date.

Zero-downtime Docker deployments with automatic HTTPS. Build locally, deploy to your servers.

**Install and configure:**

```bash
npm install -g iop
iop init
```

This creates your `iop.yml` configuration:

```yaml
# iop.yml
name: my-app

ssh:
  username: iop

services:
  web:
    build:
      context: .
    server: 157.180.47.213
    proxy:
      app_port: 3000
    environment:
      secret:
        - DATABASE_URL
```

**Deploy everything:**

```bash
❯ iop
[✓] Loading configuration (6ms)
[✓] Preparing infrastructure (1.1s)
[✓] Building locally
  ├─ [✓] Build web image (1.3s)
  └─ [✓] Package for transfer (2.2s)
[✓] Reconciling state (703ms)
[✓] Deploying services
  └─ web → 157.180.47.213
     ├─ [✓] Transfer image (6.1s)
     ├─ [✓] Zero-downtime deployment (3.0s)
     └─ [✓] Configure proxy (645ms)

Your app is live at:
  └─ web → https://a1b2c3d4-web-iop-157-180-47-213.app.iop.run
```

**That's it!** Fresh servers are automatically set up with Docker, SSL certificates, and security hardening.

## Features

- **Zero-downtime deployments**: Blue-green deployment strategy with automatic health checks and traffic switching
- **Registry-free**: Build Docker images locally, compress and transfer via SSH (no Docker registry setup needed)
- **Auto-SSL**: Let's Encrypt certificates with automatic renewal and instant domain provisioning
- **Server bootstrap**: Fresh Ubuntu/Debian servers configured automatically with security hardening
- **Multi-server support**: Deploy across multiple machines with automatic load balancing
- **Git-based releases**: Each deployment tagged with Git SHA for easy rollbacks via git checkout + redeploy
- **Secure by default**: Fail2Ban, automatic updates, SSH hardening, dedicated users, firewall configuration
- **Proxy management**: Built-in reverse proxy with HTTP/HTTPS termination and host-based routing
- **Comprehensive status**: Real-time deployment status across all servers and applications
- **Unified Services**: Services with `proxy` config get zero-downtime blue-green deployment, others get stop-start deployment
- **Network aliases**: Seamless traffic switching using Docker network aliases for true zero-downtime

## Why iop?

**Own your infrastructure** without the complexity. Deploy any Docker app to your servers with zero configuration.

**vs Kamal**:

- TypeScript/Bun instead of Ruby
- No Docker registry required - build locally, transfer directly
- Automatic fresh server setup and security hardening
- Instant domains with no DNS configuration needed

**vs Vercel/Netlify**:

- Your own servers - full control, no vendor lock-in
- Any Docker app - not limited to specific frameworks
- No cold starts - containers always running
- Cost-effective - pay only for your servers

**vs Docker Compose**:

- Zero-downtime deployments - Compose restarts cause downtime
- Multi-server support - deploy across multiple machines
- Automatic SSL certificates and reverse proxy
- Git-based releases with rollback capabilities

## Configuration

```yaml
name: my-app

ssh:
  username: iop

services:
  web:
    build:
      context: .
      dockerfile: Dockerfile
    server: 157.180.47.213
    proxy:
      hosts:
        - myapp.com #- optional, auto-generated if not provided
      app_port: 3000
    environment:
      secret:
        - DATABASE_URL

services:
  postgres:
    image: postgres:15
    server: 157.180.47.213
    environment:
      secret:
        - POSTGRES_PASSWORD
    volumes:
      - postgres_data:/var/lib/postgresql/data
```

Secrets in `.iop/secrets`:

```bash
DATABASE_URL=postgres://user:pass@localhost:5432/myapp
POSTGRES_PASSWORD=supersecret
```

## Commands

```bash
iop init                    # Create iop.yml and .iop/secrets
iop                         # Deploy all services (auto-setup included)
iop web                     # Deploy specific service by name
iop --verbose               # Deploy with detailed output
iop status                  # Check deployment status across all servers
iop proxy status            # Check proxy status on all servers
iop proxy update            # Update proxy to latest version
iop proxy delete-host --host api.example.com  # Remove host from proxy
iop proxy logs --lines 100  # Show proxy logs (default: 50 lines)
```

**Note**: Infrastructure setup is automatic. Fresh servers are detected and configured automatically during deployment - no separate setup command needed.

## Examples

**With custom domain:**

```yaml
name: my-app

ssh:
  username: iop

services:
  web:
    build:
      context: .
    server: 157.180.47.213
    proxy:
      hosts:
        - myapp.com
      app_port: 3000
    environment:
      secret:
        - DATABASE_URL
```

**With database service:**

```yaml
name: my-app

ssh:
  username: iop

services:
  web:
    build:
      context: .
    server: 157.180.47.213
    proxy:
      app_port: 3000
    environment:
      secret:
        - DATABASE_URL

services:
  postgres:
    image: postgres:15
    server: 157.180.47.213
    ports:
      - "5433:5432"
    environment:
      secret:
        - POSTGRES_PASSWORD
    volumes:
      - postgres_data:/var/lib/postgresql/data
```

## How it works

- **Registry-free deployment**: Build Docker images locally, transfer via SSH, deploy with zero downtime
- **Smart server setup**: Detects fresh servers and automatically installs Docker, hardens SSH, sets up users
- **Blue-green deployment**: New version deployed alongside current, health checked, then traffic switched atomically
- **Automatic HTTPS**: Provisions SSL certificates and domains automatically (or use your own)
- **Intelligent infrastructure**: Setup happens automatically during deployment - no separate commands needed

## Requirements

- **Local**: Node.js 18+ or Bun
- **Servers**: Ubuntu/Debian with SSH access (root for fresh servers)  
- **Ports**: 80, 443 open for HTTP/HTTPS traffic
- **Docker**: Installed locally for building images

Fresh servers only need root SSH access - iop handles Docker installation and security configuration automatically.

## Community

Join our Discord: https://discord.gg/t4KetSPhWu

## Development

```bash
git clone https://github.com/elitan/iop
cd iop
bun install
bun run build

# Link CLI for local development
cd packages/cli && bun link

# Now you can use iop globally
iop --help
```

**MIT License** - Made for developers who want simple, reliable deployments on their own infrastructure.

---
_Source: https://npm.io/package/iop · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
