Skip to main content

Getting Help

Before diving into troubleshooting, here are the best ways to get help:

Discord Community

Join the community for real-time help and discussions

GitHub Issues

Report bugs and request features

Quick Diagnostics

Run these commands to quickly diagnose common issues:
# Check if Portal is running
openportal list

# Check if OpenCode is installed
which opencode

# Check Bun version (recommended: latest)
bun --version

# Check available ports
lsof -i :3000
lsof -i :4000

# Check system resources
free -h
df -h

Installation Issues

Symptom: Shell can’t find the openportal commandSolutions:
  1. Verify installation:
    bun pm ls -g | grep openportal
    
  2. Reinstall globally:
    bun install -g openportal
    
  3. Check Bun global bin path:
    echo $PATH | grep .bun
    
    If not present, add to your shell profile:
    # For bash (~/.bashrc)
    export PATH="$HOME/.bun/bin:$PATH"
    
    # For zsh (~/.zshrc)
    export PATH="$HOME/.bun/bin:$PATH"
    
    # Reload shell
    source ~/.bashrc  # or ~/.zshrc
    
  4. Use bunx instead:
    bunx openportal
    
Symptom: Portal can’t find OpenCode installationSolution: Install OpenCode:
# Using Bun
bun install -g opencode

# Or using Homebrew (macOS)
brew install sst/tap/opencode

# Verify installation
which opencode
opencode --version
Symptom: EACCES or permission denied errors during installSolutions:
  1. Don’t use sudo with Bun:
    # Wrong
    sudo bun install -g openportal
    
    # Correct
    bun install -g openportal
    
  2. Fix Bun permissions:
    chown -R $USER ~/.bun
    
  3. Reinstall Bun:
    curl -fsSL https://bun.sh/install | bash
    
Symptom: Errors when running with Node.js instead of BunSolution:
OpenPortal works best with Bun. Node.js may have rough edges.
Install and use Bun:
curl -fsSL https://bun.sh/install | bash
bun install -g openportal
If you must use Node.js:
npm install -g openportal
# May encounter issues - Bun is recommended

Startup Issues

Symptom: Error message about port 3000 or 4000 being busySolutions:
  1. Let Portal auto-find ports:
    openportal
    # Will automatically use 3001, 3002, etc. if 3000 is busy
    
  2. Specify different ports:
    openportal --port 3010 --opencode-port 4010
    
  3. Find what’s using the port:
    lsof -i :3000
    # Kill the process if safe
    kill <PID>
    
  4. Stop existing Portal instances:
    openportal stop --all
    
Symptom: Web UI loads but can’t connect to OpenCode serverDebug steps:
  1. Check if OpenCode port is accessible:
    curl http://localhost:4000
    
  2. Try starting OpenCode manually:
    opencode --port 4000
    
    Look for error messages in the output.
  3. Check OpenCode logs:
    ls ~/.config/opencode/logs/
    tail -f ~/.config/opencode/logs/latest.log
    
  4. Verify working directory exists:
    pwd
    ls -la
    
  5. Check disk space:
    df -h .
    
Symptom: Browser shows empty white page or loading foreverSolutions:
  1. Hard refresh the page:
    • Chrome/Firefox: Ctrl+Shift+R (Cmd+Shift+R on Mac)
    • Safari: Cmd+Option+R
  2. Clear browser cache:
    • Chrome: Settings > Privacy > Clear browsing data
    • Firefox: Preferences > Privacy > Clear Data
    • Safari: Preferences > Privacy > Manage Website Data
  3. Check browser console for errors:
    • Open DevTools: F12 or Ctrl+Shift+I
    • Look for errors in Console tab
  4. Try different browser:
    # Test in another browser to isolate issue
    
  5. Check if server is actually responding:
    curl http://localhost:3000
    # Should return HTML
    
Symptom: Portal works on localhost but not from other devicesSolutions:
  1. Bind to all interfaces:
    openportal --hostname 0.0.0.0
    
  2. Check firewall rules:
    # Ubuntu/Debian
    sudo ufw status
    sudo ufw allow 3000/tcp
    
    # CentOS/RHEL
    sudo firewall-cmd --list-ports
    sudo firewall-cmd --permanent --add-port=3000/tcp
    sudo firewall-cmd --reload
    
  3. Verify Portal is listening on 0.0.0.0:
    netstat -tlnp | grep 3000
    # Should show 0.0.0.0:3000, not 127.0.0.1:3000
    
  4. Test connectivity:
    # From another machine
    ping your-server-ip
    curl http://your-server-ip:3000
    

Connection Issues

Symptom: “Connection lost” or “Reconnecting…” messagesSolutions:
  1. Check if OpenCode server is running:
    openportal list
    ps aux | grep opencode
    
  2. Restart Portal:
    openportal stop
    openportal
    
  3. Check server logs:
    tail -f ~/.config/opencode/logs/latest.log
    
  4. Verify network connectivity:
    curl http://localhost:4000
    
  5. Check for resource issues:
    top
    free -h
    
