Prerequisites
Before you begin, make sure you have the following installed:Quick start with bunx
The fastest way to run Portal is usingbunx - no installation required.
Navigate to your project
Open your terminal and navigate to the project directory where you want to use OpenCode.
Run Portal
Start Portal with a single command:This will:
- Start the OpenCode server (default port: 4000)
- Start the Portal web UI (default port: 3000)
- Automatically find available ports if defaults are busy
- Open your browser to
http://localhost:3000
The first run may take a moment as Bun downloads and caches the Portal package.
Select your instance
When Portal loads, you’ll see the instance selector. Click on your running instance to connect.If you see “No instances found”, make sure OpenCode started successfully. Check the terminal output for errors.
Create your first session
Once connected:
- Click the + button in the sidebar to create a new session
- Type your message in the chat input (e.g., “Show me the project structure”)
- Press Send or hit Enter
- Watch as OpenCode responds with AI-powered assistance
@ - just type @ followed by a filename and select from the autocomplete popup.Installation (global)
For regular use, install Portal globally:CLI commands
Portal includes several commands for managing instances:Start OpenCode + Portal
Start only OpenCode server
List running instances
Stop instances
Clean up stale entries
CLI options
Customize Portal’s behavior with command-line options:| Option | Description | Default |
|---|---|---|
-h, --help | Show help message | - |
-d, --directory <path> | Working directory | Current directory |
-p, --port <port> | Portal web UI port | 3000 (auto-finds if busy) |
--opencode-port <port> | OpenCode server port | 4000 (auto-finds if busy) |
--hostname <host> | Hostname to bind | 0.0.0.0 |
--name <name> | Instance name | Directory name |
--docker | Run OpenCode in Docker | false |
Examples
Docker mode
Run OpenCode in a Docker container for isolated environments:- Pull the OpenCode Docker image (if not cached)
- Mount your project directory into the container
- Start OpenCode inside the container
- Connect Portal to the containerized instance
Using Portal features
Chatting with OpenCode
The chat interface supports rich interactions:- Text messages: Ask questions, request code changes, or give instructions
- File mentions: Use
@filenameto reference files (autocomplete available) - Multi-line input: Shift+Enter for new lines, Enter to send
- Tool visibility: See when OpenCode reads, writes, or edits files
Viewing git diffs
Click the Diff icon in the sidebar to see all uncommitted changes:- Unified diff view with syntax highlighting
- File-by-file breakdown
- Line-level additions and deletions
- Refresh button to update changes
Switching models
Click the model selector in the chat header to choose from available AI models. Portal displays all configured providers and their models.Managing instances
Click the instance name in the sidebar to view and switch between running instances. Each instance shows:- Project name and directory
- Port number
- Running status indicator
Troubleshooting
Port already in use
Portal automatically finds available ports if defaults are busy. To manually specify:“No instances found”
This means the OpenCode server didn’t start. Check:- OpenCode is installed:
opencode --version - No permission errors in terminal output
- The directory is accessible and not restricted
Connection errors
If Portal can’t connect to OpenCode:- Verify OpenCode is running:
openportal list - Check firewall settings aren’t blocking ports
- Try restarting:
openportal stopthenopenportal
Bun vs Node.js issues
Portal is optimized for Bun. If using Node.js, you may encounter:- Slower startup times
- Module resolution issues
- Missing dependencies
Next steps
Session management
Learn how to create, organize, and delete sessions
Remote access
Set up secure remote access via Tailscale or VPN
Configuration
Customize Portal settings and preferences
Deployment
Deploy Portal to a VPS for always-on access