Access ERPNext outside the Virtualbox

Hi,
I have installed ERPNext on a Virtualbox but I have no idea how to access it outside the Virtualbox can anyone give me an idea about this?

Regards
Ruchin Sharma

If you vbox settings are on NAT then use: 127.0.0.0.1:8000 on browser or if its on Bridged network then you would need to enter the IP address of the machine followed by the port number.

Hi Aditya,

Thanks for your prompt reply, I tried to do it but it didn’t work.

Did you do a production install of bench or non-production install?

If setup was not production then did you do a bench start?

Actually I don’t remember as well, I think it was not production and every time when I try to access ERPNext in Virtualbox I need to do a bench start therefore I put that in Startup and now I can use my ERPNext within the virtualbox without doing a bench start.

If you’re using NAT adapter, then specify port forwarding e.g. 8080. On browser type your ip address:port e.g. 192.xx.xx:8080

@jof2jc I didn’t understand well, I am very new to this technology. I appreciate if you can elaborate.

Looks like NAT to me, in the network settings of the vm (https://discuss.frappe.io/uploads/default/original/2X/e/eba6a7102f140f8ae40722322f02ced43dfd78ee.png , the screenshot you posted), click port forwarding, and forward, guest port 80 to host port 8080

If inside the vm, you are able to access erpnext without running bench start, you’ve setup for production and that’s good.

@pdvyas
I tried it and after that I got this:

Try after

sudo bench setup production sam

But, what if I don’t required setup production?
Is it a mandate for running the ERPNext outside the virtualbox?

Hi Ruchin78
Did you make it work
Iam also trying to access erpnext from a different pc
I am using erpnext production version using vmbox running on windows 7
I would like to access this from a different pc also
if you have set this up, then please help me
thanks
hemanth

Hi Hemant,
No I didn’t get any solution for the same.

The easy way to do this is to.setup port forwarding in virtual box. By default the guess OS uses 192.168.56.1 as IP Address…

In port forwarding set port 80 to 8080 for.instance. other pc can.access guess OS with erpnext inside by typing host ip (your win 7) e.g. 192.168.1.4:8080

Hope this helps

1 Like

jof2jc
Thanks a lot
It worked like charm

What should i do if i need to access it from another office
Right now iam on lan using switch
I will be moving to a router that is net enabled

Thanks again
Hemanth

The same way…just publish your host pc using public ip or setup a vpn…

welcome … krishnanhemanth
i have same problem if u solved it plus tell me
thanx

welcome …jof2jc
plz can u show how to do that step by step

thanx

Hi All,

Basically, if you are running EPRNext from a VirtualBox and wish to connect to it, the simplest way to do so is:

  1. Go to Network settings in your VirtualBox Manager for the Virtual Device
  2. Select Bridged Adapter
  3. Select the type of connection you have, its either en1: Wi-Fi or en0: Ethernet
  4. Save your settings
  5. Start your Virtual Device
  6. After you are logged in check what is the IP of your Virtual Device is by typing the command ifconfig in the terminal of your device.
  7. Take the eth0 IP address and use that to access ERPNext from anywhere within your LAN network.

NOTES:

  1. If you installed ERPNext as development version you need to do a bench start.
  2. By default ERPNext running on the virtual device will use port 80 so there is no need to enter port number.
  3. If you wish to connect from outside your LAN network, you will need to map your Virtual Device’s IP to an external IP.

Hope this helps.

Regards
Said

2 Likes