Installation via Cloudflare Workers
Installation
1. Create Cloudflare Account
If you don’t have a Cloudflare account, create one here. You only need an email for registration. Due to Cloudflare’s restrictions, use a reputable email provider like Gmail.
2. Create worker
First, download the Worker code from here.
In your Cloudflare account, navigate to the Compute (Workers)
> Workers & Pages
section in the left menu, click Create
, and select Workers
and then Start with Hello World!
> Get started
.
Enter a desired name, which will form your panel’s domain and Deploy
.
Danger
Choose a name that does not include the word bpb
, as this may trigger Cloudflare’s detection and result in a 1101
error.
Then click Edit
here. In the left sidebar, delete the worker.js
file and upload the new one. If it gives an error, delete the package-lock.json
file too. Since the code has become large, copying and pasting on mobile is difficult — refer to the image below and upload it properly. On mobile, open the side menu, long-press the Explorer, and click Upload...
.
Finally, Deploy
the Worker.
Tip
Note that the panel update process is exactly the same — you delete the old files, upload the new ones, and deploy. Previous settings remain safe, only the panel gets updated.
First, at the top of the dashboard, click Visit
. You’ll see an error saying you need to set the UUID and Trojan Password first. It includes a link (Secrets generator) — open it in your browser and keep it open for the next step.
3. Create KV
Return to the Worker dashboard and follow these steps:
From here, go to the KV
page:
In the KV section, click Create
, give it a name (e.g., Test), and click Add
.
Again, go to the Workers & Pages
section from the sidebar, open the Worker you created, go to Settings
, and find Bindings
. Click Add
and choose KV Namespace
. From the dropdown, select the KV you just created (e.g., Test). What’s important is the first field — it must be set to kv
. Then click Deploy
.
4. Set UUID and Trojan password
Still in Settings
, you'll see a section called Variables and Secrets
. Click Add
, enter UUID
(in uppercase) as the Variable name
, paste the UUID Secrets generator into the Value field, click + Add variable
and set Variable name
to TR_PASS
(uppercase), get the Trojan password from Secrets generator, then Deploy
.
Again click Visit
in your worker dashboard, you see speedtest in browser, just add /panel
to the end of address and see your panel:
It will ask you to set a new password and log in — that’s it.
Installation is complete; the rest of the information below may not be needed by everyone.
For settings tutorials and tips, refer to the main guide.
Advanced configuration (Optional)
Fixing the Proxy IP
By default, the code uses multiple Proxy IPs randomly, assigning a new random IP for each connection to Cloudflare addresses (covering much of the web). This IP rotation may cause issues, particularly for traders. From version 2.3.5 onward, you can change the Proxy IP via the panel and update the subscription. However, the method below is recommended:
Note
Changing the Proxy IP via the panel requires updating the subscription if the IP stops working, which can disrupt donated configurations, as users without an active subscription cannot update them. Use this method only for personal use. Other methods don’t require subscription updates.
To change the Proxy IP, go to Workers & Pages
, open your Worker, then go to Settings
→ Variables and Secrets
:
Click Add
, write PROXY_IP
(uppercase) as the Variable name
.
You can get IPs from the link below — it shows multiple IPs along with their regions and ISPs. Pick one or more:
Info
To use multiple Proxy IPs, enter them comma-separated.
Enter the IPs in the Value
field and click Deploy
.
Setting Fallback Domain
By default, accessing the main Worker domain redirects to the Cloudflare speed test site. To change this, follow the same steps as for the Proxy IP, but set the variable name to FALLBACK
and provide a domain (without https://
or http://
) as the value, e.g., www.speedtest.net
or npmjs.org
.
Changing the Subscription Path
The default subscription link path uses the same UUID as VLESS. For increased privacy, you can change this. Follow the same steps as above, but set the variable name to SUB_PATH
. The Secrets generator at /secrets
provides a Random Subscription URI path
value, which you can use or replace with a custom value (using allowed characters).
Adding Custom Domain
Go to your Cloudflare dashboard, open your Worker from Compute (Workers)
> Workers & Pages
. Go to Settings
and at the top, you’ll see Domains & Routes
. Click Add +
, then choose Custom domain
.
Enter a domain (you must own and have activated it on the same account).
Suppose your domain is bpb.com
. You can enter the main domain or a subdomain, like xyz.bpb.com
, then click Add domain
.
Cloudflare will connect the Worker to your domain (this might take a while — they say up to 24 hours).
Then click Add +
again, but this time select Route
. Choose your domain from the Zone
section, and in the Route
section, enter it like this:
You can then access your panel via https://xyz.bpb.com/panel
and retrieve new subscriptions.
Tip
- If you connect a domain to the Worker, your traffic becomes probably unlimited.
- Worker panels support non-TLS ports like 80, 8080, etc. But once you add a custom domain, those ports stop working and won’t be available in the panel.
Updating the Panel
To update your panel, download the new worker.js file from here. In your Cloudflare account, go to Compute (Workers)
> Workers & Pages
, select your Worker project, edit it, delete old worker, upload new one and Deploy.