Your local server isn't likely to be accessible from the internet. Use tunneling to expose it temporarily.
cd /tmp
cat <<'EOF' > index.html
<!DOCTYPE html>
<html lang="en">
<head>
<title>My Tunnel</title>
</head>
<body>
Hi, this is running on my machine!
</body>
</html>
EOF
php -S localhost:8000
# Install
brew install ngrok # macOS
# or download from https://ngrok.com
# Authenticate (free account required)
ngrok config add-authtoken <your-token>
# Start tunnel
ngrok http 8000
# Install
brew install cloudflared # macOS
# Quick tunnel (no account needed)
cloudflared tunnel --url http://localhost:8000
curl -fsSL https://pkg.cloudflare.com/cloudflare-main.gpg \
| sudo gpg --dearmor -o /usr/share/keyrings/cloudflare-main.gpg
echo "deb [signed-by=/usr/share/keyrings/cloudflare-main.gpg] https://pkg.cloudflare.com/cloudflared $(lsb_release -cs) main" \
| sudo tee /etc/apt/sources.list.d/cloudflared.list
sudo apt update
sudo apt install cloudflared
npx localtunnel --port 8000
- Open Ports panel (View → Ports)
- Click "Forward a Port"
- Enter 3000 (or your port)
- Set visibility to "Public"
- Use the forwarded URL