How to Add a Custom Domain to Paperclip
Every Paperclip server on Flux starts at a free .app.runonflux.io address with HTTPS, and you can move it to your own domain at any time. The DNS part is one CNAME record. The part specific to Paperclip is that its public address must follow the domain, or sign-in stops working. This guide covers both, and how to check them.
Why the public address matters
Paperclip in authenticated mode has one canonical address, PAPERCLIP_PUBLIC_URL. From it Paperclip derives the base URL its sign-in library uses, the links in invites, and the list of hostnames it accepts. The sign-in library also checks the origin of each sign-in request against that address. So if people open Paperclip at agents.example.com while the public URL still says the old address, sign-up and sign-in fail.
On a self-built server you change the variable and restart. On Hosting for Paperclip the Domain tab changes the domain and the public URL together, so they cannot drift apart.
Before you start
Decide on the name first, because changing it later means resending invites and updating integrations. A subdomain such as agents.example.com or hq.example.com keeps Paperclip separate from your main website and works with every DNS provider. You need access to your domain's DNS settings, usually at your registrar or a DNS host, and a few minutes for the record to spread. Nothing changes on the server until you save the domain in the panel, so you can prepare the record in advance.
Step 1: Find your app address
Your app's free address is your-app-name.app.runonflux.io, shown in the panel. This is the target of your DNS record.
Step 2: Create the CNAME record
At your DNS provider, add a record:
| Type | Name | Value |
|---|---|---|
| CNAME | agents (for agents.example.com) | your-app-name.app.runonflux.io |
Use a subdomain. Many DNS providers do not allow a CNAME on the bare domain itself; if you want example.com without a prefix, look for ALIAS, ANAME or CNAME flattening at your provider. If your DNS provider offers a proxy mode, check its documentation before turning it on, because a proxy in front changes how certificates and origins behave.
Step 3: Add the domain in the Domain tab
Open your app in the panel, go to the Domain tab, enter the domain and save. You can also enter it in the deploy wizard when you create the app. Saving updates the app's specification: the domain is added to the app, and PAPERCLIP_PUBLIC_URL becomes https:// plus your domain. The app restarts to pick up the new address, so expect a short interruption, and pick a quiet moment if agents are mid-run.
To go back, clear the domain in the same tab. The public URL returns to the free address.
Step 4: Check DNS, HTTPS and sign-in
- DNS:
nslookup agents.example.comshould show the CNAME to your app address. - HTTPS: open
https://agents.example.com. The certificate should be valid for your domain. A certificate error shortly after the change usually means DNS has not reached everyone yet. - Health:
https://agents.example.com/api/healthshould answer. - Sign-in: sign in at the new address. It is now the origin Paperclip trusts, so use it, and share it with your team, rather than the old one.
After the switch
- Invites. New invite links use the new address automatically. Links you sent before the change point at the old address; send fresh ones if they fail.
- The owner invite. If you change the domain before using the owner invite, the panel shows the link with the new address.
- Webhooks and integrations. Routines triggered by webhooks and any service that calls Paperclip need the new URL. Update them where you configured them.
- Bookmarks. Update them, and treat the old address as retired for sign-in.
Troubleshooting
Sign-in fails after the change. Check that you are on exactly the address in the Domain tab, with https:// and no extra port. A mismatch in the origin is the usual cause.
The domain does not load. Check the CNAME with nslookup. If it does not resolve yet, wait for the TTL to pass.
The free address works but the domain does not. The record may point at the wrong name. Copy the app address from the panel again.
The security guide explains the sign-in rules in more detail.
Set up your server with Hosting for Paperclip on Flux.
Frequently Asked Questions
Do I need my own domain?
No. Every app gets a free .app.runonflux.io address with HTTPS. A domain is for a nicer address you control.
Why does Paperclip need to know the domain?
Paperclip builds its sign-in base URL, invite links and allowed hostnames from PAPERCLIP_PUBLIC_URL, and its sign-in library checks that requests come from that origin. If the address in the browser does not match, sign-in fails.
Do I have to change PAPERCLIP_PUBLIC_URL myself?
No. On Hosting for Paperclip the Domain tab saves the domain and the public URL together, and clearing the domain points the public URL back at the free address.
Can I use a bare domain such as example.com?
Many DNS providers do not allow a CNAME on the bare domain. Use a subdomain such as agents.example.com, or check whether your provider offers ALIAS, ANAME or CNAME flattening.
How long does the change take?
It depends on your DNS provider and the record’s TTL, often minutes and sometimes longer. Lowering the TTL a day in advance makes the switch faster.
Paperclip is open-source software (MIT) by the Paperclip project (https://github.com/paperclipai/paperclip). Flux is not affiliated with or endorsed by the Paperclip project.