PHPackages                             jacked-php/jacked-server - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. jacked-php/jacked-server

ActivePackage

jacked-php/jacked-server
========================

An OpenSwoole based Server

0.1.24(10mo ago)81761MITPHPPHP &gt;=8.2CI failing

Since Aug 21Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/Jacked-PHP/jacked-server)[ Packagist](https://packagist.org/packages/jacked-php/jacked-server)[ RSS](/packages/jacked-php-jacked-server/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (20)Versions (50)Used By (0)

Jacked Server
=============

[](#jacked-server)

Overview
--------

[](#overview)

Jacked Server is a WebServer that support HTTP and WebSocket. Jacked Server is built with PHP/OpenSwoole. It doesn't only have the traditional approach for OpenSwoole servers: it also supports FastCGI (PHP-FPM)! That makes it more reliable when powering up your PHP applications that are not ready for a [Reactor Architecture](https://openswoole.com/how-it-works).

Quick Start
-----------

[](#quick-start)

> Run the following to prepare the sample laravel that we will serve (notice that you must have all the dependencies to run laravel):
>
> ```
> composer create-project --prefer-dist laravel/laravel /var/www/laravel
> php artisan migrate
> npm install
> npm run dev
> ```

### Using bare metal

[](#using-bare-metal)

Let's jack that laravel app! First, download the Jacked Server binary and run it:

```
wget https://github.com/Jacked-PHP/jacked-server/releases/download/v1.0.3-beta/jackit.phar
sudo chmod +x jackit.phar
./jackit.phar /path/to/laravel/public
```

> Note: you might need to be able to interact with php-fpm. This might involve running as root or www-data (`sudo -u www-data ./jackit /path/to/laravel/public`) and from a directory accessible by www-data users (`/var/www`).

Now you access the laravel app at the address .

### Using docker

[](#using-docker)

> This alternative doesn't require PHP with the necessary extensions to be installed on your machine (you would still need PHP for the previous laravel preparation - which won't require all the extensions that Jacked Server requires).

Let's jack that laravel app! For that, simply run the following command within the app's directory:

```
docker run -d --rm --name jacked-server -p 8080:8080 -v $(pwd):/var/www/app lotharthesavior/jacked-server:0.0.1
```

> Note that the latest version might not be the same as the one in the example command. Visit the [Docker Hub](https://hub.docker.com/repository/docker/lotharthesavior/jacked-server) to check the latest version.

Now you access the laravel app at the address .

> Remember to run the laravel necessary commands from inside the container then. As an example, if you want to run the Storage Link Artisan Command, you can do it with the following command:
>
> ```
> docker exec -it jacked-server bash -c "cd /var/www/app && composer install && php artisan storage:link"
> ```

Installation
------------

[](#installation)

Install composer package:

```
git clone https://github.com/Jacked-PHP/jacked-server.git
```

Copy the `.env.example` to `.env`:

```
cp .env.example .env
```

Navigate to that folder and run it:

```
./jackit
```

This will point to the local .env located at the root directory where jacked server is. The sample server simply displays a Hello world in the browser at the location mentioned in the terminal (usually at the address ).

You can customize the `.env` there for your needs, or create another one and set the path to it in the `--config` option.

As an example, to execute this server, serving a Laravel application, you can point the server to the laravel directory or point to a configuration file that does so. The config is the option `--config=`:

```
# point to the laravel directory
./jackit /path/to/laravel/public
# with the option:
/jackit --config=/var/www/.env-pointing-to-laravel
```

---

Parameters
----------

[](#parameters)

Check the `.env.example` file for start, but following you'll find a list of all the parameters that can be set in the `.env` file:

- **JACKED\_SERVER\_INPUT\_FILE:** The entry point of the server. e.g.: `/var/www/project/index.php`
- **JACKED\_SERVER\_DOCUMENT\_ROOT:** The document root of the server. e.g.: `/var/www/project`
- **JACKED\_SERVER\_LOG\_PATH:** The path to the log file. e.g.: `/var/www/project/logs/jacked-server.log`
- **JACKED\_SERVER\_LOG\_LEVEL:** The log level of the server. e.g.: `100` (DEBUG)
- **JACKED\_SERVER\_FASTCGI\_HOST:** The FastCGI host. e.g.: `unix:///run/php/php8.3-fpm.sock` (if it is a Unix socket) or `127.0.0.1` (if it is a TCP socket).
- **JACKED\_SERVER\_FASTCGI\_PORT:** The FastCGI port. e.g.: `9000` (if it is a TCP socket) or `-1` (if it is a Unix socket).
- **JACKED\_SERVER\_WEBSOCKET\_ENABLED:** Enable WebSocket. If enabled, [Socket Conveyor](https://socketconveyor.com) will be used to route WebSocket requests.
- **JACKED\_SERVER\_HOST:** The host of the server. e.g.: `0.0.0.0`.
- **JACKED\_SERVER\_PORT:** The port of the server. e.g.: `8080`.
- **JACKED\_SERVER\_SERVER\_TYPE:** The server type. e.g.: `2` (`OpenSwoole\Server::SIMPLE_MODE` - 1 - or `OpenSwoole\Server::POOL_MODE` - 2 -).
- **JACKED\_SERVER\_TIMEOUT:** The timeout of the server. e.g.: `60`.
- **JACKED\_SERVER\_READWRITE\_TIMEOUT:** The read-write timeout of the server. e.g.: `60`.
- **JACKED\_SERVER\_SSL\_PORT:** The SSL port of the server. e.g.: `443`.
- **JACKED\_SERVER\_SSL\_ENABLED:** Enable SSL. Accepts `true` or `false`.
- **JACKED\_SERVER\_SSL\_CERT\_FILE:** The SSL certificate file. e.g.: `/path/to/ssl-cert`.
- **JACKED\_SERVER\_SSL\_KEY\_FILE:** The SSL key file. e.g.: `/path/to/ssl-key`.
- **JACKED\_SERVER\_REACTOR\_NUM:** The number of reactors. e.g.: `4`.
- **JACKED\_SERVER\_WORKER\_NUM:** The number of workers. e.g.: `4`.
- **JACKED\_SERVER\_STATIC\_ENABLED:** Enable static handler. e.g.: `true`.
- **JACKED\_SERVER\_STATIC\_LOCATIONS:** The static handler locations. e.g.: `/imgs,/css,/js,/build`.
- **JACKED\_SERVER\_PID\_FILE:** The PID file of the server. e.g.: `/var/www/project/jacked-server.pid`.
- **JACKED\_SERVER\_AUDIT\_ENABLED:** Enable audit. e.g.: `false`.
- **JACKED\_SERVER\_WEBSOCKET\_AUTH:** Enable WebSocket authorization. e.g.: `false`.
- **JACKED\_SERVER\_WEBSOCKET\_SECRET:** The WebSocket secret. e.g.: `my-super-secret`.
- **JACKED\_SERVER\_WEBSOCKET\_TOKEN:** The WebSocket token. e.g.: `my-token` (or some difficult hash if auth is enabled).
- **JACKED\_SERVER\_WEBSOCKET\_USE\_ACKNOWLEDGMENT:** Enable WebSocket acknowledgment. e.g.: `false`. Check the [Socket Conveyor documentation](https://socketconveyor.com) for more information.
- **JACKED\_SERVER\_REQUEST\_INTERCEPTED\_URIS:** The URIs that will be intercepted by the Jacked Server. e.g.: `/api/v1/intercepted,/api/v1/intercepted2`.
- **JACKED\_SERVER\_PERSISTENCE\_DRIVER:** The persistence driver. e.g.: `sqlite` - the only currently supported persistence for now.
- **JACKED\_SERVER\_PERSISTENCE\_SQLITE\_DATABASE:** The SQLite database. e.g.: `:memory:`.

Events
------

[](#events)

The server fires several events during its lifecycle:

- **JackedServerStarted:** Fired when the server starts.
- **JackedRequestReceived:** Fired when a new request is received.
- **JackedRequestError:** Fired when there's an error in processing the request.
- **JackedRequestFinished:** Fired when the request processing is finished.

WebSocket
---------

[](#websocket)

As said, this server comes with WebSocket out of the box, routed with Socket Conveyor. To enable it, add the following setting to your `.env` file:

```
JACKED_SERVER_WEBSOCKET_ENABLED=true
```

With this set, you can follow the coordinates on how to interact with the WebSocket server at the [Conveyor documentation](https://socketconveyor.com).

### WebSocket Authorization

[](#websocket-authorization)

To authorize with the WebSocket Server, you first need to get a token. This is done by sending an HTTP POST request to the server at the endpoint `/broadcasting/auth`. Your request must be authorized with a Bearer token (with the following header: `Auhtorization: Bearer {token here})`. This bearer token is set at the `.env` `JACKED_SERVER_WEBSOCKET_TOKEN`. You must select the channel at the body of this request. The body has the following format:

```
{
    "channel_name": "test-channel"
}
```

This body will define which channel this connection is authorized to connect to.

The server will respond with a JSON object containing the `auth` key. This token at the `auth` key is the token you need to use to connect to the WebSocket server.

The token at the `auth` key in the response is a JWT token. This token is used to authenticate the WebSocket connection. The token is sent as a query parameter `token` when connecting to the WebSocket server. e.g.: `ws://127.0.0.1?token=your-token-here`.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance53

Moderate activity, may be stable

Popularity17

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~14 days

Recently: every ~65 days

Total

48

Last Release

327d ago

Major Versions

0.1.23 → v1.0.0-beta2024-09-10

### Community

Maintainers

![](https://www.gravatar.com/avatar/90c2bdf7a2fb985ab0c72c842c4f7cbff79cb172deb85c06edf0bedceb3c9498?d=identicon)[lotharthesavior](/maintainers/lotharthesavior)

---

Top Contributors

[![lotharthesavior](https://avatars.githubusercontent.com/u/1092909?v=4)](https://github.com/lotharthesavior "lotharthesavior (99 commits)")

---

Tags

httplaravelopenswoolephpwebsockets

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/jacked-php-jacked-server/health.svg)

```
[![Health](https://phpackages.com/badges/jacked-php-jacked-server/health.svg)](https://phpackages.com/packages/jacked-php-jacked-server)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.6k509.9M17.0k](/packages/laravel-framework)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)[concrete5/core

Concrete core subtree split

19159.3k48](/packages/concrete5-core)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

7310.3k29](/packages/open-dxp-opendxp)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