Symptom: Portal feels sluggish, AI responses take very longDebug steps:
  1. Check system resources:
    htop
    # Look for high CPU or memory usage
    
  2. Check disk I/O:
    iostat -x 1
    
  3. Verify network latency (for remote access):
    ping your-server
    traceroute your-server
    
  4. Check OpenCode model settings:
    • Larger models (GPT-4, Claude Opus) are slower
    • Try a faster model for testing
  5. Restart with clean state:
    openportal stop
    openportal clean
    openportal
    
Symptom: Real-time updates not working, need to refresh manuallySolutions:
  1. Check for reverse proxy issues: If using Nginx, ensure WebSocket headers are configured:
    location / {
        proxy_pass http://localhost:3000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }
    
  2. Check firewall doesn’t block WebSockets:
    # Test WebSocket connection
    wscat -c ws://localhost:3000
    
  3. Browser extensions interfering:
    • Try in incognito/private mode
    • Disable ad blockers and privacy extensions

Session Issues

Symptom: Create session button doesn’t work or errors outSolutions:
  1. Check OpenCode server is accessible:
    curl http://localhost:4000/sessions
    
  2. Verify permissions on OpenCode config directory:
    ls -la ~/.config/opencode/
    chmod -R u+rw ~/.config/opencode/
    
  3. Check disk space:
    df -h ~
    
  4. Try creating session via OpenCode CLI:
    opencode
    # If this works, issue is with Portal
    # If this fails, issue is with OpenCode
    
Symptom: Created sessions but they don’t appear in the listDebug:
  1. Check OpenCode sessions directory:
    ls ~/.config/opencode/sessions/
    
  2. Verify API is returning sessions:
    curl http://localhost:4000/sessions
    
  3. Refresh the browser:
    • F5 or Ctrl+R
  4. Check browser console for errors:
    • F12 > Console tab
Symptom: Delete button doesn’t work or session reappearsSolutions:
  1. Check file permissions:
    ls -la ~/.config/opencode/sessions/
    chmod -R u+rw ~/.config/opencode/sessions/
    
  2. Delete manually:
    rm -rf ~/.config/opencode/sessions/<session-id>
    
  3. Verify not open in another instance:
    • Close all OpenCode instances
    • Try deleting again
Symptom: Open a session but messages don’t appearSolutions:
  1. Check session file exists:
    ls ~/.config/opencode/sessions/<session-id>/
    cat ~/.config/opencode/sessions/<session-id>/session.json
    
  2. Verify JSON is valid:
    cat ~/.config/opencode/sessions/<session-id>/session.json | jq
    # If jq fails, JSON is corrupted
    
  3. Check browser console:
    • F12 > Console > Look for parsing errors
  4. Try opening in official OpenCode CLI:
    opencode --resume <session-id>
    

Mobile-Specific Issues

Symptom: Portal works on server but not accessible from phoneSolutions:
  1. Verify Tailscale is connected on both devices:
    # On server
    tailscale status
    
    # On mobile: Check Tailscale app shows "Connected"
    
  2. Verify Portal bound to 0.0.0.0:
    netstat -tlnp | grep 3000
    # Should show 0.0.0.0:3000
    
  3. Test connectivity:
    # On mobile (using terminal app)
    ping server-name
    curl http://server-name:3000
    
  4. Try IP address instead of hostname:
    # On server, get Tailscale IP
    tailscale ip -4
    
    # On mobile, use IP directly
    http://100.x.x.x:3000
    
See Tailscale Setup Guide for detailed troubleshooting.
Symptom: UI elements too small or not clickable on mobileSolutions:
  1. Hard refresh the page:
    • Safari: Pull down to refresh
    • Chrome: Menu > Reload
  2. Clear mobile browser cache:
    • Safari: Settings > Safari > Clear History and Website Data
    • Chrome: Settings > Privacy > Clear browsing data
  3. Try different mobile browser:
    • iOS: Safari, Chrome, Firefox
    • Android: Chrome, Firefox, Samsung Internet
  4. Check if Desktop mode is enabled:
    • Disable “Request Desktop Site”
  5. Report UI issue with screenshots:
Symptom: Connection drops when switching apps or locking screeniOS Solutions:
  • Settings > Tailscale > Allow unlimited background activity
  • Disable Low Power Mode while using Portal
  • Keep Portal tab active (don’t close)
Android Solutions:
  • Settings > Apps > Tailscale > Battery > Unrestricted
  • Settings > Apps > Browser > Battery > Unrestricted
  • Enable “Always-on VPN” in Tailscale settings

Performance Issues

Symptom: Portal or OpenCode consuming excessive RAMSolutions:
  1. Check actual memory usage:
    ps aux | grep opencode
    ps aux | grep openportal
    
  2. Limit resources with systemd:
    # In service file
    [Service]
    MemoryLimit=512M
    
  3. Delete old sessions:
    # Clean up old sessions manually
    ls ~/.config/opencode/sessions/
    
  4. Restart Portal regularly:
    openportal stop
    openportal
    
  5. Use lighter AI model:
    • Switch from Claude Opus to Sonnet
    • Use GPT-3.5 instead of GPT-4
Symptom: Server CPU constantly high even when idleDebug:
  1. Identify CPU-hungry process:
    top
    # Press 'P' to sort by CPU
    
  2. Check for infinite loops in code:
    • Review recent changes
    • Check OpenCode logs for errors
  3. Verify no stuck sessions:
    openportal list
    # Stop stuck instances
    openportal stop --all
    
  4. Check for disk I/O bottleneck:
    iostat -x 1
    
Symptom: AI takes very long to respond or times outFactors:
  1. Model speed varies:
    • GPT-4, Claude Opus: Slowest but best quality
    • GPT-4 Turbo, Claude Sonnet: Balanced
    • GPT-3.5: Fastest but lower quality
  2. API rate limits:
    • Check your OpenAI/Anthropic account for rate limits
    • Upgrade API tier if needed
  3. Network latency:
    # Test API connectivity
    curl -I https://api.openai.com
    curl -I https://api.anthropic.com
    
  4. Large context:
    • Large codebases take longer to process
    • Mention fewer files to reduce context
  5. Check OpenCode logs:
    tail -f ~/.config/opencode/logs/latest.log
    

File Operations

Symptom: File autocomplete doesn’t work or files not foundSolutions:
  1. Verify you’re in correct directory:
    pwd
    ls
    
  2. Check file permissions:
    ls -la
    # Files should be readable
    
  3. Relative vs absolute paths:
    • Use relative paths: @src/index.ts
    • Not absolute: ~/project/src/index.ts
  4. File indexing:
    • OpenCode indexes files on start
    • Restart if new files not appearing
Symptom: Portal hangs when mentioning large filesWorkarounds:
  1. Check file size:
    ls -lh path/to/file
    
  2. Avoid mentioning very large files:
    • Binary files
    • Generated files (build output, node_modules)
    • Database dumps
  3. Use .gitignore patterns:
    • OpenCode respects .gitignore
    • Add large files to .gitignore
  4. Mention specific sections: Instead of mentioning entire file, describe the section: “The login function in @auth.ts around line 50”

Data and Configuration

To start fresh:
# Stop all instances
openportal stop --all

# Clean registry
openportal clean

# Remove Portal config (if exists)
rm -rf ~/.config/openportal/

# Remove OpenCode sessions (WARNING: deletes all sessions)
rm -rf ~/.config/opencode/sessions/

# Reinstall Portal
bun install -g openportal

# Start fresh
openportal
Portal stores data in:
  • Registry: ~/.config/openportal/registry.json
  • Logs: System logs (check with journalctl if using systemd)
OpenCode stores data in:
  • Sessions: ~/.config/opencode/sessions/
  • Config: ~/.config/opencode/config.json
  • Logs: ~/.config/opencode/logs/
Backup important data:
tar -czf opencode-backup.tar.gz ~/.config/opencode/sessions/
Migration steps:
  1. On old server, backup sessions:
    tar -czf sessions-backup.tar.gz ~/.config/opencode/sessions/
    scp sessions-backup.tar.gz new-server:
    
  2. On new server, install everything:
    # Install Bun
    curl -fsSL https://bun.sh/install | bash
    
    # Install OpenCode
    bun install -g opencode
    
    # Install Portal
    bun install -g openportal
    
  3. Restore sessions:
    mkdir -p ~/.config/opencode
    tar -xzf sessions-backup.tar.gz -C ~/
    
  4. Set up Tailscale: See Tailscale Setup Guide
  5. Start Portal:
    cd /path/to/project
    openportal --hostname 0.0.0.0
    

Error Messages

Meaning: The port is already occupied by another processFix:
# Find what's using the port
lsof -i :3000

# Kill the process or use different port
openportal --port 3010
Meaning: Can’t connect to OpenCode serverFix:
# Check if OpenCode is running
ps aux | grep opencode

# Restart Portal
openportal stop
openportal
Meaning: Disk is fullFix:
# Check disk usage
df -h

# Find large files
du -h --max-depth=1 ~ | sort -hr | head -20

# Clean up old sessions
rm -rf ~/.config/opencode/sessions/old-session-id

# Clean package caches
bun pm cache rm
npm cache clean --force
Meaning: Network request took too longFix:
# Check network connectivity
ping 8.8.8.8

# Test API endpoints
curl https://api.openai.com

# Restart network/VPN
# For Tailscale:
sudo systemctl restart tailscaled

Still Having Issues?

Ask on Discord

Get help from the community in real-time

Open GitHub Issue

Report bugs or request features
When asking for help, please include:
  1. Operating system and version
  2. Bun version: bun --version
  3. OpenCode version: opencode --version
  4. Portal version: openportal --version (if available)
  5. Full error message or logs
  6. Steps to reproduce the issue
  7. What you’ve already tried
Gather diagnostic information:
# System info
uname -a
bun --version
opencode --version

# Portal status
openportal list

# Check logs
tail -50 ~/.config/opencode/logs/latest.log

# Network info
netstat -tlnp | grep -E '3000|4000'

# Resource usage
top -b -n 1 | head -20
free -h
df -h

Next Steps

Build docs developers (and LLMs) love