The other answer is correct in a way, though I tried to answer it in a much simpler way since I spent a lot of time debugging issues with getting the same URL for the Local Tunnel.
Suppose, I want my URL should be something like this:
https://olive-walls-cough-103-181-222-27.loca.lt
You just need to hit the below command:
lt --subdomain olive-walls-cough-103-181-222-27 --port 3000
Now here the order of flags doesn't matter.
I Have attached the image below with the same thing working!
Note: Before hitting this command make sure you have installed the localtunnel
globally.
Refer here for more details: https://theboroer.github.io/localtunnel-www/