# Licensing and activation The release package is configured with `LICENSE_ENFORCE=true`. During initial setup, activate the installation before using the workspace. Set `APP_URL` to the buyer's public base URL before activation. Activation binds a signed local record to the hostname in `APP_URL` and an installation fingerprint. Moving to a different hostname or replacing the installation requires reactivation. Only one active installation record is stored at a time. The application checks the license at activation and then every seven days. If a verification service is temporarily unavailable, a previously verified installation can continue for up to 14 days after its last successful verification. After that grace period, the workspace is held at the activation page until verification succeeds. The local signature detects changes to the saved license record; it does not make the PHP source tamper-proof. ## Envato Market Set `LICENSE_CHANNEL=envato` and configure `ENVATO_ITEM_ID` in the buyer's environment. On the activation page, enter the Envato purchase code and a personal Envato API token that can access purchase details. The token and purchase code are stored encrypted in the application database. The app checks the purchase through Envato's buyer purchase endpoint and confirms the configured item ID. Envato's CodeCanyon Standard License currently allows one end product. A Regular License is for an end product distributed free to end users; an Extended License is needed when end users are charged to access or use the end product. Both license types remain limited to one end product. The activation module additionally binds this installation to one hostname as an operational restriction; this is not a claim that Envato's license defines a domain count. Review the [Regular License](https://codecanyon.net/licenses/terms/regular), [Extended License](https://codecanyon.net/licenses/terms/extended), and [License FAQ](https://codecanyon.net/licenses/faq) for the terms applicable to the purchase date and item. The marketplace buyer's personal token is used because the Envato buyer purchase endpoint verifies a purchase code for the authenticated buyer. The application does not ask for an author token. See the [Envato Market API](https://build.envato.com/api/) for current token scopes and API behavior. ## Codester and direct sales Set `LICENSE_CHANNEL=codester`, `LICENSE_SERVER_URL`, and `LICENSE_SERVER_PUBLIC_KEY` in the buyer's environment. Replace the example URL with the buyer's own HTTPS licensing endpoint and set the Base64-encoded Ed25519 public key that matches the endpoint's signing key. The app posts the license key, hostname, and installation fingerprint. The server must return JSON with a Base64-encoded signed payload and signature; the signed JSON payload must contain `active: true`, the exact `domain`, the exact `install_fingerprint`, and optionally `license_type`. The package contains no operating licensing server or signing key. A buyer who does not configure a compatible endpoint cannot activate Codester/direct keys. Protect the corresponding private signing key on the buyer's license service. Its signed payload must also include `license_key_hash`, the SHA-256 hash of the submitted key, so a valid response cannot be replayed for a different key. ## Reinstallation and domain changes To move an installation, back up business data, release the old binding through the configured licensing service, remove the local `license_activations` row, then restore the database and activate again at the new hostname. Envato purchase codes are checked directly against Envato; this package does not provide a self-service domain transfer portal. Codester/direct transfer behavior depends on the buyer's configured license service. The activation gate does not change marketplace license rights. In particular, the product's technical hostname binding does not grant an extra Envato end product, and purchasing an Extended License does not itself change the technical activation limit. Consult the marketplace's current terms or the marketplace support team for questions about a proposed use. ## Disable enforcement for a controlled deployment Set `LICENSE_ENFORCE=false` in the environment before clearing the configuration cache. This is intended for a deployment controlled by the product operator. Keep enforcement enabled in buyer distributions.