v. 1.21.0


To run apps built with the CodeIgniter web framework using Unit:

  1. Install Unit with a PHP language module.

  2. Download CodeIgniter’s core files and build your application. Here, let’s use a basic app template, installing it at /path/to/app/.

  3. Set installation path permissions to secure access, for example:

    # chown -R app_user:app_group /path/to/app/

    Update the placeholders above with actual values, noting them for later use in Unit configuration.

  4. Next, put together the CodeIgniter configuration for Unit:

        "listeners": {
            "*:80": {
                "pass": "routes/codeigniter"
        "routes": {
            "codeigniter": [
                    "match": {
                        "uri": "!/index.php"
                    "action": {
                        "share": "/path/to/app/public/",
                        "fallback": {
                            "pass": "applications/codeigniter"
        "applications": {
            "codeigniter": {
                "type": "php",
                "user": "app_user",
                "group": "app_group",
                "root": "/path/to/app/public/",
                "script": "index.php"
  5. Upload the updated configuration. Assuming the JSON above was added to config.json:

    # curl -X PUT --data-binary @config.json --unix-socket \
           /path/to/control.unit.sock http://localhost/config/


    The control socket path may vary; run unitd --help or see Startup for details.

  6. After a successful update, your app should be available on the listener’s IP address and port:

CodeIgniter Sample App on Unit