Skip to content

Instantly share code, notes, and snippets.

@justinmklam
Last active May 19, 2020 18:56
Show Gist options
  • Save justinmklam/456a212a5878b01184eefdf9b3a24639 to your computer and use it in GitHub Desktop.
Save justinmklam/456a212a5878b01184eefdf9b3a24639 to your computer and use it in GitHub Desktop.
Easily expose localhost to the public via http://serveo.net/
# Expose localhost at port 5000 to a random subdomain on serveo.net
ssh -R 80:localhost:5000 serveo.net
# Request a specific subdomain on serveo.net (ie. my-custom-app.serveo.net)
ssh -R my-custom-app:80:localhost:5000 serveo.net
# SSH session will close if no connections are made, so autossh will automatically reconnect and keep it persistent
sudo apt install autossh
autossh -M 0 -R my-custom-app:80:localhost:5000 serveo.net
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment