Skip to content

Replace nginx+PHP-FPM with FrankenPHP+Octane#1043

Draft
saeedvaziry wants to merge 13 commits into4.xfrom
feat/frankenphp
Draft

Replace nginx+PHP-FPM with FrankenPHP+Octane#1043
saeedvaziry wants to merge 13 commits into4.xfrom
feat/frankenphp

Conversation

@saeedvaziry
Copy link
Member

@saeedvaziry saeedvaziry commented Mar 12, 2026

Summary

  • FrankenPHP replaces nginx+PHP-FPM for serving Vito itself — bundles its own PHP binary so Vito is fully independent from system PHP
  • Local server provider with guard rails (block delete/transfer/reboot, protect critical services)
  • SSL configuration UI in admin settings using FrankenPHP's built-in ACME/Caddy support
  • Installation mode detection (VITO_MODE=local|docker|dev) for mode-specific behavior
  • Docker updated to use FrankenPHP (no more nginx/PHP-FPM in container)
  • System nginx remains installed for user-managed sites only
  • Vito runs on port 54331, WebSocket on 54332
  • No system PHP dependency — even composer install uses FrankenPHP's bundled PHP

New files

  • config/octane.php — Octane config with FrankenPHP server
  • resources/views/ssh/caddyfile.blade.php — Caddyfile template
  • app/Console/Commands/GenerateCaddyfileCommand.php — generates Caddyfile from config
  • app/Actions/Admin/UpdateVitoSSL.php — SSL settings action
  • resources/js/pages/vito-settings/components/ssl-settings.tsx — SSL config UI
  • app/ServerProviders/Local.php — local server provider
  • app/Console/Commands/SetupLocalServerCommand.php — bootstraps local server record
  • scripts/upgrade-to-frankenphp.sh — migration script for existing installs
  • scripts/install-from-pr.sh — install from PR branch for testing

Deleted

  • docker/nginx.conf — no longer needed
  • docker/php.ini — no longer needed

Test plan

Testing from PR branch

Run on a fresh Ubuntu server:

curl -s https://raw.githubusercontent.com/vitodeploy/vito/feat/frankenphp/scripts/install.sh | VITO_BRANCH=feat/frankenphp V_ADMIN_EMAIL=admin@example.com V_ADMIN_PASSWORD=password bash

Verification checklist

  • Fresh install: Vito accessible on port 54331 via FrankenPHP
  • WebSocket: /ws/events and /ws/terminal work through Caddy reverse proxy
  • Local server: "Vito" server appears in server list as READY
  • Create a site on local server (served by nginx on 80/443)
  • SSL: Enable SSL in admin settings → Caddyfile regenerated
  • Service independence: Restart/uninstall nginx → Vito keeps running
  • Update script: uses FrankenPHP binary, restarts octane
  • Docker: docker compose up works with FrankenPHP

🤖 Generated with Claude Code

saeedvaziry and others added 5 commits March 12, 2026 21:37
Vito now serves itself via FrankenPHP (embedded Caddy + PHP), making it
fully independent from system PHP and nginx. System nginx remains for
user-managed sites only.

Key changes:
- Add laravel/octane with FrankenPHP server
- Caddyfile template + `vito:generate-caddyfile` command
- Install/update scripts use FrankenPHP binary for all PHP operations
- Remove system PHP dependency from install (composer uses FrankenPHP)
- Docker setup uses FrankenPHP instead of nginx+PHP-FPM
- Installation mode detection (VITO_MODE=local|docker|dev)
- SSL configuration UI in admin settings (FrankenPHP's built-in ACME)
- Local server provider with guard rails
- WebSocket port changed to 54332 (sequential with Vito on 54331)
- Migration script for existing installations
- install-from-pr.sh for testing PR branches on fresh servers

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add PHPDoc type hint for $project to resolve property.notFound error.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
dpkg --print-architecture returns amd64/arm64, but FrankenPHP releases
use x86_64/aarch64 naming. Map the architecture before downloading.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Undoes everything from install/install-from-pr scripts so the server
can be reused for testing without reprovisioning.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Read from /dev/tty for interactive input, or skip with CONFIRM_RESET=yes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@saeedvaziry saeedvaziry marked this pull request as draft March 12, 2026 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant