<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Jaskirat Randhawa</title>
    <description>The latest articles on Forem by Jaskirat Randhawa (@jaskiratr).</description>
    <link>https://forem.com/jaskiratr</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F993211%2F1d381051-8c5f-4d66-84b1-689e430a528d.jpg</url>
      <title>Forem: Jaskirat Randhawa</title>
      <link>https://forem.com/jaskiratr</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/jaskiratr"/>
    <language>en</language>
    <item>
      <title>Private, cost-effective cloud storage that you will want to use!</title>
      <dc:creator>Jaskirat Randhawa</dc:creator>
      <pubDate>Wed, 05 Feb 2025 21:18:44 +0000</pubDate>
      <link>https://forem.com/fastly/private-cost-effective-cloud-storage-that-you-will-want-to-use-1495</link>
      <guid>https://forem.com/fastly/private-cost-effective-cloud-storage-that-you-will-want-to-use-1495</guid>
      <description>&lt;p&gt;If you are like me who wants private, affordable and easy to use storage, then &lt;a href="https://www.fastly.com/products/storage" rel="noopener noreferrer"&gt;Fastly Object Storage&lt;/a&gt; might be for you. It is an S3 compatible object storage with zero egress fees! Let’s take a look at how you can set it up and use S3 compatible tools to interact with your data. In this demo, I’ll walk you through connecting one of the popular tools &lt;a href="https://sftpgo.com/" rel="noopener noreferrer"&gt;SFTPGo&lt;/a&gt;, with Fastly Object Storage.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;This demo assumes that you have&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A Fastly account with Fastly Object storage&lt;/li&gt;
&lt;li&gt;A Fastly API Token set locally as &lt;code&gt;$FASTLY_API_TOKEN&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;AWS CLI and Docker installed locally on your machine&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhvi6nrnbigwbcrb88m2b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhvi6nrnbigwbcrb88m2b.png" alt="Fastly Object Storage product page" width="800" height="594"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating an Object Storage Key and a Bucket
&lt;/h2&gt;

&lt;p&gt;Once you have the object storage available in your account, create an access key in the Fastly web interface. It consists of an access key ID and a secret key that is used to authenticate requests made to the Fastly Object Storage.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Log in to the Fastly web interface.&lt;/li&gt;
&lt;li&gt;Navigate to &lt;strong&gt;Resources&lt;/strong&gt; &amp;gt; Object Storage.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Create Key&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Enter a description and select the scope of access &lt;em&gt;(Note: I am using read-write-admin for this demo.)&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;Note the access key and secret key, as the secret key will not be visible again.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Alternatively, if you have a Fastly API token, you can use curl to create an access key for object storage.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;FASTLY_API_TOKEN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;xxxxx

&lt;span class="c"&gt;# Create an access key using Fastly API token.&lt;/span&gt;
&lt;span class="c"&gt;# It will create AWS_ACCESS_KEY and AWS_SECRET_KEY set of keys&lt;/span&gt;
curl &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Fastly-Key: &lt;/span&gt;&lt;span class="nv"&gt;$FASTLY_API_TOKEN&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;-X&lt;/span&gt; POST https://api.fastly.com/resources/object-storage/access-keys &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
  "description": "Demo access key",
  "permission": "read-write-admin",
  "buckets": ["sftpgo-bucket"]
}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Configure AWS CLI and create a new Fastly profile &lt;code&gt;nano ~/.aws/config&lt;/code&gt;. You can pick one of three available regions: us-west, us-east, or eu-central.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[default]
region = us-west

[profile fastly]
region = us-west
endpoint_url = https://us-west.object.fastlystorage.app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here are some commands to configure the AWS CLI to work with Fastly Object Storage. Let’s create a bucket &lt;code&gt;sftpgo-bucket&lt;/code&gt; that we will connect our SFTPGo client to in the next steps. Feel free to play around with using AWS CLI to interact with Fastly Object Storage. We will be able to see all the contents stored in the bucket using the SFTPGo client.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Configure the AWS CLI&lt;/span&gt;
aws configure &lt;span class="nt"&gt;--profile&lt;/span&gt; fastly

&lt;span class="c"&gt;# Create a bucket&lt;/span&gt;
aws s3 mb s3://sftpgo-bucket &lt;span class="nt"&gt;--profile&lt;/span&gt; fastly

&lt;span class="c"&gt;# List buckets&lt;/span&gt;
aws s3 &lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;--profile&lt;/span&gt; fastly

&lt;span class="c"&gt;# Upload a file&lt;/span&gt;
aws s3 &lt;span class="nb"&gt;cp&lt;/span&gt; ./sample.txt s3://sftpgo-bucket/ &lt;span class="nt"&gt;--profile&lt;/span&gt; fastly

&lt;span class="c"&gt;# List contents of a bucket&lt;/span&gt;
aws s3 &lt;span class="nb"&gt;ls &lt;/span&gt;sftpgo-bucket &lt;span class="nt"&gt;--profile&lt;/span&gt; fastly
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Using SFTPGo is as easy as 1-2-3
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What is SFTPGo?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;SFTPGo is one of my favorite file management solutions that supports S3 as a backend. One of the best things about it is that you can store and share files with your personal contacts or work colleagues with a convenient link sharing function. Advanced users can also find comfort in its abilities to create and manage users, folders, mounts and other resources. You can also go a step further to set up two-factor authentication.&lt;/p&gt;

&lt;p&gt;We’ll keep it simple. All you have to do is:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Install SFTPGo&lt;/li&gt;
&lt;li&gt;Add Fastly Object Storage as a backend&lt;/li&gt;
&lt;li&gt;Done! You have a working setup.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;There are multiple ways to install SFTPGo. I’m going to use docker-compose with minimal configuration. It’ll take less than 2 minutes to get up and running.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;3.8"&lt;/span&gt;
&lt;span class="na"&gt;services&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;sftpgo&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;drakkan/sftpgo:latest&lt;/span&gt;
    &lt;span class="na"&gt;container_name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;some-sftpgo&lt;/span&gt;
    &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;8080:8080"&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;2022:2022"&lt;/span&gt;
    &lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;sftpgodata:/srv/sftpgo&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;sftpgohome:/var/lib/sftpgo&lt;/span&gt;
    &lt;span class="na"&gt;restart&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;unless-stopped&lt;/span&gt;
&lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;sftpgodata&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;sftpgohome&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create a &lt;code&gt;docker-compose.yaml&lt;/code&gt; file and run &lt;code&gt;docker-compose up -d&lt;/code&gt; to spin your service.&lt;/p&gt;

&lt;p&gt;This will create a barebones SFTPGo server for you. You have plenty of &lt;a href="https://docs.sftpgo.com/2.6/" rel="noopener noreferrer"&gt;customization options&lt;/a&gt; depending on your needs. Next, launch &lt;a href="http://127.0.0.1:8080/web/admin/login" rel="noopener noreferrer"&gt;127.0.0.1:8080/web/admin/login&lt;/a&gt; and run through the first time setup for the administrator. Provide the username and password that you’ll use to manage this instance. Note: Don’t worry if you lose these credentials or docker volume. Your data will still remain safe in Fastly Object Storage, because we’re using it as a backend.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F53iga41qbbs9ggivjrw7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F53iga41qbbs9ggivjrw7.png" alt="SFTPGo admin login" width="800" height="664"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The wonderful thing about this sort of a setup is that you can host your content without needing a degree in server management. It’s essentially your very own digital attic. You get to control everything. Now, you’re thinking, "Wait, I don’t want to mess around with code and stuff. I just want to store some content." No problem. Setting up Fastly Object Storage with SFTPGo is quite simple. You’re not building a spaceship here—just a safe space for your assets.&lt;/p&gt;

&lt;h3&gt;
  
  
  Here’s the breakdown:
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Create a new user account&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Once you log into the WebAdmin console, go to &lt;strong&gt;Users&lt;/strong&gt; and click on &lt;strong&gt;Add&lt;/strong&gt; to create a new user account. This is the simplest way to get started. You can, of course, do more than that like creating groups and virtual folders. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Futyigqgkrlluo94h072w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Futyigqgkrlluo94h072w.png" alt="SFTPGo user management" width="800" height="283"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Configure the user account with following settings:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Storage: S3 (Compatible)&lt;/li&gt;
&lt;li&gt;Bucket: Your bucket name&lt;/li&gt;
&lt;li&gt;Region: us-west&lt;/li&gt;
&lt;li&gt;Access Key: Generated earlier using Fastly API&lt;/li&gt;
&lt;li&gt;Access Secret: Generated earlier using Fastly API&lt;/li&gt;
&lt;li&gt;Endpoint: &lt;a href="https://us-west.object.fastlystorage.app" rel="noopener noreferrer"&gt;https://us-west.object.fastlystorage.app&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Toggle on the option for &lt;code&gt;Use path-style addressing&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fppzolraa7s8q07bxpkpx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fppzolraa7s8q07bxpkpx.png" alt="SFTPGo user configuration" width="800" height="1329"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Done. Now test your setup&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Go to &lt;a href="http://127.0.0.1:8080/web/client/login" rel="noopener noreferrer"&gt;127.0.0.1:8080/web/client/login&lt;/a&gt; and log in with the credentials of the user that you just created. You should be able to see the contents of your storage bucket. Violá! You can now use the UI to upload, download and share your files. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F68gtnivhkkbyzxukvw9y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F68gtnivhkkbyzxukvw9y.png" alt="SFTPGo web client" width="800" height="476"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To share files, click on options for a file or a folder. Then click on &lt;strong&gt;Share&lt;/strong&gt;. It will prompt you with a few options to create a Share. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2lw8ulw8f3jrric0wqlv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2lw8ulw8f3jrric0wqlv.png" alt="SFTPGo add share" width="800" height="632"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you’ve created a Share, you can go to Share in the left sidebar and get the options for viewing and managing your shares. Select the one you created and it’ll provide you a few links that you can pass along to others. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd4as1y8mhynjjdy8d6t1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd4as1y8mhynjjdy8d6t1.png" alt="SFTPGo share links" width="800" height="337"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Easy to use storage that’s more private than your secret snack stash
&lt;/h2&gt;

&lt;p&gt;So, there you have it: a private cloud storage that’s simple to set up, easy to share with your friends and colleagues (okay, family too). Once you set up the SFTPGo instance, you don’t need to manage any code. The best part? Using Fastly Object storage, you only pay for what you actually use. &lt;/p&gt;

&lt;h2&gt;
  
  
  Tell us how are you’re using Fastly Object Storage
&lt;/h2&gt;

&lt;p&gt;I’m a product manager at Fastly and I would like to hear more about how you are using Fastly Object Storage for your personal or work life. What tools are you using? What tools would you like us to support? Join the conversation in our forum, and &lt;a href="https://www.fastly.com/signup?tier=free" rel="noopener noreferrer"&gt;get started for free&lt;/a&gt;.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
