If you’re running your storefront on Adobe Commerce Cloud (Magento Commerce Cloud), you’re likely using Fastly as your content delivery network (CDN) and caching layer. For integrations, cache purging, and automated deployments, access to Fastly API credentials is essential. But where exactly are these credentials stored?
In this blog, we’ll walk you through the exact location and how to safely retrieve your Fastly credentials within Adobe Commerce Cloud environments.
Where Are Fastly Credentials Stored?
In Adobe Commerce Cloud, Fastly credentials are securely stored in the shared mount directory of your environment. You can access them by connecting to your environment via SSH.
How to Retrieve Fastly Credentials
Follow these steps to locate the Fastly credentials:
1. Connect to Your Server via SSH
Use SSH to connect to your Adobe Commerce Cloud environment:
ssh <environment-id>.magento.cloud
2. Navigate to the Shared Directory
Once inside the environment, go to the shared directory using:
cd /mnt/shared/
This is a persistent shared directory available across deploys for each environment (Staging or Production).
3. Access the Fastly Credentials File
Inside /mnt/shared/
, you’ll find the Fastly token file:
fastly_tokens.txt
View it using:
cat fastly_tokens.txt
This file typically contains environment-specific Fastly service ID(s) and API token(s).
Important Notes
- Separate Credentials per Environment: Staging and Production environments each have their own
fastly_tokens.txt
. Always SSH into the correct environment when retrieving tokens. - Sensitive File: Treat this file as a secret—do not commit it to version control or expose it publicly.
Conclusion
Fastly credentials in Adobe Commerce Cloud are stored securely in the /mnt/shared/fastly_tokens.txt
file within each environment. Understanding where and how to access them ensures smoother deployment workflows, cache management, and CDN integration.
You may also like,
How to Sync Magento 2 Media Files Using rsync on Adobe Commerce Cloud
How to Apply Patches in Adobe Commerce (Magento 2 Cloud)
Fastly : How to set basic authentication for a specific page in Magento 2
Official Documentation :
Leave a Comment