Use Cases
Virtual Computing
Linux Virtual Desktop
22min
This guide will help you set up and use a Linux Virtual Desktop environment on Vast.ai using the Ubuntu Desktop (VM) template.
- A Vast.ai account
- In the search bar at the top, type "Ubuntu Desktop (VM)" to find the template. Make sure you're searching across all templates and not only recommended templates.
- Select the template by clicking the play button
- Choose your preferred GPU from the search results. Try to find a GPU close to you if possible
- Click "Rent" to create your instance
- Go to Instances tab and wait for the blue button on the instance card to say "Open". It can take a good amount of time to load if the docker image isn't cached on the machine.
After launching your instance, you have several ways to connect:
- Browser Access (Recommended)
- Click the 'Open' button on your instance card to launch the Instance Portal
- Choose between two browser-based viewers:
- Selkies WebRTC: More responsive, better performance
- NoVNC: Alternative option if WebRTC isn't working well
- VNC Client
- Connect using any VNC client
- Address: instance_ip:5900
- Password: Your OPEN_BUTTON_TOKEN
- SSH Access
- Connect via SSH using the command provided in the Vast.ai console
- For non-root access:

- Change the default password by executing the following command in Linux terminal and go along with rest of the prompts:

- Configure TLS (Optional):
- This eliminates certificate warnings in your browser
The environment comes with several applications ready to use:
- Web Browsers
- Firefox
- Chrome
- Development Tools
- Docker (pre-configured for non-root use)
- Terminal emulator
- Common development utilities
- Creative Software
- Blender (3D creation suite)
- Wine (Windows application compatibility layer)
- Gaming Support
- Steam (with Proton compatibility for Windows games)
- Sunshine streaming server
- Access via port 6100
- Best performance for most users
- Hardware-accelerated graphics
- Audio support
- Access via port 6200
- Backup option if WebRTC isn't working
- More compatible with different browsers
- Traditional VNC connection
- Use your preferred VNC client
- Port: 5900
- On the instance, run:


Follow rest of the prompts to connect to your tailnet.
- Set up Tailscale (required)
- Configure the pre-installed Sunshine server
- Connect using the Moonlight client on your local device
- Manage via the Instance Portal
- Perfect for temporary application sharing
The following ports are exposed by default:
- 22: SSH
- 1111: Instance Portal
- 3478: TURN Server
- 5900: VNC Server
- 6100: Selkies WebRTC
- 6200: NoVNC
- 741641: Tailscale
Consider:
- Using Tailscale for secure access
- Creating Cloudflare tunnels for HTTP access
- Closing unnecessary ports
- Instance Portal
- username: vastai
- password: Your OPEN_BUTTON_TOKEN
- Change the default user password immediately
- Use SSH keys for remote access
- Connection Issues
- Try different connection methods (WebRTC, NoVNC, VNC)
- Check if ports are accessible
- Verify your authentication credentials
- Performance Problems
- Ensure you're using hardware acceleration
- Try WebRTC for better performance
- Check your internet connection quality
- Application Problems
- Check system logs: /var/log/portal/
- Restart Caddy if needed: systemctl restart caddy
- Verify application configurations in /etc/portal.yaml
- Security
- Change default passwords immediately
- Use Tailscale or Cloudflare tunnels when possible
- Keep unnecessary ports closed
- Performance
- Use WebRTC for best desktop performance
- Enable hardware acceleration when available
- Close unused applications
- Data Management
- Keep important data backed up
- Use version control for development
- Monitor instance storage usage

Updated 21 Jan 2025
Did this page help you?