### FFmpeg Binary Path Example Source: https://github.com/chevereto/v4-docs/blob/main/guides/cpanel/ffmpeg.md Example of the expected directory structure after uploading FFmpeg binaries to a cPanel server. ```sh /home/user/bin/ffmpeg-7.0.2-amd64-static ``` -------------------------------- ### Install Tenant via CLI Source: https://github.com/chevereto/v4-docs/blob/main/application/configuration/multitenancy.md Installs a tenant using the CLI by setting the CHEVERETO_TENANT environment variable before running the install command. Requires additional options to be specified. ```sh CHEVERETO_TENANT=tenant1 app/bin/cli -C install \ ``` -------------------------------- ### Install Chevereto Docker Repository Source: https://github.com/chevereto/v4-docs/blob/main/guides/docker/README.md Install the Chevereto Docker repository and its dependencies. This command fetches and executes the installation script. ```bash bash <(curl -s https://chevereto.com/sh/ubuntu/24.04/docker.sh) ``` -------------------------------- ### Download and Configure Chevereto (New Installation) Source: https://github.com/chevereto/v4-docs/blob/main/guides/server/vps.md Downloads Chevereto and configures Apache, MySQL, CRON, and FFmpeg for a new installation. Assumes the system stack is already prepared. ```bash bash <(curl -s https://raw.githubusercontent.com/chevereto/vps/4.3/common/new.sh) ``` -------------------------------- ### Install Chevereto for a Tenant Source: https://github.com/chevereto/v4-docs/blob/main/api/4/tenants.md Install Chevereto for a specific tenant using their ID. Requires username, email, and password for the initial setup. ```sh curl -X POST "/_/api/4/tenants/tenant123/install" \ -H "Content-Type: application/json" \ -H "X-API-Key: your_api_key" \ -H "X-Signature: request_signature" \ -d '{ \ "username": "admin", \ "email": "admin@example.com", \ "password": "mypassword" \ }' ``` -------------------------------- ### General CRON Job Command Example Source: https://github.com/chevereto/v4-docs/blob/main/guides/cpanel/cron.md An example of a CRON job command using a common PHP binary path and Chevereto CLI path. ```sh /usr/local/bin/ea-php81 /home/chevereto/public_html/app/bin/cli -C cron >/dev/null 2>&1 ``` -------------------------------- ### POST /_/api/4/tenants/{id}/install Source: https://github.com/chevereto/v4-docs/blob/main/api/4/tenants.md Installs Chevereto for a specific tenant, requiring administrator credentials. Handles cases where the tenant is not found or already installed. ```APIDOC ## POST /_/api/4/tenants/{id}/install ### Description Install Chevereto for a tenant. ### Method POST ### Endpoint /_/api/4/tenants/{id}/install ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the tenant. #### Headers - **X-API-Key** (string) - Required - The API key for authentication. - **X-Signature** (string) - Required - The HMAC SHA256 signature of the request body. #### Request Body - **username** (string) - Required - Administrator username for the tenant installation. - **email** (string) - Required - Administrator email for the tenant installation. - **password** (string) - Required - Administrator password for the tenant installation. ### Request Example ```json { "username": "admin", "email": "admin@example.com", "password": "mypassword" } ``` ``` -------------------------------- ### Display Installed Version Source: https://github.com/chevereto/v4-docs/blob/main/application/reference/cli.md Outputs the Chevereto application's installed version from the database using the `version-installed` command. ```sh app/bin/cli -C version-installed ``` -------------------------------- ### Install Chevereto Source: https://github.com/chevereto/v4-docs/blob/main/application/reference/cli.md Installs Chevereto by providing admin user details. The `-u`, `-e`, and `-x` options specify username, email, and password respectively. ```sh app/bin/cli -C install \ -u rodolfo \ -e rodolfo@chevereto.loc \ -x myPassword ``` -------------------------------- ### Prepare Ubuntu System Stack Source: https://github.com/chevereto/v4-docs/blob/main/guides/server/vps.md Installs the necessary system stack (PHP, Apache, MySQL, etc.) on Ubuntu LTS. Ensure the version number matches your Ubuntu LTS release. ```bash bash <(curl -s https://raw.githubusercontent.com/chevereto/vps/4.3/ubuntu/24.04/prepare.sh) ``` -------------------------------- ### CloudLinux CRON Job Command Example Source: https://github.com/chevereto/v4-docs/blob/main/guides/cpanel/cron.md An example of a CRON job command specifically for CloudLinux environments, using its PHP binary path. ```sh /opt/alt/php81/usr/bin/php /home/chevereto/public_html/app/bin/cli -C cron >/dev/null 2>&1 ``` -------------------------------- ### CLI Invocation on Debian Source: https://github.com/chevereto/v4-docs/blob/main/application/reference/cli.md Example of how to run the CLI command as the web server user on a Debian system. ```sh sudo -u www-data app/bin/cli -C ``` -------------------------------- ### Cron.d File Setup Source: https://github.com/chevereto/v4-docs/blob/main/application/stack/cron.md Configure Chevereto cron jobs using a cron.d file on Debian-based systems. This example sets the job to run every minute. ```bash cat >/etc/cron.d/chevereto < ``` -------------------------------- ### Run xrDebug Built-in Server Source: https://github.com/chevereto/v4-docs/blob/main/developer/how-to/debug.md Use this command to start the xrDebug server from the Chevereto application directory. This is useful for real-time debugging. ```sh cd app && vendor/bin/xrdebug ``` -------------------------------- ### Setup Automatic HTTPS with Certbot Source: https://github.com/chevereto/v4-docs/blob/main/guides/server/vps.md Obtains and configures automatic renewable HTTPS certificates using Certbot for Apache. Replace 'example.com' with your domain. ```bash certbot --apache -d example.com ``` ```bash certbot --apache -d example.com -d www.example.com ``` -------------------------------- ### Set File Permissions for Chevereto Installation Source: https://github.com/chevereto/v4-docs/blob/main/application/stack/php.md On debian-based systems, use this command to set the correct ownership for the Chevereto installation directory. Replace `/var/www/html` with your actual path. ```sh chown -R www-data: /var/www/html ``` -------------------------------- ### Set Available Image Formats Source: https://github.com/chevereto/v4-docs/blob/main/application/stack/php.md Configure the available image formats if the server does not support all formats handled by Chevereto. This example explicitly enables PNG, GIF, BMP, and JPG. ```php CHEVERETO_IMAGE_FORMATS_AVAILABLE='["JPG","PNG","BMP","GIF"]' ``` -------------------------------- ### Run CLI Update Script Source: https://github.com/chevereto/v4-docs/blob/main/application/installing/updating.md Execute the PHP script to initiate the software update process for non-Docker installations. ```sh php app/upgrading.php ``` -------------------------------- ### Get Tenant by ID Source: https://github.com/chevereto/v4-docs/blob/main/application/reference/cli.md Retrieves an existing tenant by its ID. ```sh app/bin/tenants -C get --id 1 ``` -------------------------------- ### Get Application Stats Source: https://github.com/chevereto/v4-docs/blob/main/application/reference/cli.md Outputs Chevereto application statistics. Use `--format json` for JSON output. ```sh app/bin/cli -C stats ``` ```sh app/bin/cli -C stats --format json ``` -------------------------------- ### Adding Multiple String Overrides Source: https://github.com/chevereto/v4-docs/blob/main/developer/customization/language.md This example shows how to add multiple string overrides to the en.po file, allowing for customization of several translation strings at once. ```po msgid "Upload and share your media" msgstr "Upload, do it now!" msgid "Recent" msgstr "New!" ``` -------------------------------- ### Recommended PHP INI Settings Source: https://github.com/chevereto/v4-docs/blob/main/application/stack/php.md These ini values are recommended for Chevereto installations. Adjust them based on your server's hardware and load. ```sh upload_max_filesize = 64M; post_max_size = 64M; max_execution_time = 30; memory_limit = 512M; ``` -------------------------------- ### Set up Chevereto Docker System Source: https://github.com/chevereto/v4-docs/blob/main/guides/docker/README.md Enable background processing and the nginx ingress HTTP proxy for Chevereto Docker. ```bash make setup ``` -------------------------------- ### Initialize Multi-Tenant Database Source: https://github.com/chevereto/v4-docs/blob/main/application/configuration/multitenancy.md Run this command once after enabling multitenancy to initialize the multi-tenant database structure. ```sh app/bin/tenants -C init ``` -------------------------------- ### Create Configuration (.env file) Source: https://github.com/chevereto/v4-docs/blob/main/guides/docker/README.md Generate the .env configuration file for Chevereto Docker. Follow the on-screen prompts to enter license key, domain, email, and CloudFlare details. ```bash make env ``` -------------------------------- ### Create New Tenant Source: https://github.com/chevereto/v4-docs/blob/main/api/4/tenants.md Create a new tenant with specified ID, hostname, and enabled status. Optional fields include plan ID, limits, and environment variables. ```sh curl -X POST "/_/api/4/tenants" \ -H "Content-Type: application/json" \ -H "X-API-Key: your_api_key" \ -H "X-Signature: request_signature" \ -d '{ \ "id": "tenant123", \ "hostname": "tenant123.example.com", \ "is_enabled": true, \ "plan_id": "basic_plan", \ "limits": {"CHEVERETO_MAX_USERS":"2"}, \ "env": {"CUSTOM_VAR": "value"} \ }' ``` -------------------------------- ### Create app/env.php Configuration File Source: https://github.com/chevereto/v4-docs/blob/main/application/configuration/configuring.md Manually create the app/env.php file to set application-level database connection parameters. This file has lower priority than system-wide environment variables. ```php 'chevereto', 'CHEVERETO_DB_PASS' => 'user_database_password', 'CHEVERETO_DB_PORT' => '3306', 'CHEVERETO_DB_TABLE_PREFIX' => 'chv_', 'CHEVERETO_DB_USER' => 'user_database', ]; ``` -------------------------------- ### Start Tenant Jobs Worker Source: https://github.com/chevereto/v4-docs/blob/main/application/reference/cli.md Starts the jobs worker process for tenants. This is required for background tasks and stat refreshes. Can be applied to all tenants or a specific tenant, with optional verbose logging. ```sh app/bin/tenants -C jobs:worker # all tenants ``` ```sh app/bin/tenants -C jobs:worker --id 1 ``` ```sh app/bin/tenants -C jobs:worker --id 1 --verbose ``` -------------------------------- ### Create MySQL Database and User Source: https://github.com/chevereto/v4-docs/blob/main/application/stack/mysql-server.md Use this command in the MySQL console to create the 'chevereto' database and a dedicated user with all privileges. Ensure you replace 'password' and 'user_database_password' with your actual credentials. ```sh sudo mysql -uroot -ppassword -e "CREATE DATABASE chevereto; \ CREATE USER 'chevereto' IDENTIFIED BY 'user_database_password'; \ GRANT ALL ON chevereto.* TO 'chevereto' IDENTIFIED BY 'user_database_password';" ``` -------------------------------- ### Run Free Edition with Application Upgrade Source: https://github.com/chevereto/v4-docs/blob/main/guides/docker/pure-docker.md Run the Chevereto free edition with the option to upgrade the application within the running container. This requires setting CHEVERETO_SERVICING=server and persistent storage for application files. ```sh docker run -d \ --name chevereto \ -p 80:80 \ -e CHEVERETO_DB_HOST=database \ -e CHEVERETO_DB_USER=chevereto \ -e CHEVERETO_DB_PASS=user_database_password \ -e CHEVERETO_DB_PORT=3306 \ -e CHEVERETO_DB_NAME=chevereto \ -e CHEVERETO_MAX_POST_SIZE=2G \ -e CHEVERETO_MAX_UPLOAD_SIZE=2G \ -e CHEVERETO_SERVICING=server \ -v /var/www/html/images/ \ -v /var/www/html/ \ ghcr.io/chevereto/chevereto:latest ``` -------------------------------- ### Run Chevereto Free Edition with Docker Source: https://github.com/chevereto/v4-docs/blob/main/guides/docker/pure-docker.md Run the Chevereto free edition using Docker. This command uses the public image and requires database credentials. ```sh docker run -d \ --name chevereto \ -p 80:80 \ -e CHEVERETO_DB_HOST=database \ -e CHEVERETO_DB_USER=chevereto \ -e CHEVERETO_DB_PASS=user_database_password \ -e CHEVERETO_DB_PORT=3306 \ -e CHEVERETO_DB_NAME=chevereto \ -e CHEVERETO_MAX_POST_SIZE=2G \ -e CHEVERETO_MAX_UPLOAD_SIZE=2G \ -e CHEVERETO_SERVICING=server \ -v /var/www/html/images/ \ ghcr.io/chevereto/chevereto:latest ``` -------------------------------- ### GET /_/api/4/tenants Source: https://github.com/chevereto/v4-docs/blob/main/api/4/tenants.md Lists all tenants available in the system. This endpoint requires authentication and signature verification. ```APIDOC ## GET /_/api/4/tenants ### Description List all tenants. ### Method GET ### Endpoint /_/api/4/tenants ### Parameters #### Headers - **X-API-Key** (string) - Required - The API key for authentication. - **X-Signature** (string) - Required - The HMAC SHA256 signature of the request body. ### Request Example ```sh curl -X GET "/_/api/4/tenants" \ -H "Content-Type: application/json" \ -H "X-API-Key: your_api_key" \ -H "X-Signature: request_signature" ``` ``` -------------------------------- ### Get Setting Value Source: https://github.com/chevereto/v4-docs/blob/main/application/reference/cli.md Retrieves the value of a specific database setting key using the `setting-get` command. ```sh app/bin/cli -C setting-get -k chevereto_version_installed ``` -------------------------------- ### Basic CLI Usage Source: https://github.com/chevereto/v4-docs/blob/main/application/reference/cli.md The fundamental way to invoke the Chevereto CLI. Use this for general command execution. ```sh app/bin/cli -C ``` ```sh CHEVERETO_TENANT=abc app/bin/cli -C # When using multi-tenant mode ``` -------------------------------- ### List Tenant Plans Source: https://github.com/chevereto/v4-docs/blob/main/application/configuration/multitenancy.md Lists all available tenant plans. This command helps in managing and viewing existing plan configurations. ```sh app/bin/tenants -C plan:list ``` -------------------------------- ### GET /_/api/4/tenants/{id} Source: https://github.com/chevereto/v4-docs/blob/main/api/4/tenants.md Retrieves detailed information about a specific tenant identified by its ID. Requires authentication and signature. ```APIDOC ## GET /_/api/4/tenants/{id} ### Description Retrieve tenant details. ### Method GET ### Endpoint /_/api/4/tenants/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the tenant. #### Headers - **X-API-Key** (string) - Required - The API key for authentication. - **X-Signature** (string) - Required - The HMAC SHA256 signature of the request body. ### Request Example ```sh curl -X GET "/_/api/4/tenants/tenant123" \ -H "Content-Type: application/json" \ -H "X-API-Key: your_api_key" \ -H "X-Signature: request_signature" ``` ``` -------------------------------- ### Sample REPL Code for Chevereto Source: https://github.com/chevereto/v4-docs/blob/main/developer/how-to/repl.md This snippet demonstrates how to query the database and access user data or login provider secrets within a Chevereto REPL environment. Use the '? ' suffix to inspect variables. ```php use Chevereto\Legacy\Classes\DB; use Chevereto\Legacy\Classes\Login; $row = DB::get(table: 'users', values: 'all', limit: 1); $row = DB::formatRows($row); $row['name']; //? $row['website']; //? $row['bio']; //? $googleSecret = Login::getProviders('all')['google']['secret']; //? $enabledProviders = Login::getProviders('enabled'); ``` -------------------------------- ### GET /_/api/4/config/traefik Source: https://github.com/chevereto/v4-docs/blob/main/api/4/tenants.md Retrieves the dynamic Traefik HTTP provider configuration. This endpoint is intended for internal use and is only accessible from localhost. ```APIDOC ## GET /_/api/4/config/traefik ### Description Retrieve dynamic Traefik HTTP provider configuration. ### Method GET ### Endpoint /_/api/4/config/traefik ### Parameters #### Headers - **X-API-Key** (string) - Required - The API key for authentication. ### Request Example ```sh curl -X GET "/_/api/4/config/traefik" \ -H "Content-Type: application/json" \ -H "X-API-Key: your_api_key" ``` ``` -------------------------------- ### Remove Chevereto V3 Leftovers Source: https://github.com/chevereto/v4-docs/blob/main/guides/server/vps.md Removes any leftover files or configurations from a previous Chevereto V3 installation in the current working directory. ```bash bash <(curl -s https://raw.githubusercontent.com/chevereto/vps/4.3/common/wipe-v3-leftovers.sh) ``` -------------------------------- ### Run CLI Database Migration Source: https://github.com/chevereto/v4-docs/blob/main/application/installing/updating.md Update the Chevereto database schema using the command-line interface. Ensure you are in your Chevereto instance directory. ```sh app/bin/cli -C database-migrate ``` -------------------------------- ### Create Tenant Plan Source: https://github.com/chevereto/v4-docs/blob/main/application/configuration/multitenancy.md Creates a new tenant plan with specified ID, limits, and environment variables. Limits and environment variables are optional and provided in JSON format. ```sh app/bin/tenants -C plan:create \ --id my-plan \ --limits '{"CHEVERETO_MAX_TAGS":"10000"}' \ --env '{"CHEVERETO_CACHE_TIME_MICRO":"120"}' ``` -------------------------------- ### Run Tenant Database-Migrate Command Source: https://github.com/chevereto/v4-docs/blob/main/application/configuration/multitenancy.md Execute the database-migrate command for a specific tenant by setting the CHEVERETO_TENANT environment variable. This allows for targeted database updates. ```bash CHEVERETO_TENANT=1 app/bin/cli -C database-migrate ``` -------------------------------- ### Edit Tenant Settings Source: https://github.com/chevereto/v4-docs/blob/main/application/configuration/multitenancy.md Edits existing tenant settings, such as hostname, enabled status, plan, limits, or environment variables. This example shows disabling a tenant. ```sh app/bin/tenants -C edit \ --id 1 \ --is_enabled 0 ``` -------------------------------- ### PO File Structure for Translation String Source: https://github.com/chevereto/v4-docs/blob/main/developer/customization/language.md This is an example of how a translation string appears in a .po file, showing the original message ID and the corresponding message string. ```po msgid "Upload and share your media" msgstr "" ``` -------------------------------- ### Deploy New Chevereto Website Source: https://github.com/chevereto/v4-docs/blob/main/guides/docker/README.md Use this command to deploy a new Chevereto website. Specify the namespace for the subdomain and the administrator's email. The domain can also be optionally specified. ```shell make deploy NAMESPACE={namespace} ADMIN_EMAIL={email} ``` ```shell make deploy NAMESPACE=demo ADMIN_EMAIL=email@mywebsite.com ``` ```shell make deploy NAMESPACE=demo ADMIN_EMAIL=email@mywebsite.com DOMAIN=my-top-level-domain.com ``` -------------------------------- ### Create Tenant Source: https://github.com/chevereto/v4-docs/blob/main/application/configuration/multitenancy.md Creates a new tenant with a unique ID, hostname, and enabled status. Optional parameters include plan ID, limits, and environment variables. It is recommended to set a unique CHEVERETO_ENCRYPTION_KEY per tenant. ```sh app/bin/tenants -C create \ --id tenant1 \ --hostname example.com \ --is_enabled 1 \ --plan_id my-plan \ --env '{"CHEVERETO_ENCRYPTION_KEY":"base64 encoded (size 32)"}' ``` -------------------------------- ### Create New Tenant Plan Source: https://github.com/chevereto/v4-docs/blob/main/api/4/tenants.md Creates a new tenant plan with a unique ID, optional resource limits, and environment variables. ```shell curl -X POST "/_/api/4/tenants-plans" \ -H "Content-Type: application/json" \ -H "X-API-Key: your_api_key" \ -H "X-Signature: request_signature" \ -d '{ "id": "basic_plan", "limits": {"CHEVERETO_MAX_USERS":"2"} }' ``` -------------------------------- ### Run Bulk Importer Source: https://github.com/chevereto/v4-docs/blob/main/application/reference/cli.md Use the `bulk-importer` command to process files for the bulk importer feature. ```sh app/bin/cli -C bulk-importer ``` -------------------------------- ### POST /_/api/4/tenants Source: https://github.com/chevereto/v4-docs/blob/main/api/4/tenants.md Creates a new tenant with specified details including ID, hostname, and enablement status. Optional fields for plan ID, limits, and environment variables can also be provided. ```APIDOC ## POST /_/api/4/tenants ### Description Create a new tenant. ### Method POST ### Endpoint /_/api/4/tenants ### Parameters #### Headers - **X-API-Key** (string) - Required - The API key for authentication. - **X-Signature** (string) - Required - The HMAC SHA256 signature of the request body. #### Request Body - **id** (string) - Required - Unique identifier for the tenant. - **hostname** (string) - Required - Hostname associated with the tenant. - **is_enabled** (boolean) - Required - Tenant enabled status. - **plan_id** (string) - Optional - ID of the tenant plan to assign. - **limits** (object) - Optional - Resource limits specific to the tenant. - **env** (object) - Optional - Environment variables specific to the tenant. ### Request Example ```json { "id": "tenant123", "hostname": "tenant123.example.com", "is_enabled": true, "plan_id": "basic_plan", "limits": {"CHEVERETO_MAX_USERS":"2"}, "env": {"CUSTOM_VAR": "value"} } ``` ``` -------------------------------- ### Download and Extract Chevereto Release Package (CLI) Source: https://github.com/chevereto/v4-docs/blob/main/application/installing/installation.md Use this command to download and extract the Chevereto release package directly in your terminal. It will prompt for a license key, defaulting to the free edition if none is provided. ```bash bash <(curl -s https://raw.githubusercontent.com/chevereto/vps/4.3/common/get.sh) ``` -------------------------------- ### Display Filesystem Version Source: https://github.com/chevereto/v4-docs/blob/main/application/reference/cli.md Outputs the Chevereto application's filesystem version using the `version` command. ```sh app/bin/cli -C version ``` -------------------------------- ### Apply Database Migrations for All Tenants Source: https://github.com/chevereto/v4-docs/blob/main/application/configuration/multitenancy.md Run the database:migrate command to apply schema updates to all tenant databases. This ensures all tenants are up-to-date with the latest database structure. ```bash app/bin/tenants -C database:migrate ``` -------------------------------- ### Run Chevereto Paid Edition with Docker Source: https://github.com/chevereto/v4-docs/blob/main/guides/docker/pure-docker.md Run the Chevereto paid edition using Docker. This command requires database credentials and specifies the custom built image. ```sh docker run -d \ --name chevereto \ -p 80:80 \ -e CHEVERETO_DB_HOST=database \ -e CHEVERETO_DB_USER=chevereto \ -e CHEVERETO_DB_PASS=user_database_password \ -e CHEVERETO_DB_PORT=3306 \ -e CHEVERETO_DB_NAME=chevereto \ -e CHEVERETO_MAX_POST_SIZE=2G \ -e CHEVERETO_MAX_UPLOAD_SIZE=2G \ -v /var/www/html/images/ \ chevereto:latest ``` -------------------------------- ### List All Tenant Plans Source: https://github.com/chevereto/v4-docs/blob/main/api/4/tenants.md Retrieves a list of all available tenant plans. Requires API key and signature for authentication. ```shell curl -X GET "/_/api/4/tenants-plans" \ -H "Content-Type: application/json" \ -H "X-API-Key: your_api_key" \ -H "X-Signature: request_signature" ``` -------------------------------- ### Create Tenant Plan Source: https://github.com/chevereto/v4-docs/blob/main/application/reference/cli.md Creates a new tenant plan with a specified ID, name, and optional limits and environment settings. ```sh app/bin/tenants -C plan:create \ --id 1 \ --name "Basic Plan" \ --limits '{}' \ --env '{}' ``` -------------------------------- ### List Tenants Source: https://github.com/chevereto/v4-docs/blob/main/application/configuration/multitenancy.md Lists all tenants configured in the system. This command is useful for auditing and managing tenant configurations. ```sh app/bin/tenants -C list ``` -------------------------------- ### Create a New Tenant Plan Source: https://github.com/chevereto/v4-docs/blob/main/api/4/tenants.md Creates a new tenant plan with specified ID, limits, and environment variables. ```APIDOC ## POST /_/api/4/tenants-plans ### Description Create a new tenant plan. ### Method POST ### Endpoint /_/api/4/tenants-plans ### Parameters #### Request Body - **id** (string) - Required - Unique identifier for the tenant plan. - **limits** (object) - Optional - Resource limits specific to the tenant plan. - **env** (object) - Optional - Environment variables specific to the tenant plan. ### Request Example ```json { "id": "basic_plan", "limits": {"CHEVERETO_MAX_USERS":"2"} } ``` ### Response #### Success Response (201) - (Tenant plan object) - The newly created tenant plan. ``` -------------------------------- ### Enable Multitenancy Environment Variables Source: https://github.com/chevereto/v4-docs/blob/main/application/configuration/multitenancy.md Set these environment variables to enable tenant support. An encryption key is required for securing tenant data. ```plain CHEVERETO_ENABLE_TENANTS=1 CHEVERETO_ENCRYPTION_KEY=your_encryption_key CHEVERETO_PROVIDER_NAME=your_provider_name CHEVERETO_PROVIDER_URL=your_provider_url CHEVERETO_TENANTS_API_REQUEST_SECRET=your_request_secret ``` -------------------------------- ### Rename and Update Configuration File Source: https://github.com/chevereto/v4-docs/blob/main/application/installing/upgrading.md Rename the old settings file to app/env.php and update it to the new environment format. ```php 'localhost', 'CHEVERETO_DB_NAME' => 'chevereto', 'CHEVERETO_DB_USER' => 'user', 'CHEVERETO_DB_PASS' => 'pass', ]; ``` -------------------------------- ### List All Tenant Plans Source: https://github.com/chevereto/v4-docs/blob/main/api/4/tenants.md Retrieves a list of all available tenant plans. ```APIDOC ## GET /_/api/4/tenants-plans ### Description List all tenant plans. ### Method GET ### Endpoint /_/api/4/tenants-plans ### Response #### Success Response (200) - (Array of tenant plans) - Details of each tenant plan. ``` -------------------------------- ### Configure Tenant API Allow List and Secret Source: https://github.com/chevereto/v4-docs/blob/main/application/configuration/multitenancy.md Sets environment variables to restrict access to the Tenants API by IP address and to define the secret key for signing API keys. Ensure CHEVERETO_TENANTS_API_KEY_SECRET is kept secure. ```plain CHEVERETO_TENANTS_API_ALLOW_LIST="200.200.200.200,10.0.0.0/24,203.0.113.0/28" CHEVERETO_TENANTS_API_KEY_SECRET=your_tenants_api_signing_secret ``` -------------------------------- ### Retrieve Tenant Plan Details Source: https://github.com/chevereto/v4-docs/blob/main/api/4/tenants.md Fetches the details of a specific tenant plan using its ID. Authentication is required. ```shell curl -X GET "/_/api/4/tenants-plans/basic_plan" \ -H "Content-Type: application/json" \ -H "X-API-Key: your_api_key" \ -H "X-Signature: request_signature" ``` -------------------------------- ### Verify Tenants API Key Source: https://github.com/chevereto/v4-docs/blob/main/application/configuration/multitenancy.md Use this command to verify the validity of a Tenants API key by providing its key value. ```sh app/bin/tenants -C api:key:verify --key chv_1_1234567890 ``` -------------------------------- ### Build Chevereto Docker Image Source: https://github.com/chevereto/v4-docs/blob/main/guides/docker/README.md Build the Chevereto container image for the latest release. This step can be skipped if using the free edition, as the image is available on GitHub Container Registry. ```bash make image ``` -------------------------------- ### Set Chevereto SaaS Context Source: https://github.com/chevereto/v4-docs/blob/main/application/configuration/multitenancy.md Configure Chevereto to run in a SaaS context to alter functionality for service providers offering Chevereto to multiple customers. ```plain CHEVERETO_CONTEXT=saas ``` -------------------------------- ### Reboot VPS Source: https://github.com/chevereto/v4-docs/blob/main/guides/server/vps.md Reboot the VPS to apply any pending kernel updates after preparing the system stack. ```bash systemctl reboot ``` -------------------------------- ### Apply Database Migrations for a Specific Tenant Source: https://github.com/chevereto/v4-docs/blob/main/application/configuration/multitenancy.md Execute the database:migrate command for a single tenant identified by their ID. Use this to update the database schema for a specific tenant. ```bash app/bin/tenants -C database:migrate --id 1 ``` -------------------------------- ### Chevereto FFmpeg Configuration Source: https://github.com/chevereto/v4-docs/blob/main/guides/cpanel/ffmpeg.md Configure Chevereto to use custom FFmpeg and FFPROBE binaries by setting environment variables in the app/env.php configuration file. ```php '/home/user/bin/ffmpeg-7.0.2-amd64-static/ffmpeg', 'CHEVERETO_BINARY_FFPROBE' => '/home/user/bin/ffmpeg-7.0.2-amd64-static/ffprobe', ]; ``` -------------------------------- ### Access Server via SSH Source: https://github.com/chevereto/v4-docs/blob/main/guides/docker/README.md Connect to your server using SSH. Replace `` with your server's IP address. ```bash ssh root@ ``` -------------------------------- ### List All Tenants Source: https://github.com/chevereto/v4-docs/blob/main/api/4/tenants.md Retrieve a list of all tenants in the system. Requires API Key and HMAC SHA256 signature. ```sh curl -X GET "/_/api/4/tenants" \ -H "Content-Type: application/json" \ -H "X-API-Key: your_api_key" \ -H "X-Signature: request_signature" ``` -------------------------------- ### Create Tenants API Key Source: https://github.com/chevereto/v4-docs/blob/main/application/reference/cli.md Creates a new Tenants API key. Optionally specify a name and expiration date. ```sh app/bin/tenants -C api:key:create \ --name my_key \ --expires "2025-12-31 23:59:59" ``` -------------------------------- ### Docker Compose Configuration for Chevereto Source: https://github.com/chevereto/v4-docs/blob/main/guides/docker/pure-docker.md This `docker-compose.yml` file defines the services, networks, and volumes required to run Chevereto. It includes a MariaDB database service and the Chevereto PHP application service, with health checks and environment variables for configuration. ```yaml services: database: image: mariadb:jammy networks: - chevereto volumes: - database:/var/lib/mysql restart: always healthcheck: test: ["CMD", "healthcheck.sh", "--su-mysql", "--connect"] interval: 10s timeout: 5s retries: 3 environment: MYSQL_ROOT_PASSWORD: password MYSQL_DATABASE: chevereto MYSQL_USER: chevereto MYSQL_PASSWORD: user_database_password php: image: chevereto/chevereto:latest # tweak with target image to run networks: - chevereto volumes: - storage:/var/www/html/images/ # - app:/var/www/html/ # uncomment when using CHEVERETO_SERVICING=server restart: always depends_on: database: condition: service_healthy expose: - 80 environment: CHEVERETO_DB_HOST: database CHEVERETO_DB_USER: chevereto CHEVERETO_DB_PASS: user_database_password CHEVERETO_DB_PORT: 3306 CHEVERETO_DB_NAME: chevereto CHEVERETO_HOSTNAME: hostname.com CHEVERETO_HOSTNAME_PATH: / CHEVERETO_HTTPS: 0 CHEVERETO_MAX_POST_SIZE: 2G CHEVERETO_MAX_UPLOAD_SIZE: 2G # CHEVERETO_SERVICING: server # uncomment to enable application filesystem upgrades volumes: database: storage: # app: # uncomment when using CHEVERETO_SERVICING=server networks: chevereto: ``` -------------------------------- ### Access Application CLI for a Specific Tenant Source: https://github.com/chevereto/v4-docs/blob/main/application/configuration/multitenancy.md Access the application CLI for a specific tenant by setting the CHEVERETO_TENANT environment variable. This enables direct interaction with a tenant's application commands. ```bash CHEVERETO_TENANT=abc app/bin/cli -C ```