How to access localhost:3000 from local machine

Posted July 9, 2019 41.2k views
ApplicationsUbuntu 18.04


I have a ruby app deployed on ubuntu droplet. The app is running on localhost:3000. How can I check from outside, like my local laptop to see the app is running properly?


These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer


Can you please run the following command and provide us with the output:

netstat -plant

I think that you might be just able to visit your.server.ip:3000

Let me know how it goes.


  • Here is the o/p:

    root@ubuntu-s-1vcpu-1gb-sfo2-01:/var/ netstat -plant
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name

    tcp 0 0* LISTEN 655/systemd-resolve
    tcp 0 0* LISTEN 991/sshd

    tcp 0 0* LISTEN 32442/postgres

    tcp 0 304 ESTABLISHED 13896/sshd: root@pt
    tcp6 0 0 :::22 :::* LISTEN 991/sshd

    • Good job with the output. Based on that information, I do not see an app running on port 3000, localhost or otherwise. If you look at the lines you do provide, you can see an example of a localhost only app and an app that is publicly accessible (firewall notwithstanding):

      Localhost only, postgres:
      tcp 0 0* LISTEN 32442/postgres

      The relevant info is the which is the localhost IP address.

      Publicly accessible, sshd, so you can connect:

      tcp 0 0* LISTEN 991/sshd

      The relevant info there is the IP address before the port :22, - that means it is listening on all interfaces on your droplet, local and public.

      Try starting your app and running that command again - we should see a line that has :3000 and ruby in it. If it is bound to that is localhost only.

      At that point you can either change your app config to bind to your public IP (or all interfaces) or, and this is a common solution, you run a proxy in front of the app like nginx.

      Let us know how it goes and good luck!