Download the PHP package sergix44/hestiacp-companion without Composer

On this page you can find all versions of the php package sergix44/hestiacp-companion. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package hestiacp-companion

HestiaCP Companion

A simple app to manage custom templates for HestiaCP.

Installation

You can download the latest artifact from the project releases.

It requires PHP 8.4 or newer on the command line, with the dom (php8.4-xml) and openssl extensions.

Usage

To list all the available commands:

Reverse proxy templates

Create Nginx templates that proxy a domain to a service listening on a local port:

This writes proxy-arcane.tpl and proxy-arcane.stpl, proxying to http://127.0.0.1:3552 (WebSockets included). Where they go depends on the Hestia web system:

Hestia web system Template folder Panel field
Nginx standalone /usr/local/hestia/data/templates/web/nginx/php-fpm Web Template
Nginx + Apache /usr/local/hestia/data/templates/web/nginx Proxy Template

Existing templates are never overwritten unless you pass --force, which keeps a .bak-<timestamp> copy of each.

Then create the web domain in HestiaCP, enable SSL / Let's Encrypt, select proxy-arcane in the panel field above and check the config with sudo nginx -t.

Sync a directory with rclone

Mirror a local directory to an rclone remote, safely including SQLite databases that are in use:

For example, a nightly root cron job backing up rootless Podman containers:

Production PHP settings

Apply production settings to every PHP version installed under /etc/php:

It manages two files in each version's conf.d folders. Files there load after php.ini, so they override HestiaCP's settings and survive its updates.

File Where Content
98-disabled_function.ini CLI always; PHP-FPM if you choose disable_functions =, which re-enables the functions HestiaCP disables (exec, proc_open, shell_exec, …)
99-prod-optim-php.ini CLI and PHP-FPM the settings below. The CLI copy keeps memory_limit = -1 and adds opcache.enable_cli = 1

On a fresh HestiaCP server, the CLI itself has those functions disabled, so hcpc cannot test or restart PHP-FPM yet. The first run only writes the CLI 98-disabled_function.ini files and asks you to run the command again.

The next run shows the settings and lets you change them. It then asks whether to re-enable the functions for websites too: the default is no, and on later runs it is your previous answer. Then it:

  1. writes the files, keeping a .bak-<timestamp> copy of every file it replaces or removes;
  2. runs php-fpm<version> -t for each version whose PHP-FPM files changed, and restores every file if one fails;
  3. restarts those versions' running php<version>-fpm services, as listed in the plan it shows you. If a restart fails, it restores every file and restarts the affected services with the previous settings.

Re-enabling functions for websites turns exec, proc_open and the like back on for every site of every user on the server.

Setting Default Option
memory_limit (PHP-FPM only) 512M --memory-limit
realpath_cache_size 4096K --realpath-cache-size
realpath_cache_ttl 120 --realpath-cache-ttl
opcache.memory_consumption (MB) 512 --opcache-memory-consumption
opcache.interned_strings_buffer (MB) 32 --opcache-interned-strings-buffer
opcache.max_accelerated_files 100000 --opcache-max-accelerated-files
opcache.validate_timestamps 1 --opcache-validate-timestamps
opcache.revalidate_freq 2 --opcache-revalidate-freq
opcache.jit tracing --opcache-jit
opcache.jit_buffer_size 64M --opcache-jit-buffer-size

These settings are always the same: display_errors = Off, log_errors = On, expose_php = Off, opcache.enable = 1 and opcache.save_comments = 1 (Laravel reads attributes from comments). The values you choose are kept: the next run starts from the current 99-prod-optim-php.ini.

Without prompts (-n), pass the values as options. Pass --fpm-functions=yes|no to change the website answer; without it, the current state is kept. Pass --apply to make the changes; without it, the command only shows what it would change:

The command warns about other conf.d files that set disable_functions, such as an older 99-laravel-production.ini, because they can override its choice. Remove them if you no longer need them.

Move an account from another HestiaCP server

Copy a whole Hestia user (sites, DNS, mail, databases and cron jobs) from an old server to this one, optionally under a new user name:

It backs up the user on the old server with v-backup-user, copies the archive with rsync, compares its SHA-256 with the original, and restores it here with v-restore-user. Hestia gives the restored sites this server's IP and updates their DNS zones.

One-time SSH setup

The command runs as root and connects to root@<host> (use user@host or an SSH alias to change that, and --port for another port). Root on this server needs a key the old server accepts, and the old server's host key:

To use another key, pass --identity=/path/to/key, and accept the host key with sudo ssh -i /path/to/key [email protected] true.

Checks before anything changes

Without --apply, the command only runs these checks. Interactive runs ask before migrating.

Reusing or resuming

--archive=<name> uses a backup that is already on the old server, for example last night's, instead of making a new one. An interrupted transfer is kept as <archive>.partial in this server's backup folder; run the command again with the same --archive to resume it.

What it does not do

It does not change DNS or delete anything: the archive stays on both servers. At the end it compares the number of web domains, DNS zones, mail domains and databases on both servers, and lists what to check before you switch over.


All versions of hestiacp-companion with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
acmephp/core Version ^2.1
illuminate/view Version ^13.0
laravel-zero/framework Version ^13.0
laravel-zero/phar-updater Version ^1.4.2
rakibtg/sleekdb Version ^2.50
ext-openssl Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sergix44/hestiacp-companion contains the following files

Loading the files please wait ...