Skip to content

Manage multiple VNC connections to different auto discovered Docker containers

Notifications You must be signed in to change notification settings

PixNyb/vnc-viewer

Repository files navigation

VNC Viewer

Build and Publish Docker Image

This is a Dockerised vnc viewer application that can be used to easily connect to and create an overview of multiple containers running VNC servers. (e.g. pixnyb/dockerised-vscode). It is based on Next.JS and noVNC and automatically translates WebSocket connections to TCP socket connections.

Usage

Build the Docker image

docker build -t vnc-viewer .

Run the Docker container

docker run -d -p 3000:3000 \
    -v /var/run/docker.sock:/var/run/docker.sock \
    pixnyb/vnc-viewer

Warning

The container in itself doesn't have any security measures implemented. It is recommended to run the container in a secure environment. (e.g. behind traefik with authentication middleware such as pixnyb/authentication-proxy)

Environment variables

The following environment variables can be set to configure the application:

Variable Description Default
NEXT_PUBLIC_DISABLE_CREDITS Whether the credits should be disabled or not false

Connecting to a VNC server

The application is capable of discovering VNC servers running in other containers. To enable this feature, you need to add the following labels to the container running the VNC server:

labels:
  - "vnc-viewer.enable=true"
  - "vnc-viewer.label=My VNC Server" # Optional
  - "vnc-viewer.port=5900" # Optional, defaults to 5900

Note

The containers must both exist in the same network. Otherwise no connection to the VNC server can be established.

Note

The container offers Docker Swarm support. When running in a Docker Swarm, make sure to constrain the service to manager nodes only. Otherwise, the application won't be able to discover the VNC servers.

deploy:
 placement:
   constraints:
     - node.role == manager

Note

When authentication is necessary to connect to a vnc server, a login form will be displayed. Not all vnc servers accept a username, so the username field is optional.

Warning

The application doesn't currently check if a socket should be connected to. The WebSocket connection can be used to connect to any host and port, this makes the application vulnerable to attacks. It is recommended to run the application in a secure environment with an isolated network.

Connecting to a VNC server manually

This feature currently isn't implemented. The container is designed to be used as an interface for managing other containers running VNC servers.

Contributing

Contributions are welcome, please read the CONTRIBUTING.md file for more information.

About

Manage multiple VNC connections to different auto discovered Docker containers

Topics

Resources

Stars

Watchers

Forks

Sponsor this project