Expose your local server (e.g., Django) publicly with LocalTunnel 🔗
python manage.py runserverlt --port 8000Get a URL like:
https://your-tunnel-name.loca.lt
Add your tunnel host to ALLOWED_HOSTS in settings.py:
ALLOWED_HOSTS = ['your-tunnel-name.loca.lt', 'localhost', '127.0.0.1']Important: You also need to add your tunnel URL to CSRF_TRUSTED_ORIGINS to avoid CSRF verification errors:
CSRF_TRUSTED_ORIGINS = [
'https://your-tunnel-name.loca.lt', # <--- Add your tunnel URL here
]Run on same machine:
curl https://loca.lt/mytunnelpasswordOr visit:
https://loca.lt/mytunnelpassword
This is your public IP and required to access the tunnel.
Share the URL + password only with trusted users. Visitors must enter the password to connect.