Saving and retrieving files from your Apprenda application


At times it may be necessary for your application to read and write files to a singular, static location (e.g., saving and retrieving images).

While a local directory will do the trick while you are developing and testing your application locally, using local resources is not recommended for applications deployed to Apprenda for the following reasons:

  • Applications hosted on any cloud environment like Apprenda can be set to scale automatically and may be relocated from from one server to another. This makes using local files impractical, as any local files will be removed when an application is relocated, and would have to be replicated if an application is scaled.
  • For security reasons, applications on Apprenda are deployed using a very limited account with almost no local permissions; this is done to protect other applications hosted on the same server, but it also restricts an application's ability to save and retrieve files.

Because of these issues with local resources, we recommend that you instead provision a network share and corresponding service account that can access it. You can then specify your application components to run under the service account, which will allow all instances of the application it to connect to that share.


Have more questions? Submit a request