Hey everyone!
I was facing this issue where I was not able to use bolt.diy on my mobile or ipad over TailScale. I asked ChatGPT for help and then I asked “It” to write this post to help anyone who might come across the same issue
I was briefly seeing the landing page but as soon as I wanted to do something it was giving me an error with several lines in red.
If you’ve been struggling to get Bolt.diy working on your mobile or tablet, I found a fix that worked perfectly for me, and I wanted to share it with you all!
The issue happens because the development server in Bolt.diy (using Vite) is configured to only work on localhost
by default. This limits access to the machine where it’s running and blocks other devices on the network from connecting.
The solution? Just a few tweaks to allow the development server to listen on all network interfaces. Here’s how I fixed it:
Steps to Fix Mobile/Tablet Access
1 - Update the docker-compose.yaml
: Open the docker-compose.yaml
file in your project and make sure the app-dev
service has this configuration:
- Set
VITE_HMR_HOST=0.0.0.0
in theenvironment
section. - Add
--host 0.0.0.0
to thecommand
for the development server.
Example Snippet:
app-dev:
…
environment:
- VITE_HMR_HOST=0.0.0.0
- VITE_HMR_PORT=5173
command: pnpm run dev --host 0.0.0.0
2 - Then restart the container:
Restart the container with the development
profile: Run this command to apply the changes:
docker compose --profile development up --build
(I am using the development profile so this should be the profile you are using).
3 - Access Bolt.diy from your mobile or tablet using:
http://<your-computer's-IP>:5173
Replace <your-computer's-IP>
with the IP address of the machine running Bolt.diy.
Why Does This Happen?
By default, Vite binds the development server to localhost
, which only allows access from the same machine. When we update it to use 0.0.0.0
, it tells the server to listen on all network interfaces, allowing other devices on the same Wi-Fi network to connect.