Updated: 23 February 2024

For a working web application listening on http://localhost:8080

ngrok http http://localhost:8080

For a MySQL server published to port 3307

ngrok tcp 3307

Locate the ngrok config file

$ ngrok config check
Valid configuration file at ~/snap/ngrok/133/.config/ngrok/ngrok.yml

Configure two tunnels to start from the same agent. Start both with ngrok start client_demo and ngrok start client_demo_mysql

    proto: http
    addr: 80
    inspect: true
    proto: tcp
    addr: 3307
    inspect: false

Check a ngrok tcp tunnel

telnet 16456

Connect to MySQL database made available through ngrok tunnel

mysql -h -P 16020 -u username -puser_pass db_name

Leave a comment