{"id":20156500,"url":"https://github.com/soneji/docker-chromium","last_synced_at":"2026-02-12T07:36:28.646Z","repository":{"id":41444274,"uuid":"265011647","full_name":"Soneji/docker-chromium","owner":"Soneji","description":"Docker container with Chromium desktop and a Web VNC client allowing you to run Chromium on any server you have","archived":false,"fork":false,"pushed_at":"2022-09-18T00:06:33.000Z","size":150,"stargazers_count":111,"open_issues_count":9,"forks_count":30,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T22:29:34.452Z","etag":null,"topics":["chromium","docker","docker-compose","docker-container","docker-image","dockerfile","remote","remote-desktop","vnc","vnc-docker"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Soneji.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-18T17:27:11.000Z","updated_at":"2025-04-02T16:03:44.000Z","dependencies_parsed_at":"2023-01-18T11:00:19.277Z","dependency_job_id":null,"html_url":"https://github.com/Soneji/docker-chromium","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Soneji/docker-chromium","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Soneji%2Fdocker-chromium","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Soneji%2Fdocker-chromium/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Soneji%2Fdocker-chromium/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Soneji%2Fdocker-chromium/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Soneji","download_url":"https://codeload.github.com/Soneji/docker-chromium/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Soneji%2Fdocker-chromium/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29361609,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T01:03:07.613Z","status":"online","status_checked_at":"2026-02-12T02:00:06.911Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chromium","docker","docker-compose","docker-container","docker-image","dockerfile","remote","remote-desktop","vnc","vnc-docker"],"created_at":"2024-11-13T23:38:59.744Z","updated_at":"2026-02-12T07:36:28.625Z","avatar_url":"https://github.com/Soneji.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker container for Chromium\n\n\u003cimg src=\"https://repository-images.githubusercontent.com/265011647/d609fa80-bad5-11ea-8898-a68379ea5d9f\"\u003e\n\nThis is a Docker container for Chromium.\n\nThe GUI of the application is accessed through a modern web browser (no installation or configuration needed on client side) or via any VNC client.\n\n---\n\nBig thanks to @jlesage. This image is based off https://github.com/jlesage/docker-firefox\n\n___\n\n![Chromium](https://dummyimage.com/400x110/ffffff/575757\u0026text=Chromium)\n\n---\n\n## Table of Content\n\n   * [Docker container for Chromium](#docker-container-for-chromium)\n      * [Table of Content](#table-of-content)\n      * [Quick Start](#quick-start)\n      * [Usage](#usage)\n         * [Environment Variables](#environment-variables)\n         * [Data Volumes](#data-volumes)\n         * [Ports](#ports)\n         * [Changing Parameters of a Running Container](#changing-parameters-of-a-running-container)\n      * [Docker Compose File](#docker-compose-file)\n      * [Docker Image Update](#docker-image-update)\n         * [Synology](#synology)\n         * [unRAID](#unraid)\n      * [User/Group IDs](#usergroup-ids)\n      * [Accessing the GUI](#accessing-the-gui)\n      * [Security](#security)\n         * [SSVNC](#ssvnc)\n         * [Certificates](#certificates)\n         * [VNC Password](#vnc-password)\n      * [Reverse Proxy](#reverse-proxy)\n         * [Routing Based on Hostname](#routing-based-on-hostname)\n         * [Routing Based on URL Path](#routing-based-on-url-path)\n      * [Shell Access](#shell-access)\n      * [Increasing Shared Memory Size](#increasing-shared-memory-size)\n      * [Sound Support](#sound-support)\n      * [Setting Chromium Preferences Via Environment Variables](#setting-chromium-preferences-via-environment-variables)\n      * [Troubleshooting](#troubleshooting)\n         * [Crashes](#crashes)\n      * [Support or Contact](#support-or-contact)\n\n## Quick Start\n\n**NOTE**: The Docker command provided in this quick start is given as an example\nand parameters should be adjusted to your need.\n\nLaunch the Chromium docker container with the following command:\n```\ndocker run -d \\\n    --name=chromium \\\n    -p 5800:5800 \\\n    -v /docker/appdata/chromium:/config:rw \\\n    --shm-size 2g \\\n    overclockedllama/docker-chromium\n```\n\nWhere:\n  - `/docker/appdata/chromium`: This is where the application stores its configuration, log and any files needing persistency.\n\nBrowse to `http://your-host-ip:5800` to access the Chromium GUI.\n\n## Usage\n\n```\ndocker run [-d] \\\n    --name=chromium \\\n    [-e \u003cVARIABLE_NAME\u003e=\u003cVALUE\u003e]... \\\n    [-v \u003cHOST_DIR\u003e:\u003cCONTAINER_DIR\u003e[:PERMISSIONS]]... \\\n    [-p \u003cHOST_PORT\u003e:\u003cCONTAINER_PORT\u003e]... \\\n    --shm-size VALUE \\\n    overclockedllama/docker-chromium\n```\n| Parameter | Description |\n|-----------|-------------|\n| -d        | Run the container in background.  If not set, the container runs in foreground. |\n| -e        | Pass an environment variable to the container.  See the [Environment Variables](#environment-variables) section for more details. |\n| -v        | Set a volume mapping (allows to share a folder/file between the host and the container).  See the [Data Volumes](#data-volumes) section for more details. |\n| -p        | Set a network port mapping (exposes an internal container port to the host).  See the [Ports](#ports) section for more details. |\n| --shm-size | Set the size of `/dev/shm` to `VALUE`.  The format of `VALUE` is `\u003cnumber\u003e\u003cunit\u003e`, where `number` must be greater than `0` and `unit` can be `b` (bytes), `k` (kilobytes), `m` (megabytes), or `g` (gigabytes).  **NOTE**: To avoid crashes, it is recommended to set this value to `2g`. |\n\n### Environment Variables\n\nTo customize some properties of the container, the following environment\nvariables can be passed via the `-e` parameter (one for each variable).  Value\nof this parameter has the format `\u003cVARIABLE_NAME\u003e=\u003cVALUE\u003e`.\n\n| Variable       | Description                                  | Default |\n|----------------|----------------------------------------------|---------|\n|`USER_ID`| ID of the user the application runs as.  See [User/Group IDs](#usergroup-ids) to better understand when this should be set. | `1000` |\n|`GROUP_ID`| ID of the group the application runs as.  See [User/Group IDs](#usergroup-ids) to better understand when this should be set. | `1000` |\n|`SUP_GROUP_IDS`| Comma-separated list of supplementary group IDs of the application. | (unset) |\n|`UMASK`| Mask that controls how file permissions are set for newly created files. The value of the mask is in octal notation.  By default, this variable is not set and the default umask of `022` is used, meaning that newly created files are readable by everyone, but only writable by the owner. See the following online umask calculator: http://wintelguy.com/umask-calc.pl | (unset) |\n|`TZ`| [TimeZone] of the container.  Timezone can also be set by mapping `/etc/localtime` between the host and the container. | `Etc/UTC` |\n|`KEEP_APP_RUNNING`| When set to `1`, the application will be automatically restarted if it crashes or if user quits it. | `0` |\n|`APP_NICENESS`| Priority at which the application should run.  A niceness value of -20 is the highest priority and 19 is the lowest priority.  By default, niceness is not set, meaning that the default niceness of 0 is used.  **NOTE**: A negative niceness (priority increase) requires additional permissions.  In this case, the container should be run with the docker option `--cap-add=SYS_NICE`. | (unset) |\n|`CLEAN_TMP_DIR`| When set to `1`, all files in the `/tmp` directory are delete during the container startup. | `1` |\n|`DISPLAY_WIDTH`| Width (in pixels) of the application's window. | `1280` |\n|`DISPLAY_HEIGHT`| Height (in pixels) of the application's window. | `768` |\n|`SECURE_CONNECTION`| When set to `1`, an encrypted connection is used to access the application's GUI (either via web browser or VNC client).  See the [Security](#security) section for more details. | `0` |\n|`VNC_PASSWORD`| Password needed to connect to the application's GUI.  See the [VNC Password](#vnc-password) section for more details. | (unset) |\n|`X11VNC_EXTRA_OPTS`| Extra options to pass to the x11vnc server running in the Docker container.  **WARNING**: For advanced users. Do not use unless you know what you are doing. | (unset) |\n|`ENABLE_CJK_FONT`| When set to `1`, open source computer font `WenQuanYi Zen Hei` is installed.  This font contains a large range of Chinese/Japanese/Korean characters. | `0` |\n\n### Data Volumes\n\nThe following table describes data volumes used by the container.  The mappings\nare set via the `-v` parameter.  Each mapping is specified with the following\nformat: `\u003cHOST_DIR\u003e:\u003cCONTAINER_DIR\u003e[:PERMISSIONS]`.\n\n| Container path  | Permissions | Description |\n|-----------------|-------------|-------------|\n|`/config`| rw | This is where the application stores its configuration, log and any files needing persistency. |\n\n### Ports\n\nHere is the list of ports used by the container.  They can be mapped to the host\nvia the `-p` parameter (one per port mapping).  Each mapping is defined in the\nfollowing format: `\u003cHOST_PORT\u003e:\u003cCONTAINER_PORT\u003e`.  The port number inside the\ncontainer cannot be changed, but you are free to use any port on the host side.\n\n| Port | Mapping to host | Description |\n|------|-----------------|-------------|\n| 5800 | Mandatory | Port used to access the application's GUI via the web interface. |\n| 5900 | Optional | Port used to access the application's GUI via the VNC protocol.  Optional if no VNC client is used. |\n\n### Changing Parameters of a Running Container\n\nAs seen, environment variables, volume mappings and port mappings are specified\nwhile creating the container.\n\nThe following steps describe the method used to add, remove or update\nparameter(s) of an existing container.  The generic idea is to destroy and\nre-create the container:\n\n  1. Stop the container (if it is running):\n```\ndocker stop chromium\n```\n  2. Remove the container:\n```\ndocker rm chromium\n```\n  3. Create/start the container using the `docker run` command, by adjusting\n     parameters as needed.\n\n**NOTE**: Since all application's data is saved under the `/config` container\nfolder, destroying and re-creating a container is not a problem: nothing is lost\nand the application comes back with the same state (as long as the mapping of\nthe `/config` folder remains the same).\n\n## Docker Compose File\n\nHere is an example of a `docker-compose.yml` file that can be used with\n[Docker Compose](https://docs.docker.com/compose/overview/).\n\nMake sure to adjust according to your needs.  Note that only mandatory network\nports are part of the example.\n\n```yaml\nversion: '3'\nservices:\n  chromium:\n    image: overclockedllama/docker-chromium\n    build: .\n    ports:\n      - \"5800:5800\"\n    volumes:\n      - \"/docker/appdata/chromium:/config:rw\"\n```\n\n## Docker Image Update\n\nIf the system on which the container runs doesn't provide a way to easily update\nthe Docker image, the following steps can be followed:\n\n  1. Fetch the latest image:\n```\ndocker pull overclockedllama/docker-chromium\n```\n  2. Stop the container:\n```\ndocker stop chromium\n```\n  3. Remove the container:\n```\ndocker rm chromium\n```\n  4. Start the container using the `docker run` command.\n\n### Synology\n\nFor owners of a Synology NAS, the following steps can be use to update a\ncontainer image.\n\n  1.  Open the *Docker* application.\n  2.  Click on *Registry* in the left pane.\n  3.  In the search bar, type the name of the container (`overclockedllama/docker-chromium`).\n  4.  Select the image, click *Download* and then choose the `latest` tag.\n  5.  Wait for the download to complete.  A  notification will appear once done.\n  6.  Click on *Container* in the left pane.\n  7.  Select your Chromium container.\n  8.  Stop it by clicking *Action*-\u003e*Stop*.\n  9.  Clear the container by clicking *Action*-\u003e*Clear*.  This removes the\n      container while keeping its configuration.\n  10. Start the container again by clicking *Action*-\u003e*Start*. **NOTE**:  The\n      container may temporarily disappear from the list while it is re-created.\n\n### unRAID\n\nFor unRAID, a container image can be updated by following these steps:\n\n  1. Select the *Docker* tab.\n  2. Click the *Check for Updates* button at the bottom of the page.\n  3. Click the *update ready* link of the container to be updated.\n\n## User/Group IDs\n\nWhen using data volumes (`-v` flags), permissions issues can occur between the\nhost and the container.  For example, the user within the container may not\nexists on the host.  This could prevent the host from properly accessing files\nand folders on the shared volume.\n\nTo avoid any problem, you can specify the user the application should run as.\n\nThis is done by passing the user ID and group ID to the container via the\n`USER_ID` and `GROUP_ID` environment variables.\n\nTo find the right IDs to use, issue the following command on the host, with the\nuser owning the data volume on the host:\n\n    id \u003cusername\u003e\n\nWhich gives an output like this one:\n```\nuid=1000(myuser) gid=1000(myuser) groups=1000(myuser),4(adm),24(cdrom),27(sudo),46(plugdev),113(lpadmin)\n```\n\nThe value of `uid` (user ID) and `gid` (group ID) are the ones that you should\nbe given the container.\n\n## Accessing the GUI\n\nAssuming that container's ports are mapped to the same host's ports, the\ngraphical interface of the application can be accessed via:\n\n  * A web browser:\n```\nhttp://\u003cHOST IP ADDR\u003e:5800\n```\n\n  * Any VNC client:\n```\n\u003cHOST IP ADDR\u003e:5900\n```\n\n## Security\n\nBy default, access to the application's GUI is done over an unencrypted\nconnection (HTTP or VNC).\n\nSecure connection can be enabled via the `SECURE_CONNECTION` environment\nvariable.  See the [Environment Variables](#environment-variables) section for\nmore details on how to set an environment variable.\n\nWhen enabled, application's GUI is performed over an HTTPs connection when\naccessed with a browser.  All HTTP accesses are automatically redirected to\nHTTPs.\n\nWhen using a VNC client, the VNC connection is performed over SSL.  Note that\nfew VNC clients support this method.  [SSVNC] is one of them.\n\n[SSVNC]: http://www.karlrunge.com/x11vnc/ssvnc.html\n\n### SSVNC\n\n[SSVNC] is a VNC viewer that adds encryption security to VNC connections.\n\nWhile the Linux version of [SSVNC] works well, the Windows version has some\nissues.  At the time of writing, the latest version `1.0.30` is not functional,\nas a connection fails with the following error:\n```\nReadExact: Socket error while reading\n```\nHowever, for your convienence, an unoffical and working version is provided\nhere:\n\nhttps://github.com/jlesage/docker-baseimage-gui/raw/master/tools/ssvnc_windows_only-1.0.30-r1.zip\n\nThe only difference with the offical package is that the bundled version of\n`stunnel` has been upgraded to version `5.49`, which fixes the connection\nproblems.\n\n### Certificates\n\nHere are the certificate files needed by the container.  By default, when they\nare missing, self-signed certificates are generated and used.  All files have\nPEM encoded, x509 certificates.\n\n| Container Path                  | Purpose                    | Content |\n|---------------------------------|----------------------------|---------|\n|`/config/certs/vnc-server.pem`   |VNC connection encryption.  |VNC server's private key and certificate, bundled with any root and intermediate certificates.|\n|`/config/certs/web-privkey.pem`  |HTTPs connection encryption.|Web server's private key.|\n|`/config/certs/web-fullchain.pem`|HTTPs connection encryption.|Web server's certificate, bundled with any root and intermediate certificates.|\n\n**NOTE**: To prevent any certificate validity warnings/errors from the browser\nor VNC client, make sure to supply your own valid certificates.\n\n**NOTE**: Certificate files are monitored and relevant daemons are automatically\nrestarted when changes are detected.\n\n### VNC Password\n\nTo restrict access to your application, a password can be specified.  This can\nbe done via two methods:\n  * By using the `VNC_PASSWORD` environment variable.\n  * By creating a `.vncpass_clear` file at the root of the `/config` volume.\n    This file should contains the password in clear-text.  During the container\n    startup, content of the file is obfuscated and moved to `.vncpass`.\n\nThe level of security provided by the VNC password depends on two things:\n  * The type of communication channel (encrypted/unencrypted).\n  * How secure access to the host is.\n\nWhen using a VNC password, it is highly desirable to enable the secure\nconnection to prevent sending the password in clear over an unencrypted channel.\n\n**ATTENTION**: Password is limited to 8 characters.  This limitation comes from\nthe Remote Framebuffer Protocol [RFC](https://tools.ietf.org/html/rfc6143) (see\nsection [7.2.2](https://tools.ietf.org/html/rfc6143#section-7.2.2)).  Any\ncharacters beyhond the limit are ignored.\n\n## Reverse Proxy\n\nThe following sections contains NGINX configuration that need to be added in\norder to reverse proxy to this container.\n\nA reverse proxy server can route HTTP requests based on the hostname or the URL\npath.\n\n### Routing Based on Hostname\n\nIn this scenario, each hostname is routed to a different application/container.\n\nFor example, let's say the reverse proxy server is running on the same machine\nas this container.  The server would proxy all HTTP requests sent to\n`chromium.domain.tld` to the container at `127.0.0.1:5800`.\n\nHere are the relevant configuration elements that would be added to the NGINX\nconfiguration:\n\n```\nmap $http_upgrade $connection_upgrade {\n\tdefault upgrade;\n\t''      close;\n}\n\nupstream docker-chromium {\n\t# If the reverse proxy server is not running on the same machine as the\n\t# Docker container, use the IP of the Docker host here.\n\t# Make sure to adjust the port according to how port 5800 of the\n\t# container has been mapped on the host.\n\tserver 127.0.0.1:5800;\n}\n\nserver {\n\t[...]\n\n\tserver_name chromium.domain.tld;\n\n\tlocation / {\n\t        proxy_pass http://docker-chromium;\n\t}\n\n\tlocation /websockify {\n\t\tproxy_pass http://docker-chromium;\n\t\tproxy_http_version 1.1;\n\t\tproxy_set_header Upgrade $http_upgrade;\n\t\tproxy_set_header Connection $connection_upgrade;\n\t\tproxy_read_timeout 86400;\n\t}\n}\n\n```\n\n### Routing Based on URL Path\n\nIn this scenario, the hostname is the same, but different URL paths are used to\nroute to different applications/containers.\n\nFor example, let's say the reverse proxy server is running on the same machine\nas this container.  The server would proxy all HTTP requests for\n`server.domain.tld/chromium` to the container at `127.0.0.1:5800`.\n\nHere are the relevant configuration elements that would be added to the NGINX\nconfiguration:\n\n```\nmap $http_upgrade $connection_upgrade {\n\tdefault upgrade;\n\t''      close;\n}\n\nupstream docker-chromium {\n\t# If the reverse proxy server is not running on the same machine as the\n\t# Docker container, use the IP of the Docker host here.\n\t# Make sure to adjust the port according to how port 5800 of the\n\t# container has been mapped on the host.\n\tserver 127.0.0.1:5800;\n}\n\nserver {\n\t[...]\n\n\tlocation = /chromium {return 301 $scheme://$http_host/chromium/;}\n\tlocation /chromium/ {\n\t\tproxy_pass http://docker-chromium/;\n\t\tlocation /chromium/websockify {\n\t\t\tproxy_pass http://docker-chromium/websockify/;\n\t\t\tproxy_http_version 1.1;\n\t\t\tproxy_set_header Upgrade $http_upgrade;\n\t\t\tproxy_set_header Connection $connection_upgrade;\n\t\t\tproxy_read_timeout 86400;\n\t\t}\n\t}\n}\n\n```\n## Shell Access\n\nTo get shell access to a the running container, execute the following command:\n\n```\ndocker exec -it CONTAINER sh\n```\n\nWhere `CONTAINER` is the ID or the name of the container used during its\ncreation (e.g. `crashplan-pro`).\n\n## Increasing Shared Memory Size\n\nTo prevent crashes from happening when running Chromium\ninside a Docker container, the size of the shared memory located at `/dev/shm`\nmust be increased.  The issue is documented [here].\n\nBy default, the size is 64MB, which is not enough.  It is recommended to use a\nsize of 2GB.  This value is arbitrary, but known to work well.  Setting the\nsize of `/dev/shm` can be done via two method:\n\n  - By adding the `--shm-size 2g` parameter to the `docker run` command.  See\n    the [Usage](#usage) section for more details.\n  - By using shared memory of the host, by mapping `/dev/shm` via the parameter\n    `-v /dev/shm:/dev/shm` of the `docker run` command.\n\n## Sound Support\n\nFor Chromium to be able to use the audio device available on\nthe host, `/dev/snd` must be exposed to the container by adding the\n`--device /dev/snd` parameter to the `docker run` command.\n\n## Troubleshooting\n\n### Crashes\n\nIf Chromium is crashing frequently, make sure the size of\nthe shared memory located at `/dev/shm` has been increased.  See\n[Increasing Shared Memory Size](#increasing-shared-memory-size) section for more\ndetails.\n\n## Support or Contact\n\nHaving troubles with the container or have questions?  Please\n[create a new issue].\n\nFor other great Dockerized applications, see https://jlesage.github.io/docker-apps.\n\n[create a new issue]: https://github.com/overclockedllama/docker-chromium/issues\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoneji%2Fdocker-chromium","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoneji%2Fdocker-chromium","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoneji%2Fdocker-chromium/lists"}