Overview
One of the primary use cases for OpenCode Portal is mobile access. This guide will help you set up and optimize your experience when accessing OpenCode Portal from smartphones and tablets.OpenCode Portal was specifically designed with mobile-first responsiveness in mind, addressing limitations in the official OpenCode UI that is currently under development.
Why Mobile Access?
Mobile access to OpenCode Portal enables you to:- Continue working on code when you’re away from your laptop
- Review and respond to AI-generated code on the go
- Monitor long-running AI tasks from anywhere
- Quick bug fixes and emergency deployments from your phone
Architecture
The typical mobile access setup looks like this:- Security: Traffic is encrypted through VPN (no public exposure)
- Low latency: Direct VPN connection to your server
- Reliability: Server runs 24/7, always accessible
Setup Steps
Set Up VPN Access
Install and configure Tailscale (or your preferred VPN solution) on both your server and mobile device.See the Tailscale Setup Guide for detailed instructions.
Start Portal with Remote Access
Start Portal bound to all interfaces (0.0.0.0) so it’s accessible via VPN:The portal will be accessible at:
- From server:
http://localhost:3000 - From VPN:
http://[tailscale-ip]:3000 - With MagicDNS:
http://[machine-name]:3000
Mobile Browser Recommendations
iOS
Best Options:- Safari (recommended) - Best performance and PWA support
- Chrome - Good compatibility
- Firefox - Alternative option
- Open Portal in Safari
- Tap the Share button
- Select “Add to Home Screen”
- Portal will launch as a standalone app
Android
Best Options:- Chrome (recommended) - Best compatibility
- Firefox - Good alternative
- Samsung Internet - Good performance on Samsung devices
- Open Portal in Chrome
- Tap the three-dot menu
- Select “Add to Home screen”
- Portal will appear as an app icon
Mobile Usage Tips
Optimizing Chat Interface
Use landscape mode for coding
Use landscape mode for coding
When reviewing or editing code, rotate your device to landscape mode for a wider view. The Portal UI adapts to show more content horizontally.
File mentions on mobile
File mentions on mobile
To mention files in chat:
- Type
@to trigger file autocomplete - Use your keyboard to filter files
- Tap to select from the dropdown
Managing sessions efficiently
Managing sessions efficiently
- Use descriptive session names to identify them easily on small screens
- Delete old sessions regularly to keep the list manageable
- Switch between sessions using the session selector in the header
Performance Optimization
Network Considerations
- VPN connections can consume more battery - monitor your usage
- On cellular data, be mindful of data usage (especially when viewing large code files)
- For best performance, use WiFi when possible
Battery Management
- Keep Portal open in a browser tab rather than constantly reopening
- Use dark mode to reduce battery consumption on OLED screens
- Enable browser data saver modes on cellular connections
Security Best Practices
Recommended Security Measures:
- Use VPN Always: Route all traffic through Tailscale or similar VPN
- Keep Software Updated: Regularly update Portal, OpenCode, and system packages
- Use Strong Authentication: If your VPN supports MFA, enable it
- Monitor Access: Check Tailscale logs for unexpected connections
- Dedicated User: Run Portal under a non-root user with limited permissions
Running Portal Persistently
To keep Portal running even after you disconnect from SSH:Using Screen
Using tmux
Using systemd (Recommended)
Create a systemd service for automatic startup and management:Troubleshooting Mobile Access
Can't connect from mobile device
Can't connect from mobile device
Check these items:
- Is Tailscale connected on both devices? Check the VPN icon
- Is Portal running? SSH to server and check with
openportal list - Is Portal bound to 0.0.0.0? Check with
--hostname 0.0.0.0flag - Can you ping the server? Try
ping [server-name]in a terminal app - Is the port correct? Default is 3000 unless you specified otherwise
Portal is slow on mobile
Portal is slow on mobile
Performance tips:
- Check your VPN connection strength
- Ensure you’re on a stable WiFi or cellular connection
- Try clearing browser cache and reloading
- Check server resources:
htoportopon the VPS - Consider upgrading VPS resources if consistently slow
UI elements not responsive/clickable
UI elements not responsive/clickable
Try these fixes:
- Force refresh the page (pull down in Safari, or Ctrl+Shift+R in Chrome)
- Clear browser cache and cookies
- Try a different mobile browser
- Check if browser is up to date
- Disable browser extensions that might interfere
Next Steps
- Set up Tailscale VPN for secure remote access
- Manage multiple projects on the same server
- Troubleshooting guide for common issues