Web Environment

Port forwarding

When developing web apps, testing across multiple devices is vital to ensure that what you’re building will work for you users. Chrome OS’s built-in port forwarding allows you to open the port to your local development server, allowing access from phones or other computers.

Start by going to the Linux (Beta) settings on Chrome OS and clicking the Linux box. There should be an option Port forwarding. Click on that.

Linux settings page.

This will open up the Port forwarding screen. When you set up ports to be forwarded, they’ll show up here. Click the Add button to forward a port.

Empty port forwarding settings page.

When forwarding a port, you have three options: the port number to forward, the connection type, either TCP(default) or UDP, and if you want to label the port.

Configuring port forwarding to forward port 3000 using TCP with a label "Server".

Once added, your ports will show up in the Port forwarding list, where you can toggle them on or off or remove them entirely.

Port forwarding settings page with a configured port of 3000 using TCP labeled "Server".

The last thing you’ll need is the IP address of your host Chrome OS device. In “Settings”, go to “Network” and select the network your device is on. You’ll be able to see the IP address here. This IP address, combined with the port you forwarded, will allow any device on the same network to connect to the server on that port. On your other device, you can access the server at this address: <host device IP address>:<port>.