Skip to content

Proxy noVNC through bytebotd #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 15, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -103,7 +103,6 @@ More details in the [**Quickstart Guide**](https://docs.bytebot.ai/quickstart).
| 💬 Chat UI | `http://localhost:9992` | Agent UI |
| 🤖 Agent API | `http://localhost:9991` | REST API |
| 🌐 noVNC | `http://localhost:9990/vnc` | open in any browser |
| 🖥️ VNC Client | `localhost:5900` | password‑less by default |



13 changes: 2 additions & 11 deletions docs/core-concepts/desktop-environment.mdx
Original file line number Diff line number Diff line change
@@ -47,14 +47,6 @@ The desktop environment is configured with automation in mind:

## Remote Access

### VNC Server

The container runs a VNC server that allows direct access to the desktop:

- Accessible on port 5900 (default VNC port)
- Compatible with standard VNC clients (RealVNC, TightVNC, etc.)
- Supports standard VNC authentication

### noVNC

For browser-based access, noVNC is included:
@@ -76,10 +68,9 @@ Bytebot uses Xvfb (X Virtual Framebuffer) as its display server:

### Manual Interaction

You can directly interact with the desktop environment using:
You can interact with the desktop environment using your web browser:

1. **VNC client** connected to `localhost:5900`
2. **Web browser** navigated to `http://localhost:9990/vnc`
1. Navigate to `http://localhost:9990/vnc`

### Programmatic Interaction

9 changes: 1 addition & 8 deletions docs/quickstart.mdx
Original file line number Diff line number Diff line change
@@ -26,11 +26,8 @@ Getting started with Bytebot is simple and straightforward. You can run it as a
docker-compose -f infrastructure/docker/docker-compose.core.yml up -d --no-build # start container
```

This will start Bytebot with default settings. The container exposes several ports:
This will start Bytebot with default settings. The container exposes one port:
- `9990`: REST API and noVNC web access
- `5900`: VNC server
- `6080`: noVNC direct
- `6081`: noVNC HTTP proxy
</Accordion>

<Accordion icon="cube" title="Building the Docker Image (Alternative)">
@@ -52,10 +49,6 @@ Getting started with Bytebot is simple and straightforward. You can run it as a
<Accordion icon="display" title="Accessing the Desktop">
You can access the Bytebot desktop environment in two ways:

**Using a VNC Client**:
Connect to `localhost:5900` with any VNC client.

**Using a Web Browser**:
Navigate to `http://localhost:9990/vnc` in your web browser for noVNC access.
</Accordion>
</AccordionGroup>
7 changes: 2 additions & 5 deletions infrastructure/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -398,11 +398,8 @@ WORKDIR /home/bytebot
# -----------------------------------------------------------------------------
# 8. Port configuration and runtime
# -----------------------------------------------------------------------------
# - Port 9990: bytebotd
# - Port 5900: VNC display for the Ubuntu VM
# - Port 6080: noVNC client
# - Port 6081: noVNC HTTP proxy
EXPOSE 9990 5900 6080 6081
# - Port 9990: bytebotd and external noVNC websocket
EXPOSE 9990

# Start supervisor to manage all services
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf", "-n"]
5 changes: 1 addition & 4 deletions infrastructure/docker/docker-compose.core.yml
Original file line number Diff line number Diff line change
@@ -14,9 +14,6 @@ services:
hostname: computer
privileged: true
ports:
- "9990:9990" # bytebotd service
- "5900:5900" # VNC display
- "6080:6080" # noVNC client
- "6081:6081" # noVNC HTTP proxy
- "9990:9990" # bytebotd service & noVNC
environment:
- DISPLAY=:0
7 changes: 2 additions & 5 deletions infrastructure/docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -14,10 +14,7 @@ services:
hostname: computer
privileged: true
ports:
- "9990:9990" # bytebotd service
- "5900:5900" # VNC display
- "6080:6080" # noVNC client
- "6081:6081" # noVNC HTTP proxy
- "9990:9990" # bytebotd service & noVNC
environment:
- DISPLAY=:0
networks:
@@ -61,7 +58,7 @@ services:
dockerfile: bytebot-ui/Dockerfile
args:
- NEXT_PUBLIC_BYTEBOT_AGENT_BASE_URL=${BYTEBOT_AGENT_BASE_URL:-http://localhost:9991}
- NEXT_PUBLIC_BYTEBOT_DESKTOP_VNC_URL=${BYTEBOT_DESKTOP_VNC_URL:-ws://localhost:6080}
- NEXT_PUBLIC_BYTEBOT_DESKTOP_VNC_URL=${BYTEBOT_DESKTOP_VNC_URL:-ws://localhost:9990/websockify}
container_name: bytebot-ui
restart: unless-stopped
ports:
13 changes: 1 addition & 12 deletions infrastructure/docker/supervisord.conf
Original file line number Diff line number Diff line change
@@ -68,17 +68,6 @@ stdout_logfile_maxbytes=0
redirect_stderr=true
depends_on=x11vnc

[program:novnc-http]
command=python3 -m http.server 6081 --directory /opt/noVNC
autostart=true
autorestart=true
startsecs=5
priority=50
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
redirect_stderr=true
depends_on=websockify

[program:bytebotd]
command=node /bytebotd/dist/main.js
directory=/bytebotd
@@ -90,7 +79,7 @@ environment=DISPLAY=":0"
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
redirect_stderr=true
depends_on=novnc-http
depends_on=websockify

[eventlistener:startup]
command=echo "All services started successfully"
109 changes: 90 additions & 19 deletions packages/bytebotd/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions packages/bytebotd/package.json
Original file line number Diff line number Diff line change
@@ -31,10 +31,12 @@
"@nestjs/core": "^11.0.1",
"@nestjs/platform-express": "^11.1.2",
"@nestjs/platform-socket.io": "^11.1.2",
"@nestjs/serve-static": "^5.0.3",
"@nestjs/websockets": "^11.1.2",
"@nut-tree-fork/nut-js": "^4.2.6",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.2",
"http-proxy-middleware": "^3.0.5",
"reflect-metadata": "^0.2.2",
"rxjs": "^7.8.1",
"socket.io": "^4.8.1",
5 changes: 1 addition & 4 deletions packages/bytebotd/src/app.controller.ts
Original file line number Diff line number Diff line change
@@ -8,10 +8,7 @@ export class AppController {
// When a client makes a GET request to /vnc,
// this method will automatically redirect them to the noVNC URL.
@Get('vnc')
@Redirect(
'http://localhost:6081/vnc.html?host=localhost&port=6080&resize=scale',
302,
)
@Redirect('/novnc/vnc.html?path=websockify&resize=scale', 302)
redirectToVnc(): void {
// This method is intentionally left empty.
// The @Redirect decorator will automatically redirect the client.
Loading
Oops, something went wrong.