Connecting to the neos flow server running on a virtual machine guest server from the virtual machine host system

I had some problems connecting from the browser to the flow server, so I thought it would be worth the while to share my learnings :wink:

I have the flow server on a Ubuntu Server guest system in a (VirtualBox) Virtual Machine on a Windows host system. That means I do not use a browser directly on the server running neos flow, but need to connect from the outer host system.

Just following the simple setup and neos skeleton instructions (https://github.com/code-q-web-factory/Neos-Skeleton/blob/master/docs/GETTING_STARTED.md#steps-to-get-started) I was not able to connect from the browser to the neos flow server.

Two steps were missing in my case…

First I had to open up the firewall on the server to allow the neos flow server port by

sudo ufw allow 8081/tcp
sudo ufw reload

and second I had to start the flow server with explicit server parameters since the default 127.0.0.1 is only locally accessible on the server itself:

./flow server:run --host 0.0.0.0 --port 8081

With the IP 0.0.0.0 the flow server listens to incoming traffic on port 8081 from internal and external IPs (in contrast to only the internal 127.0.0.1).

After that I was able to call the setup in the browser of the Windows host system with http://127.0.0.1:50081/setup (if the VM network is in NAT mode with port forwarding 50081 → 8081) or http://192.168.1.123:8081/setup (if the VM network is in bridged mode using the current IP of the ubuntu VM client system).

This info would be a helpful addition to the simple setup and neos skeleton instructions :wink:

This configuration is necessary only in the context of hosting not locally but on a separate machine … a VM in your case, so the additional instructions would make more sense in the readme of the Ubuntu+Flow image.

If that doesn’t exist yet, I’d like to encourage you to create and publish it on GitHub. :slight_smile:

Tipp: if you add the entry
192.168.1.123 your-flow-app-domain
to the hosts file, you’ll be able to register that domain in the flow app / a vhost and also use it in the browser, instead of the IP.