Only show guides for your app
Falix has three PHP applications — CLI, Composer, and Web Server. Here's what each one runs, when to pick it, and how to get dependencies and a website working.
PHP comes in three flavours on Falix, and picking the right one is most of the battle. They're separate applications with different startup behaviour: one for plain scripts, one for scripts with Composer dependencies, and one for full websites served by nginx. This guide covers all three and helps you choose.
| At a glance | |
|---|---|
| You need | A Falix server running one of the PHP applications |
| Plan | Any — on free it runs while your session timer has time left, premium runs 24/7 |
| Time | Fifteen minutes |
| No server yet? | Create your first app server |
| Application | Runs | Dependencies | Pick it for |
|---|---|---|---|
| PHP CLI | php index.php and nothing else |
None — a composer.json is ignored |
Standalone scripts and workers with no external libraries |
| PHP Composer | composer install first (if a composer.json exists), then your PHP file |
Installed for you on every start | Command-line apps and bots that do have dependencies |
| PHP Web Server | nginx and PHP-FPM together, serving a web root over your public port | Composer doesn't run — you provide vendor/ |
Actual websites |
You choose the application when you create the server. All three run PHP 8.3.
⚠️ Heads up: Switching a running server to a different application reinstalls it and wipes its files (the panel warns you first), so decide up front.
Both run a single PHP entry file, set by the PHP File variable on the Settings page (default index.php). The only difference is dependencies:
composer.json is present, composer install runs automatically on every start before your code — so your vendor/ folder is built for you from the lockfile. Edit composer.json, restart, watch it install.Here's a minimal index.php that keeps a worker alive and logs to the console:
<?php
while (true) {
echo "worker tick at " . date("H:i:s") . PHP_EOL;
sleep(60);
}
This application serves a website: nginx sits in front, PHP-FPM runs your code, and the public root is the folder named by the Web Root variable (default public). Your public/index.php becomes your homepage, reachable at your server's address (Network page) with no code changes to bind a port — the web server wires SERVER_PORT up for you.
Start from the template. Deploy the PHP Website template on this page before anything else. A fresh PHP Web Server's default configuration doesn't fill in your port, which leaves nginx crash-looping on startup — you'll see it fail to boot in the console. The template ships a corrected web-server config alongside a working public/ folder, so deploying it is the reliable way to get a serving website. Treat it as step one, not a fallback.
🎯 Good to know: Composer does not run on the Web Server application. If your site needs a
vendor/folder, you have two choices — uploadvendor/along with your code, or connect the Git page and add acomposer installpost-deploy command that builds it after each deploy.
All three PHP applications have a Packages page in the server menu, and it's the easiest way to manage libraries. Open Packages, type the package name into the Install package panel, and press Install — behind the scenes it runs composer require, updates your composer.json for you, and shows the job under Tasks. Restart afterwards so your app loads the new library. The page also lists your current dependencies, flags outdated ones, and warns about known vulnerabilities.
Hand-editing composer.json still works too (and is what Git-based projects do) — just remember that on the CLI and Web Server applications, you are responsible for producing vendor/, whereas the Composer application rebuilds it on every start.
On CLI and Composer the entry point is the PHP File variable — point it at any .php file. To run a genuinely separate app, don't switch back and forth destructively: give it its own Instance, an isolated application, files, and startup on the same server, switched whenever you like.
⚠️ Heads up: A reinstall — or switching to another application — can wipe your files,
vendor/included. On PHP Composer that's harmless:composer installrebuildsvendor/on the next start. On PHP CLI and PHP Web Server nothing reinstalls it for you, so you'll need to re-uploadvendor/or rebuild it with a Gitcomposer installpost-deploy command.
host not found in "SERVER_PORT" — the default web config never got your port. Deploy the PHP Website template, which ships the corrected config.Class "..." not found / Composer autoload errors — your vendor/ folder is missing. On the Composer application, check the composer install output at the top of the console; on the Web Server application, upload vendor/ or add a Git post-deploy composer install.index.php. Check the Web Root variable and where you uploaded your code.| Cheat sheet | |
|---|---|
| Entry file | index.php (PHP File variable) on CLI/Composer; Web Root public on Web Server |
| Dependencies | Packages page runs composer require; auto-installed only on PHP Composer |
| Web port rule | The Web Server wires SERVER_PORT up for you — no code needed |