VNC-Browser is a ready to use, minimal, customizable docker image designed to provide a lightweight and secure environment for browsing the web via VNC.
GPL-3.0 License
A Lightweight, Ready-to-Use Web Browsing Environment in Docker with VNC Access
Leave a star ⭐ if you like this project 🙂 thank you.
VNC-Browser is a minimal, customizable, Linux-based Docker image designed to provide a lightweight environment for browsing the web via VNC. This Docker image encapsulates a lightweight, VNC-accessible web browsing environment built on top of Debian and Alpine Linux. It packages a VNC server, noVNC for browser-based VNC access, and the Chromium and Firefox web browsers, providing a compact solution for remotely browsing the web. Whether you're looking to browse securely or need a browsing environment within a containerized setup, VNC-Browser has you covered.
Key Features ✨
mrcolorrain/vnc-browser:alpine
(with Firefox browser)mrcolorrain/vnc-browser:debian
(with Chromium browser)You can run it easily using its default or by passing the appropriate environment variables.
docker run -d -p 5900:5900 -p 6080:6080 --name vnc-browser -e VNC_PASSWORD="mypassword" mrcolorrain/vnc-browser:debian
version: "3.9"
services:
vnc-browser:
container_name: vnc-browser
image: mrcolorrain/vnc-browser:debian
ports:
- "5900:5900"
- "6080:6080"
environment:
VNC_PASSWORD: "mypassword"
restart: unless-stopped
After starting it then you can connect by:
localhost:6080
or from everywhere if properly configured using HOSTIP:6080
localhost:5900
or from everywhere if properly configured using HOSTIP:5900
You can customize the settings of the Docker container by passing environment variables during the Docker run command. All the current settings will be printed in the container logs. Here are some examples:
STARTING_WEBSITE_URL="https://www.google.com"
VNC_PASSWORD="mypassword"
VNC_RESOLUTION="1280x720"
AUTO_START_BROWSER=true
or AUTO_START_BROWSER=false
AUTO_START_XTERM=true
or AUTO_START_XTERM=false
VNC_SCREEN
(default: 0
): Screen number for VNC.
VNC_DISPLAY
(default: 0
): Display number for VNC.
VNC_RESOLUTION
(default: 1280x720
): Resolution of the VNC display.
VNC_PASSWORD
(default: money4band
): Password for VNC access.
VNC_PORT
(default: 5900
): Port for VNC connections.
NOVNC_WEBSOCKIFY_PORT
(default: 6080
): Port for noVNC web access.
STARTING_WEBSITE_URL
(default: https://www.google.com
): Initial website URL opened in the browser if auto startup is true.
LANG
(default: en_US.UTF-8
): Language setting for the container.
LC_ALL
(default: C.UTF-8
): Locale setting for the container.
CUSTOMIZE
(default: false
): Toggle for running custom scripts.
AUTO_START_BROWSER
(default: true
): Automatically start the browser.
AUTO_START_XTERM
(default: true
): Automatically start xterm.
CUSTOM_ENTRYPOINTS_DIR
(default: /app/custom_entrypoints_scripts
): Directory for custom entry point scripts.
DEBIAN_FRONTEND
(default: noninteractive
): Frontend setting for Debian-based installations.
Example:
docker run -d -p 5900:5900 -p 6080:6080 -e STARTING_WEBSITE_URL="https://www.bing.com" -e VNC_PASSWORD="mypassword" -e VNC_RESOLUTION="1920x1080" -e AUTO_START_BROWSER=true -e AUTO_START_XTERM=true mrcolorrain/vnc-browser:alpine
This image allows you to add custom scripts that will be executed when the container starts, provided customization is enabled.
docker run -d -p 5900:5900 -p 6080:6080 -v /path/to/your/scripts:/app/custom_entrypoints_scripts -e CUSTOMIZE=true mrcolorrain/vnc-browser:debian
CUSTOMIZE=true
to enable custom scripts execution.
This project and its artifacts are provided "as is" and without warranty of any kind. The author makes no warranties, express or implied, that this script is free of errors, defects, or suitable for any particular purpose. The author shall not be retained liable for any damages suffered by any user of this script, whether direct, indirect, incidental, consequential, or special, arising from the use of or inability to use this script or its documentation, even if the author has been advised of the possibility of such damages.