mirror of
https://github.com/Xevion/fastmail-cloudflare.git
synced 2025-12-05 21:14:55 -06:00
master
fastmail-cloudflare
This is a simple script to update the DNS records of a domain in Cloudflare to point to the Fastmail mail servers.
Warning
This script is not officially supported by Fastmail. Use at your own risk. Furthermore, it's currently in development and may not work as expected.
Requirements
- Node v20+
- Newer or older may work, but is untested.
- pnpm
- Cloudflare API Token
DNS Settings:Editpermission.- Ensure the token has access to the domain in question.
- Create one here.
- The domain you want to onboard, managed by Cloudflare.
Usage
- Clone the repository
git clone https://github.com/Xevion/fastmail-cloudflare.git`
- Install dependencies
cd fastmail-cloudflare && pnpm install
-
Configure environment variables
- Get your Cloudflare API Token.
- Copy
.env.exampleto.envand fill in the values. TARGET_ZONE_IDis the ID of the Zone/Domain you want to onboard.- If you don't know it, run the app without it, and it will list all your zones with their name and ID.
-
Run the script!
pnpm run start
Description
Languages
TypeScript
100%