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

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.

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Bobby Iliev
Site Moderator
Site Moderator badge
November 27, 2023
Accepted Answer


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:

Hope that this helps!



Site Moderator
Site Moderator badge
November 27, 2023


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:

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel