Skip to content

External keys on a server

A private file needs its external key present on the server where it runs — in addition to the Loader. You provide the key in one of two ways.

You get the key’s value from the Keys page in Oxrion Cloud (or you used your own when encoding). Put it on the destination server using either method below.

Set the external key as an environment variable on the server. This is often the most convenient method for containers and modern hosting — set it the way your environment normally defines variables (service config, container environment, and so on).

Alternatively, provide the key through a setting in your php.ini. Use this when setting environment variables isn’t practical for your hosting. After adding it, restart your web server or PHP service so it takes effect.

If your deployment keeps license files (.lic) somewhere other than next to your PHP files, point the Loader at that location with oxrion_loader.license_dir in php.ini:

oxrion_loader.license_dir = "/path/to/licenses"

By default this isn’t needed — the Loader looks for the license file next to the protected .php file automatically.