Skip to content

Add local server#1046

Open
saeedvaziry wants to merge 3 commits into4.xfrom
feat/local-server
Open

Add local server#1046
saeedvaziry wants to merge 3 commits into4.xfrom
feat/local-server

Conversation

@saeedvaziry
Copy link
Member

@saeedvaziry saeedvaziry commented Mar 13, 2026

Summary

  • Registers the host machine Vito runs on as a managed "local" server, so users can deploy sites to the same server
  • Adds is_vito_service flag on services (nginx, php 8.4, redis, supervisor) to identify services Vito depends on — these cannot be uninstalled, but can be restarted/managed with a warning alert
  • The local server cannot be deleted, rebooted, or transferred
  • The Local provider is hidden from the create-server UI
  • php artisan server:setup-local bootstraps the local server (idempotent, called during install and update)
  • Install script now supports VITO_CHANNEL=branch to install directly from a branch

Test from branch

curl -s https://raw.githubusercontent.com/vitodeploy/vito/feat/local-server/scripts/install.sh |V_ADMIN_EMAIL=admin@example.com V_ADMIN_PASSWORD=password VITO_VERSION=feat/local-server VITO_CHANNEL=branch bash

Changes

New files

  • app/ServerProviders/Local.php — minimal provider, copies Vito's SSH keys
  • app/Console/Commands/SetupLocalServerCommand.phpserver:setup-local artisan command
  • database/migrations/..._add_is_vito_service_to_services_table.php
  • tests/Feature/LocalServerTest.php — 11 tests

Backend

  • Server::isLocal() helper
  • Service model — is_vito_service column
  • RegisterServerProviderhidden() support
  • ServerPolicy::delete() — blocks local server deletion
  • CreateServerRule::notIn(['local'])
  • RebootServer / TransferServer — validation errors for local server
  • Uninstall — blocks uninstall of vito services
  • ServerResource / ServiceResource — expose is_local / is_vito_service

Frontend

  • Create server dropdown filters hidden providers
  • Services table shows "vito" badge, hides uninstall for vito services
  • Action dialogs show warning alert for vito services
  • Server settings hides delete/transfer cards for local server

Scripts

  • install.sh — calls server:setup-local, supports VITO_CHANNEL=branch
  • update.sh — calls server:setup-local after migrations

@saeedvaziry saeedvaziry changed the title Add local server feature Add local server Mar 13, 2026
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