Import Laravel Vapor DNS to Cloudflare

Published on by

Import Laravel Vapor DNS to Cloudflare image

Orrison/Cumulus is an open-source package that works with Laravel Vapor to allow the user to manage their DNS records better when using Cloudflare for DNS. When a custom domain is added in Laravel Vapor, assigned to a project environment, and deployed, Laravel Vapor will automatically set up the proper DNS records in Route 53. Laravel Vapor will then display these records via the UI or Vapor CLI tool, which you would then have to copy manually into Cloudflare.

Trying to manage DNS information from Vapor to Cloudflare without Orrison/Cumulus can open your data up to risks such as human error and wasted time since it would need to be copied over manually. In its essence, Orrison/Cumulus is an open-source tool that automatically copies the proper DNS records from Laravel Vapor to Cloudflare.

How it works

Before you can effectively use Orrison/Cumulus, you will need to have a valid Cloudflare API Access Token, the domain setup as a zone in your Cloudflare account, and a fully installed and authenticated Laravel Vapor CLI. Once this is complete, you're ready to input the Orrison/Cumulus package commands.

When obtaining the Cloudflare API Access Token, the "Edit DNS Zone" template is a perfect token template to use. You will need to set the "Zone Resources" options to either "All Zones" or the correct option for your use case.

To start using this package, you will first need to install it using Composer:

composer global require orrison/cumulus --with-all-dependencies

Once installed, the first step is to add the Cloudflare API Token. You can add the token using: Cumulus Cloudflare:login.

After adding and authenticating the Cloudflare API Token, you're ready to run the import command. For example, to import the DNS records for your domain "example.com," you would run: cumulus Cloudflare:import example.com.

Subdomains are DNS records of the root domain, so you can assign a subdomain to a project environment and import its DNS records by running the import command for the root domain. For example, if you have assigned a custom domain "sub.example.com" to a project environment in Laravel Vapor. You can import its DNS records by running: Cumulus Cloudflare:import example.com.

Why use Laravel Vapor

As a serverless deployment platform for Laravel, Vapor brings many impactful benefits such as a scaling cloud framework for your application, databases, caches, metrics, automatic asset uploading, and more. Laravel Vapor offers multiple environments, rapid rollbacks, infinite deployments, and an ever-expanding library of tools.

Why use Cloudflare

Cloudflare offers sophisticated security and performance systems for websites, APIs, and applications. Operating entirely in the cloud, Cloudflare gives you an integrated set of L3-L7 network services that are easy to configure, use, and maintain. Allowing users to lower the risk of DDoS attacks, cache static content, route through many network paths, and optimize across devices, this content delivery network or CDN offers incredible security and speed advantages. Using Cloudflare is almost necessary when using API Gateway V2 in Laravel Vapor. It's one of the best ways to add automatic HTTP to HTTPS redirects that aren't available in API Gateway V2.

Conclusion

When looking to optimize your site or application, using a combination of Laravel Vapor and Cloudflare can be a powerful way to ensure security, speed, database scaling, and in-depth analytic capabilities. That said, using the Orrison/Cumulus package ensures that these tools run together seamlessly when utilizing a custom domain or subdomains. Additional commands and info can be found in the project.

Kevin Ullyott photo

Kevin, a Web Application Developer at Kirschbaum, has experience in Laravel, Vue.js, React, Tailwind CSS, Livewire, etc. Kevin has been a part of and lead teams in various projects. Be it small applications with specific audiences or Enterprise scale applications with large audiences, monoliths or micro-services, building a product from scratch or bringing a running project back to success, Kevin is always excited to deliver value.

Kevin has a degree in Web Design and has worked professionally in the industry for 5+ years. Prior to joining Kirschbaum, he was a developer for a software development company converting a legacy Java application into Laravel micro-services.

Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.

image
Tinkerwell

Version 4 of Tinkerwell is available now. Get the most popular PHP scratchpad with all its new features and simplify your development workflow today.

Visit Tinkerwell
Laravel Forge logo

Laravel Forge

Easily create and manage your servers and deploy your Laravel applications in seconds.

Laravel Forge
Tinkerwell logo

Tinkerwell

The must-have code runner for Laravel developers. Tinker with AI, autocompletion and instant feedback on local and production environments.

Tinkerwell
No Compromises logo

No Compromises

Joel and Aaron, the two seasoned devs from the No Compromises podcast, are now available to hire for your Laravel project. ⬧ Flat rate of $7500/mo. ⬧ No lengthy sales process. ⬧ No contracts. ⬧ 100% money back guarantee.

No Compromises
Kirschbaum logo

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum
Shift logo

Shift

Running an old Laravel version? Instant, automated Laravel upgrades and code modernization to keep your applications fresh.

Shift
Bacancy logo

Bacancy

Supercharge your project with a seasoned Laravel developer with 4-6 years of experience for just $2500/month. Get 160 hours of dedicated expertise & a risk-free 15-day trial. Schedule a call now!

Bacancy
Lucky Media logo

Lucky Media

Bespoke software solutions built for your business. We ♥ Laravel

Lucky Media
Lunar: Laravel E-Commerce logo

Lunar: Laravel E-Commerce

E-Commerce for Laravel. An open-source package that brings the power of modern headless e-commerce functionality to Laravel.

Lunar: Laravel E-Commerce
LaraJobs logo

LaraJobs

The official Laravel job board

LaraJobs
Larafast: Laravel SaaS Starter Kit logo

Larafast: Laravel SaaS Starter Kit

Larafast is a Laravel SaaS Starter Kit with ready-to-go features for Payments, Auth, Admin, Blog, SEO, and beautiful themes. Available with Vue and Livewire stacks.

Larafast: Laravel SaaS Starter Kit
SaaSykit: Laravel SaaS Starter Kit logo

SaaSykit: Laravel SaaS Starter Kit

SaaSykit is a Laravel SaaS Starter Kit that comes with all features required to run a modern SaaS. Payments, Beautiful Checkout, Admin Panel, User dashboard, Auth, Ready Components, Stats, Blog, Docs and more.

SaaSykit: Laravel SaaS Starter Kit
Rector logo

Rector

Your partner for seamless Laravel upgrades, cutting costs, and accelerating innovation for successful companies

Rector

The latest

View all →
Real Time Command Line Monitoring With Laravel Top image

Real Time Command Line Monitoring With Laravel Top

Read article
A New Validation Rule and the Ability to Manually Fail a Command in Laravel 11.8 image

A New Validation Rule and the Ability to Manually Fail a Command in Laravel 11.8

Read article
New Proposed Array Find Functions in PHP 8.4 image

New Proposed Array Find Functions in PHP 8.4

Read article
Laracon AU 2024 tickets are now on sale image

Laracon AU 2024 tickets are now on sale

Read article
Dash UI is a Laravel Blade Component Library Inspired by Shopify Polaris image

Dash UI is a Laravel Blade Component Library Inspired by Shopify Polaris

Read article
A Look at What's Coming to PHP 8.4 image

A Look at What's Coming to PHP 8.4

Read article