Question

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

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

KFSys
Site Moderator
Site Moderator badge
November 27, 2023

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/

Try DigitalOcean for free

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

Sign up

Become a contributor for community

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

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

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.