Can You Run Fibr on Your Local Machine?
Learn how to run the Fibr script on your local machine for testing and preview purposes, even though live campaigns won’t be active in this environment.
Last updated
Learn how to run the Fibr script on your local machine for testing and preview purposes, even though live campaigns won’t be active in this environment.
Short answer: No, Fibr cannot run on localhost or private development environments.
Here's why, and what you can do instead.
The Fibr Script needs to communicate with our servers to:
Check which experiments and personalization rules are active
Determine which variant to show each visitor
Send back analytics and conversion data
This communication requires a publicly accessible URL. When you run a site on localhost, 127.0.0.1, or a private IP address, Fibr's servers can't reach your site to validate the script or deliver experiences.
The same limitation applies to staging environments that:
Are behind a VPN
Require authentication to access
Use internal network addresses
Block external traffic
If Fibr can't reach the URL from the public internet, the script won't work.
Option 1: Use a public staging environment
Set up a staging site that's publicly accessible (even if it's not widely known). Add the Fibr Script to this environment and test there before deploying to production.
Tips for staging:
Use a subdomain like staging.yoursite.com
Add it to your Fibr workspace alongside your production domain
You can run separate experiments on staging for testing
Option 2: Use a tunnel service
Tools like ngrok, Cloudflare Tunnel, or localtunnel create a public URL that points to your local development server.
Example with ngrok:
bash
This gives you a URL like https://abc123.ngrok.io that Fibr can access. Add this URL to your Fibr workspace for testing.
Note: Tunnel URLs are temporary. You'll need to update your Fibr settings each time the URL changes.
Option 3: Test in production with limited traffic
If staging isn't an option, you can test safely in production:
Create an experiment with a small traffic allocation (e.g., 5%)
Use audience targeting to limit it to internal team members (by UTM parameter, cookie, or IP range)
Validate the experience works correctly
Gradually increase traffic once confirmed
While Fibr won't fully function on localhost, you can still check if the script is installed correctly:
Open your local site in a browser
Open Developer Tools → Console
Look for any Fibr-related errors
If the script loads without errors, it's installed correctly and will work once deployed to a public URL.
If you're having trouble setting up a testing workflow, reach out to support@fibr.ai. We can help you find a solution that works for your development process.
Last updated
ngrok http 3000