Using one of the Provided Cloud Instances
ssh config
You have to configure 51 port forwarding configurations in your SSH config to connect to cuttlefish's web-based UI.
You need to forward port 8443 and the port range 15550–15599 from your localhost to the VM. We have provided an example configuration for the OpenSSH SSH client.
Copy the following ssh config file into our ~/.ssh/config configuration (%USERPROFILE%\.ssh\config for Windows) or use a separate file with ssh -F:
# Forward https and webrtc ports for cuttlefish in the cloud. Match host="185.113.125.*" user ubuntu #LocalForward 5038 localhost:5037 # for adb LocalForward 8443 localhost:8443 LocalForward 15550 localhost:15550 LocalForward 15551 localhost:15551 LocalForward 15552 localhost:15552 LocalForward 15553 localhost:15553 LocalForward 15554 localhost:15554 LocalForward 15555 localhost:15555 LocalForward 15556 localhost:15556 LocalForward 15557 localhost:15557 LocalForward 15558 localhost:15558 LocalForward 15559 localhost:15559 LocalForward 15560 localhost:15560 LocalForward 15561 localhost:15561 LocalForward 15562 localhost:15562 LocalForward 15563 localhost:15563 LocalForward 15564 localhost:15564 LocalForward 15565 localhost:15565 LocalForward 15566 localhost:15566 LocalForward 15567 localhost:15567 LocalForward 15568 localhost:15568 LocalForward 15569 localhost:15569 LocalForward 15570 localhost:15570 LocalForward 15571 localhost:15571 LocalForward 15572 localhost:15572 LocalForward 15573 localhost:15573 LocalForward 15574 localhost:15574 LocalForward 15575 localhost:15575 LocalForward 15576 localhost:15576 LocalForward 15577 localhost:15577 LocalForward 15578 localhost:15578 LocalForward 15579 localhost:15579 LocalForward 15580 localhost:15580 LocalForward 15581 localhost:15581 LocalForward 15582 localhost:15582 LocalForward 15583 localhost:15583 LocalForward 15584 localhost:15584 LocalForward 15585 localhost:15585 LocalForward 15586 localhost:15586 LocalForward 15587 localhost:15587 LocalForward 15588 localhost:15588 LocalForward 15589 localhost:15589 LocalForward 15590 localhost:15590 LocalForward 15591 localhost:15591 LocalForward 15592 localhost:15592 LocalForward 15593 localhost:15593 LocalForward 15594 localhost:15594 LocalForward 15595 localhost:15595 LocalForward 15596 localhost:15596 LocalForward 15597 localhost:15597 LocalForward 15598 localhost:15598 LocalForward 15599 localhost:15599
After you added these port forward configurations into your local SSH config, you have to restart your SSH session.
Start the cuttlefish emulator
Tip
Remember to change to the android directory and to run . build/envsetup.sh and lunch aosp_cf_x86_64_auto-trunk_staging-userdebug if you are using a fresh SSH session.
Start the cuttlefish emulator with
launch_cvd --gpu_mode=guest_swiftshader \ --start_webrtc=true \ -report_anonymous_usage_stats=n \ --enable-sandbox=false \ --cpus=8 \ --display0=width=1920,height=1080,dpi=140
This will start the emulator and boot the OS.
Now, open a Chromium-based browser, e.g., Chrome, and go to the locally-hosted website https://localhost:8443. You should see the web UI of the cuttlefish emulator.
Note
You cannot use Firefox for the web UI of the emulator. The WebRTC connection will not work.
Note
When you start a second SSH connection to the VM, you may see the following errors:
bind [127.0.0.1]:15599: Address already in use channel_setup_fwd_listener_tcpip: cannot listen to port: 15599 Could not request local forwarding.
on the console. These can be ignored. They just indicate that the second SSH connection cannot set up the port-forward configurations, because the ports are already used by the first SSH connection.