PanelAlpha Documentation
Back Home
Live Demo Get Started

Artisan Commands

Documentation

    # Artisan Commands

    • Command Reference
    • Prerequisites
    • Running Artisan Commands
    • Access & Authentication
      • Generate API Token
    • System Health
      • Check Engine Version
      • Sync IPs to Network Interface
      • Rebuild ModSecurity Config
    • Users & Services
      • Rebuild All User Configs (vhosts, PHP-FPM pools)
      • Add Missing www Aliases
      • Fix File Permissions
    • Examples

    This reference lists the Artisan commands available inside the PanelAlpha Engine core container for troubleshooting and maintenance.

    # Command Reference

    Command Description Destructive?
    api-tokens:create <name> [--short] Generate an API token for connecting PanelAlpha to the Engine. No
    system:version Print the currently installed Engine version. No
    system:sync-ips-to-interface [--skip-errors] Push configured IPs to host network interfaces. Yes — modifies host networking
    system:rebuild-modsecurity-config Regenerate WAF/ModSecurity configuration. No
    users:rebuild --all --wipe-vhosts-dir [-v] Regenerate per-user web server config and PHP-FPM pools. Yes — --wipe-vhosts-dir deletes the vhosts directory
    users:add-missing-www-domain-aliases --all\|--username=<USERNAME> Restore www. aliases for affected domains. No
    users:fix-file-permissions --all Normalize ownership and permissions for user data. No

    # Prerequisites

    • Root or sudo access on the Engine host.
    • A running core container (the Engine stack must be up).
    • Run commands from the Engine host, not from inside a customer container.

    # Running Artisan Commands

    Use these commands to troubleshoot or maintain a PanelAlpha Engine server. Run them from the Engine host as root (or a sudo-capable user) against the core container.

    docker compose -f /opt/panelalpha/shared-hosting/docker-compose.yml exec -T core php artisan <command>
    
    • Replace <command> with any item listed below; add -v where noted for verbose output.
    • Keep -T to avoid an interactive TTY when running inside Docker.
    • Many commands accept flags such as --all, --username=, or --skip-errors.

    # Access & Authentication

    # Generate API Token

    Creates a token for connecting PanelAlpha to the Engine. Use --short to output only the token value. On older builds, use api-token:create.

    api-tokens:create <name> [--short]
    

    # System Health

    # Check Engine Version

    Prints the currently installed Engine version.

    system:version
    

    # Sync IPs to Network Interface

    Pushes configured IPs to the host interfaces. Use --skip-errors to continue on recoverable issues.

    Warning: This command modifies host network interfaces and may disrupt SSH connectivity. Run from a stable session.

    system:sync-ips-to-interface [--skip-errors]
    

    # Rebuild ModSecurity Config

    Regenerates WAF/ModSecurity configuration after rule or mode changes.

    system:rebuild-modsecurity-config
    

    # Users & Services

    # Rebuild All User Configs (vhosts, PHP-FPM pools)

    Regenerates per-user web server configuration and PHP-FPM pools. Add -v for more output.

    Warning: The --wipe-vhosts-dir flag deletes the vhosts directory and may affect running sites. Use with caution.

    users:rebuild --all --wipe-vhosts-dir [-v]
    

    # Add Missing www Aliases

    Restores www. aliases for affected domains (all users or a specific username).

    users:add-missing-www-domain-aliases --all
    users:add-missing-www-domain-aliases --username=<USERNAME>
    

    # Fix File Permissions

    Normalizes ownership and permissions for user data across containers.

    users:fix-file-permissions --all
    

    # Examples

    Generate a new token named panelalpha-prod and print only the token value:

    docker compose -f /opt/panelalpha/shared-hosting/docker-compose.yml exec -T core php artisan api-tokens:create panelalpha-prod --short
    

    Expected output (a short token string):

    1|abcdef0123456789...
    

    Fix file permissions for every account:

    docker compose -f /opt/panelalpha/shared-hosting/docker-compose.yml exec -T core php artisan users:fix-file-permissions --all
    

    Rebuild ModSecurity configuration after changing rules:

    docker compose -f /opt/panelalpha/shared-hosting/docker-compose.yml exec -T core php artisan system:rebuild-modsecurity-config