Skip to content

Runtime

Environment variables

The following environment variables are set as part of the application runtime.

CLOUDRON

CLOUDRON is always set to '1'. This is useful to write Cloudron specific code.

CLOUDRON_API_ORIGIN

CLOUDRON_API_ORIGIN is set to the HTTP(S) origin of this Cloudron's API. For example, https://my.cloudron.io.

CLOUDRON_APP_DOMAIN

CLOUDRON_APP_DOMAIN is set to the domain name of the application. For example, app-girish.cloudron.us.

CLOUDRON_APP_ORIGIN

CLOUDRON_APP_ORIGIN is set to the HTTP(S) origin on the application. This is origin which the user can use to reach the application. For example, https://my.cloudron.io.

CLOUDRON_PROXY_IP

The IP address of the Cloudron reverse proxy. Apps can trust the HTTP headers (like X-Forwarded-For) for requests originating from this IP address.

CLOUDRON_WEBADMIN_ORIGIN

CLOUDRON_WEBADMIN_ORIGIN is set to the HTTP(S) origin of the Cloudron's dashboard. For example, https://my.cloudron.io.