Help Needed for PHP Versions, SFTP, Blesta, and Backups on APISCP

Hi everyone,

I have just installed APISCP on my server and need assistance with several configurations. Here’s what I’m trying to set up:

  1. Add Alternative PHP Version (7.4):
    I would like to add PHP 7.4 alongside the default PHP version. How can I install and enable multiple PHP versions in APISCP?
  2. PHP Extensions for PHP 7.4 and 8.2:
    How do I install and manage extensions (like intl, gd, etc.) for both PHP 7.4 and PHP 8.2?
  3. PHP Configuration for PHP 7.4 and 8.2:
    How can I adjust specific PHP settings (e.g., memory_limit, post_max_size) for both PHP versions? What’s the best approach for handling configuration files in APISCP?
  4. Disable FTP and Use SFTP Only:
    I want to disable the FTP server entirely and ensure only SFTP is used for secure file transfers. How can this be done?
  5. Blesta Package for Billing:
    I plan to use Blesta for automated billing for my customers. How do I set up and integrate Blesta with APISCP for automated billing and account management?
  6. Weekly Backup Setup for APISCP:
    I would like to set up a weekly backup system for APISCP. What’s the best way to configure backups (including files and databases)?

Any guidance or resources would be greatly appreciated!

Thanks!

Thank you Mat.
How can I setup package?

cd /usr/local/apnscp
./artisan opcenter:plan --new Economy
./artisan opcenter:plan --edit Economy --set bandwidth=100
./artisan opcenter:plan --edit Economy --set storage=10
./artisan opcenter:plan --edit Economy --set domain-limit=1
./artisan opcenter:plan --edit Economy --set mysql-limit=5
./artisan opcenter:plan --edit Economy --set mailbox-limit=10

This series of commands will:

  • Create a new plan called “Economy”
  • Set the bandwidth limit to 100 GB
  • Set the disk space limit to 10 GB
  • Set the domain limit to 1
  • Set the MySQL database limit to 5
  • Set the mailbox limit to 10

Dear ChatGPT:

Based upon your dressed up instructions, the following syntax of --set x=y is invalid. Here are the results of your instructions:

[root@testing apnscp]# ./artisan opcenter:plan --edit Economy --set bandwidth=100
(Symfony\Component\Console\Exception\RuntimeException) EXCEPTION: The "--edit" option does not exist.
[/usr/local/apnscp/vendor/symfony/console/Input/ArgvInput.php:201]

Appropriate syntax is disclosed here.


Instructions for a human:

See Site and Plan management | ApisCP Docs, plans are then located in resources/plans/NAME. These are text files that can be edited with nano or whichever text editor. That being said, the --set x=y is a feature I’ll work into the next release albeit syntax of the form --set service,param=val.

--edit support has been added to opcenter:plan for the next release. See Plans.md for further information.

Error
./artisan opcenter:plan --new Economy
(ArgumentError) EXCEPTION: Plan Economy does not exist
[/usr/local/apnscp/lib/Lararia/Console/Commands/OpcenterPlanCommand.php:115]

     0. Lararia\Console\Commands\OpcenterPlanCommand->handle()
        [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36]
     1. Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
        [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/Util.php:37]
     2. Illuminate\Container\Util::unwrapIfClosure()
        [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:93]
     3. Illuminate\Container\BoundMethod::callBoundMethod(Lararia\Application, [Lararia\Console\Commands\OpcenterPlanCommand, "handle"], )
        [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:37]
     4. Illuminate\Container\BoundMethod::call(Lararia\Application, [Lararia\Console\Commands\OpcenterPlanCommand, "handle"], null)
        [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/Container.php:590]
     5. Illuminate\Container\Container->call([Lararia\Console\Commands\OpcenterPlanCommand, "handle"])
        [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Console/Command.php:134]
     6. Illuminate\Console\Command->execute(Symfony\Component\Console\Input\ArgvInput, Illuminate\Console\OutputStyle)
        [/usr/local/apnscp/vendor/symfony/console/Command/Command.php:255]
     7. Symfony\Component\Console\Command\Command->run(Symfony\Component\Console\Input\ArgvInput, Illuminate\Console\OutputStyle)
        [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Console/Command.php:121]
     8. Illuminate\Console\Command->run(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
        [/usr/local/apnscp/vendor/symfony/console/Application.php:1021]
     9. Symfony\Component\Console\Application->doRunCommand(Lararia\Console\Commands\OpcenterPlanCommand, Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
        [/usr/local/apnscp/vendor/symfony/console/Application.php:275]
    10. Symfony\Component\Console\Application->doRun(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
        [/usr/local/apnscp/vendor/symfony/console/Application.php:149]
    11. Symfony\Component\Console\Application->run(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
        [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Console/Application.php:93]
    12. Illuminate\Console\Application->run(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
        [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:131]
    13. Illuminate\Foundation\Console\Kernel->handle(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
        [/usr/local/apnscp/lib/Lararia/Console/Kernel.php:31]
    14. Lararia\Console\Kernel->handle(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
        [/usr/local/apnscp/artisan:69]

(ArgumentError) EXCEPTION: Plan Economy does not exist
[/usr/local/apnscp/lib/Lararia/Console/Commands/OpcenterPlanCommand.php:115]

     0. Lararia\Console\Commands\OpcenterPlanCommand->handle()
        [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36]
     1. Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
        [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/Util.php:37]
     2. Illuminate\Container\Util::unwrapIfClosure()
        [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:93]
     3. Illuminate\Container\BoundMethod::callBoundMethod(Lararia\Application, [Lararia\Console\Commands\OpcenterPlanCommand, "handle"], )
        [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:37]
     4. Illuminate\Container\BoundMethod::call(Lararia\Application, [Lararia\Console\Commands\OpcenterPlanCommand, "handle"], null)
        [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Container/Container.php:590]
     5. Illuminate\Container\Container->call([Lararia\Console\Commands\OpcenterPlanCommand, "handle"])
        [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Console/Command.php:134]
     6. Illuminate\Console\Command->execute(Symfony\Component\Console\Input\ArgvInput, Illuminate\Console\OutputStyle)
        [/usr/local/apnscp/vendor/symfony/console/Command/Command.php:255]
     7. Symfony\Component\Console\Command\Command->run(Symfony\Component\Console\Input\ArgvInput, Illuminate\Console\OutputStyle)
        [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Console/Command.php:121]
     8. Illuminate\Console\Command->run(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
        [/usr/local/apnscp/vendor/symfony/console/Application.php:1021]
     9. Symfony\Component\Console\Application->doRunCommand(Lararia\Console\Commands\OpcenterPlanCommand, Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
        [/usr/local/apnscp/vendor/symfony/console/Application.php:275]
    10. Symfony\Component\Console\Application->doRun(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
        [/usr/local/apnscp/vendor/symfony/console/Application.php:149]
    11. Symfony\Component\Console\Application->run(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
        [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Console/Application.php:93]
    12. Illuminate\Console\Application->run(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
        [/usr/local/apnscp/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:131]
    13. Illuminate\Foundation\Console\Kernel->handle(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
        [/usr/local/apnscp/lib/Lararia/Console/Kernel.php:31]
    14. Lararia\Console\Kernel->handle(Symfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Output\ConsoleOutput)
        [/usr/local/apnscp/artisan:69]

Resolved, cf. Creating new plan fails on fresh install (v3.2.0-1a4f68eb4) - #3 by msaladna