Hi Remco,
Please read the CF buildpack documentation: https://github.com/mendix/cf-mendix-buildpack
Just a side note: CloudFoundry is pretty much "cloud", no On Premise.
There are various ways you can set the constants:
- Using the CF CLI: cf set-env <YOUR_APP> MX_Module_Constant "ABC123"
- Go to a CF admin website (for instance IBM Bluemix console or Pivotal admin environment) and enter the variables there
- Push (cf push -f ./different-directory-1/different-directory-2/alternate_manifest.yml) your application with a CF manifest yaml file: https://docs.cloudfoundry.org/devguide/deploy-apps/manifest.html#env-block