Guides / API tokens
How to create a Cloudflare API token with the narrowest permissions
Shipyard uses a Cloudflare token for domain registrar, dns and cdn, mailbox for the domain and file storage. The token is stored in your computer's keychain and is not sent to shipyardmcp.com. These are the exact steps, and the smallest set of permissions that works.
Create the token
Start here: https://dash.cloudflare.com/profile/api-tokens
- Open the link. The name Shipyard and four of the seven permissions are already filled in. If the page opens empty instead, press Create Token, name it Shipyard and press "Start from scratch (Custom)".
- Account policy (if you are asked, pick "Start with an Account policy" and choose your account). It needs four permissions: Registrar: Domains (found under DNS & Zones; tick Admin, and leave Registrar Sandbox Domains alone), Email Routing Addresses, Workers R2 Storage and API Tokens. Add the ones that are missing.
- Zone policy (press "+ Add new policy" under the list, pick "Start with a Zone policy", and leave it on all zones). It needs three permissions: Zone, DNS and Email Routing Rules. Add the ones that are missing.
- Finding a permission: type its name in the "Search for permission groups" box of that policy. Without searching, they sit under these headings: Registrar: Domains under DNS & Zones, Email Routing Addresses under Email & Messaging, Workers R2 Storage under Developer Platform, API Tokens under Account & Billing.
- Each permission has two boxes. Always tick the right-hand one: it is called Edit on most and Admin on some. Read alone is not enough.
- Do not pick "Start with a User policy".
- Token expiration: leave "No expiration". Client IP address filtering: leave empty.
- Press Continue to summary. Check that it shows two blocks: one with the four account permissions and one with the three zone permissions. If the zone block is missing, press Back and use "Add new policy".
- Press Create Token and copy it. Cloudflare shows it only once.
- Paste it into Shipyard. Leave the Account ID question empty: Shipyard finds it. It only asks you to choose if your login has more than one Cloudflare account.
Permissions, and why each one is needed
- Zone: Zone: Edit: Add the domain to Cloudflare DNS.
- Zone: DNS: Edit: Write the records for hosting, email and Search Console. Only records Shipyard created are ever changed or removed.
- Account: Registrar: Domains: Admin: Check availability and price, and register the domain after you confirm. Leave out if you never buy domains through Shipyard.
- Zone: Email Routing Rules: Edit: Forward hello@yourdomain to your inbox. Leave out if you chose no mailbox.
- Account: Email Routing Addresses: Edit: Register your inbox as the address mail is forwarded to. Leave out if you chose no mailbox.
- Account: Workers R2 Storage: Edit: Create the file storage bucket. Leave out if you chose no storage.
- Account: API Tokens: Edit: Mint S3 keys limited to that one bucket for your app. Without it Shipyard tells you how to create them by hand.
Set up once in Cloudflare before your first launch
- Add a card and make it the default payment method. (https://dash.cloudflare.com/?to=/:account/billing/payment-info)
- To buy domains: on the Registrations page press Create default contact and fill in your name, address, email and phone. Write the phone as +country code, a dot, then the number without its leading 0, for example +31.612345678. Cloudflare may email a verification link to that address: click it. There is no separate agreement to accept after that. Do not buy a domain there and skip its Create Registrar API token button: Shipyard's token needs more permissions than that one has. (https://dash.cloudflare.com/?to=/:account/domains/registrations)
- Switch R2 on once. It uses the card above; the first 10 GB are free. (https://dash.cloudflare.com/?to=/:account/r2/overview)
What stays manual
These are things only a person can do at this provider. Shipyard cannot and will not do them for you.
- Creating the Cloudflare account and verifying its email.
- Clicking the confirmation link Cloudflare emails to your inbox before it forwards mail there.
What you paste into Shipyard
- API token
- Account ID (optional): Leave empty: Shipyard looks it up. Only needed if your login has several Cloudflare accounts; it is the 32-character code in the address bar after dash.cloudflare.com/ on your account home page.
Have this set up for you
Shipyard connects your accounts once and then does all of this for every new product, in about an hour.
See how it works