BunnyCDN provides an easy way to speed up your DigitalOcean Space. This enables you to get your files to your users faster than if they just used the Space on its own. This guide will show you how to setup BunnyCDN on your Space in three easy steps.
1. Configure your Space and obtain its URL
The first thing that you need to do is configure your Space, and upload some data to it. DigitalOcean have a guide on how to do this here. Make sure you have the default Spaces CDN disabled, as this will interfere with BunnyCDN.
During the setup of your Pull Zone, it will give you your Space URL. Make a note of this, as we will need it for the next step. The Space URL will form the basis of our Pull Zone. It will appear during the "Create a Space" page, like this:
2. Configure your Pull Zone
Once you've got your Space setup, you can log into BunnyCDN and configure your Pull Zone. To do this, log into your BunnyCDN dashboard, and click Pull Zones, followed by Add Pull Zone. Select a name for your zone, and enter the Space URL you got from Step 1:
Configure your pricing and region tiers as you want them, and then click Add Pull Zone at the bottom.
For more detailed instructions, you can have a look at our article on creating your first pull zone.
3. Test your Pull Zone
You're all done. BunnyCDN will now automatically pull and cache files from your Space and deliver them from your newly created hostname. After the configuration finishes synchronising to our worldwide cache nodes, you can test if BunnyCDN is integrated with your Space. To do this, upload some files to your Space. Ensure the Permissions on your file is set to Public, so that our CDN servers can connect and download the content to cache it for you.
Once you've uploaded some content, visit your newly created Pull Zone and append the path/name of one of the uploaded files. For example:
If the b-cdn.net URL works, then you have successfully configured BunnyCDN to cache content from your DigitalOcean Space. You can now replace your existing Space URLs in your applicatioon with your new BunnyCDN URLs and enjoy the performance boost that BunnyCDN will give you.