# Swoole

Swoole is a self-hosted development app. Official Docker image for Swoole, an event-driven networking engine and coroutine runtime for PHP. It is open source and self-hosted, installable on Docker Hub.

Canonical page: https://ourlocalhost.com/app/5816/swoole

## Description

Official Docker image for Swoole, an event-driven networking engine and coroutine runtime for PHP. It provides an event loop, coroutine scheduler, and built-in servers and clients for building persistent network services and concurrent I/O applications, letting you handle many connections without a separate PHP process per request — a good fit for HTTP APIs, WebSocket apps, and TCP/UDP gateways.

## Platform availability

Available on 0 of 10 platforms.

## Health score

76/100 (Good), based on 4 of 5 factors.
- Maintained: 100 (last commit 16 days ago)
- Popular: 86 (18,932 GitHub stars)
- Easy to install: 25 (0 install platforms, install notes, Docker image)
- Security check: 66 (no serious findings, tests, OpenSSF Scorecard 3.8/10)

## Links

- GitHub: https://github.com/swoole/swoole-src
- Docker Hub: https://hub.docker.com/r/phpswoole/swoole
- Official website: https://www.swoole.com

## Common questions

### How do I install Swoole into PHP so the classes are recognized?

Install the Swoole extension using PECL and enable extras such as OpenSSL or MySQL if your app needs them. Without the extension, PHP will not recognize Swoole classes and the app will fail at startup.

### How do I start a Swoole server?

Run your Swoole server script with php /path/to/your_file.php. Swoole is not started by a built-in service name, so if you skip this nothing is listening for web requests.

### How do I keep Swoole events or timers running?

Call Swoole\Event::wait() after setting up events or timers. Without it, the PHP process ends immediately and the timers or network events never run.

### What should I do if Swoole cannot bind to an IP or port?

Another process may be using the same IP and port. Kill that process or change the hostname and port number.

### What Docker setup issue has been reported with Swoole and Laravel?

A Laravel 9 app using Swoole inside Docker can suffer a significant performance drop. The report specifically noted the issue on custom Docker networks.

---
Source: Our Local Host (https://ourlocalhost.com/app/5816/swoole), the self-hosted and open-source app directory.
