Report this

What is the reason for this report?

How to scp a file containing credentials to an app platform server?

Posted on November 26, 2023

I know how to scp to a droplet but I can’t find any documentation about fully managed app platform servers. As the file contains sensitive credentials, I obviously don’t want to push it as part of a git deployment.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hello,

In DigitalOcean’s App Platform, you don’t have direct machine access like you would with a Droplet, which means you cannot use SSH or SCP directly to transfer files. The App Platform is designed to be a fully managed solution, which abstracts away the server management aspect.

For sensitive credentials, DigitalOcean’s App Platform encourages the use of environment variables or secrets for configuration. These can be set via the DigitalOcean control panel or using the doctl command-line tool. Here’s how you can do it:

  1. Go to the App Platform dashboard within your DigitalOcean control panel.
  2. Select your app.
  3. Click on the “Settings” tab.
  4. Under “App-Level Environment Variables”, click “Edit”.
  5. Add your credentials as environment variables here. You can mark them as secret to encrypt and hide their values.

Alternatively, you can use the doctl CLI to manage your app as well:

https://docs.digitalocean.com/reference/doctl/reference/apps/

Hope that this helps!

Best,

Bobby

Heya,

App Platform, being a fully managed solution, operates differently compared to traditional droplets. This platform is designed to simplify application deployments by abstracting away server management, and it primarily relies on Git for code deployment. However, when it comes to handling sensitive credentials or specific configuration files, pushing them via Git is indeed not recommended due to security concerns.

For sensitive data such as API keys, database passwords, or other secrets, DigitalOcean’s App Platform offers environment variables for secure storage. You can use these environment variables to set and manage sensitive information without hardcoding them into your code or configuration files:

https://docs.digitalocean.com/products/app-platform/how-to/use-environment-variables/

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.