<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>digitalocean-droplet-environment-variables on The Cloud Hub</title>
    <link>https://thecloudhub.com/tag/digitalocean-droplet-environment-variables/</link>
    <description>Recent content in digitalocean-droplet-environment-variables on The Cloud Hub</description>
    <generator>Hugo -- 0.118.2</generator>
    <language>en-au</language>
    <lastBuildDate>Thu, 28 Jan 2021 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://thecloudhub.com/tag/digitalocean-droplet-environment-variables/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Setting Digital Ocean environment variables</title>
      <link>https://thecloudhub.com/2021/01/28/setting-digital-ocean-environment-variables/</link>
      <pubDate>Thu, 28 Jan 2021 00:00:00 +0000</pubDate>
      <guid>https://thecloudhub.com/2021/01/28/setting-digital-ocean-environment-variables/</guid>
      <description>Are you trying to work out how to setup environment variables for your Digital Ocean droplet or app running on the app platform? Here&amp;rsquo;s how.
Digital Ocean droplet environment variables Setting an environment variable for a droplet is a little more complicated than for an app running on the app platform.
Follow these steps to set environment variables on a Linux droplet:
SSH into your droplet. If you&amp;rsquo;re not sure how to do that, see here Once connected, run the following command to set your environment variable: 1 export YOUR_VARIABLE_KEY=&amp;lt;your-variable-value&amp;gt; App platform environment variables To set environment variables for an app running on Digital Ocean&amp;rsquo;s app platform, follow these steps:</description>
      <content:encoded><![CDATA[<p>Are you trying to work out how to setup environment variables for your <a href="http://digitalocean.com">Digital Ocean</a> droplet or app running on the app platform? Here&rsquo;s how.</p>
<h2 id="digital-ocean-droplet-environment-variables">Digital Ocean droplet environment variables</h2>
<p>Setting an environment variable for a droplet is a little more complicated than for an app running on the app platform.</p>
<p>Follow these steps to set environment variables on a Linux droplet:</p>
<ol>
<li>SSH into your droplet. If you&rsquo;re not sure how to do that, <a href="https://www.digitalocean.com/docs/droplets/how-to/connect-with-ssh/">see here</a></li>
<li>Once connected, run the following command to set your environment variable:</li>
</ol>
<div class="highlight"><div style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">
<table style="border-spacing:0;padding:0;margin:0;border:0;"><tr><td style="vertical-align:top;padding:0;margin:0;border:0;">
<pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">1
</span></code></pre></td>
<td style="vertical-align:top;padding:0;margin:0;border:0;;width:100%">
<pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-fallback" data-lang="fallback"><span style="display:flex;"><span>export YOUR_VARIABLE_KEY=&lt;your-variable-value&gt;
</span></span></code></pre></td></tr></table>
</div>
</div><h2 id="app-platform-environment-variables">App platform environment variables</h2>
<p><img loading="lazy" src="images/app_environment_variable-1024x220.png" alt=""  />
</p>
<p>To set environment variables for an app running on Digital Ocean&rsquo;s app platform, follow these steps:</p>
<ol>
<li>Login to the Digital Ocean portal</li>
<li>Open your app</li>
<li>Click the &ldquo;Settings&rdquo; tab</li>
<li>Scroll down until you see &ldquo;App-Level Environment Variables&rdquo;</li>
<li>Click &ldquo;Edit&rdquo; and add the environment variable key and value</li>
<li>Click &ldquo;Save&rdquo;</li>
</ol>
<p>Your environment variable will now be available for your app.</p>
]]></content:encoded>
    </item>
  </channel>
</rss>
