{"id":45942764,"url":"https://github.com/hvalev/shiny-server-arm-docker","last_synced_at":"2026-02-28T10:52:25.226Z","repository":{"id":39652423,"uuid":"267166608","full_name":"hvalev/shiny-server-arm-docker","owner":"hvalev","description":"Dockerized shiny server for armv7, arm64 and x86","archived":false,"fork":false,"pushed_at":"2026-02-14T05:10:17.000Z","size":323,"stargazers_count":52,"open_issues_count":0,"forks_count":18,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-14T13:37:10.954Z","etag":null,"topics":["arm","buster","docker","raspberry-pi","shiny","shiny-r","shiny-server"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","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/hvalev.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-05-26T22:38:38.000Z","updated_at":"2026-02-10T13:42:43.000Z","dependencies_parsed_at":"2024-05-21T10:08:28.639Z","dependency_job_id":"5a231cd6-3008-4759-884c-0121e977fe03","html_url":"https://github.com/hvalev/shiny-server-arm-docker","commit_stats":null,"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"purl":"pkg:github/hvalev/shiny-server-arm-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hvalev%2Fshiny-server-arm-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hvalev%2Fshiny-server-arm-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hvalev%2Fshiny-server-arm-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hvalev%2Fshiny-server-arm-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hvalev","download_url":"https://codeload.github.com/hvalev/shiny-server-arm-docker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hvalev%2Fshiny-server-arm-docker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29930694,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-28T09:58:13.507Z","status":"ssl_error","status_checked_at":"2026-02-28T09:57:57.047Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["arm","buster","docker","raspberry-pi","shiny","shiny-r","shiny-server"],"created_at":"2026-02-28T10:52:24.629Z","updated_at":"2026-02-28T10:52:25.214Z","avatar_url":"https://github.com/hvalev.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shiny Server on Docker for x86 and ARM\n[![build](https://github.com/hvalev/shiny-server-arm-docker/actions/workflows/build.yml/badge.svg)](https://github.com/hvalev/shiny-server-arm-docker/actions/workflows/build.yml)\n![R%20version](https://img.shields.io/badge/R%20version-4.5.2-green)\n![Shiny%20version](https://img.shields.io/badge/Shiny%20version-1.5.23.1030-green)\n![Docker Pulls](https://img.shields.io/docker/pulls/hvalev/shiny-server-arm)\n![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/hvalev/shiny-server-arm)\n\nDocker image hosting Shiny-Server for x86 and ARM (armv7/arm64) architectures. The build features some fixes targeting ARM and comes in two flavours - with and without devtools installed.\n\n## How to run it with docker\nFirst we need to create the folder structure on the host, which will be used to host the shiny-server config, logs and applications.\n```bash\nmkdir ~/shiny-server\nmkdir ~/shiny-server/logs\nmkdir ~/shiny-server/conf\nmkdir ~/shiny-server/apps\n```\nThen we need to copy over the server configuration from this repository as well as the hello world app to test if everything works.\n```bash\ngit clone https://github.com/hvalev/shiny-server-arm-docker.git ~/shiny-server-arm-docker\ncp ~/shiny-server-arm-docker/shiny-server.conf ~/shiny-server/conf/shiny-server.conf\ncp ~/shiny-server-arm-docker/init.sh ~/shiny-server/conf/init.sh\ncp -r ~/shiny-server-arm-docker/hello/ ~/shiny-server/apps/\nrm -rf ~/shiny-server-arm-docker/\n```\nRun the container:\n```bash\ndocker run -d -p 3838:3838 -v ~/shiny-server/apps:/srv/shiny-server/ -v ~/shiny-server/logs:/var/log/shiny-server/ -v ~/shiny-server/conf:/etc/shiny-server/ --name shiny-server hvalev/shiny-server-arm:latest\n```\nand navigate to:\n```\nhttp://localhost:3838/hello/\n```\n\n## How to run it with docker-compose\nYou need to create the folders and copy the configurations from the previous section and use the following docker-compose service:\n```yaml\nservices:\n  shiny-server:\n    image: hvalev/shiny-server-arm:latest\n    container_name: shiny-server-arm\n    ports:\n      - 3838:3838\n    volumes:\n       - ~/shiny-server/apps:/srv/shiny-server/\n       - ~/shiny-server/logs:/var/log/shiny-server/\n       - ~/shiny-server/conf:/etc/shiny-server/\n    restart: always\n```\nRun: ```docker-compose up -d``` and navigate to: ```http://host-ip:3838/hello```\n\n## How to use it\nThe following sections will explain how you can install libraries, import apps, and configure your shiny-server image.\n\n### Installing libraries\nLibraries can be installed by modifying the ```init.sh``` file under ```~/shiny-server/conf```. It contains and will execute the ```R -e \"install.packages(c('lib1','lib2',...))``` command the first time the container is started. Simply add the libraries you wish installed there. In order to avoid installing the same libraries on each restart, the script generates an ```init_done``` file and will not run if the file is present on the system. To add additional libraries in subsequent runs, delete the ```init_done``` file and add the new libraries to ```init.sh``` as before. Please note that installed libraries will persist between restarts as long as the container image is not removed or recreated.\n\n### Adding and configuring apps\nApps can be added to the ```~/shiny-server/apps``` folder and will be loaded into shiny-server. If you followed the steps in so far, the hello-world app will be accessible under ```http://host-ip:3838/hello```. You can add your own app by copying it over to the folder ```shiny-server/apps```, where it will be available under ```http://host-ip:3838/yourappfolder```. Be aware that each app will need to have its own configuration file under ```~/shiny-server/yourappfolder/.shiny_app.conf```. You can use the hello-world app as staging ground for building your new app. \n\n### Configuring shiny-server\nShiny servers' configuration file can be found under ```~/shiny-server/conf/shiny-server.conf```. The default settings should be sufficient, however you can also modify it according to your needs. The [documentation of shiny-server](https://docs.rstudio.com/shiny-server/) is always a good place to start, when you want to tune your installation.\n\n### Troubleshooting\nIf you run into any trouble along the way, it might be due to permission problems. You can try running the following command: ```chmod -R 777 ~/shiny-server/```.\n\n## Build it yourself\nThe Dockerfile implements a multi-stage build and will produce a functional 1GB shiny-server image equipped with all necessary libraries to build and install most R-packages. Additionally, it will leave a 4.5GB builder image behind post-build, which you can remove. Be aware that this will take at least 2 hours to build even on an SSD.\n\nBuild the container with the following command:\n```bash\ndocker build https://github.com/hvalev/shiny-server-arm-docker.git --tag shiny-server-arm\n```\n\n### RAM usage\nTo speed-up building, I have used -j4 flags when applicable to utilize multiple cores. As a result RAM consumption goes slightly over 1GB at times. Should you compile the image on devices with less RAM, make sure you allocate some swap memory beforehand.\n\n### Blas and Lapack support\nSince this is an automated build, Blas and Lapack support have been included by default.\nIf you wish to compile R without them, remove the ```--with-blas --with-lapack``` from the following statement in the Dockerfile: ```./configure --enable-R-shlib --with-blas --with-lapack```\n\n### Default R libraries\nAlthough you can install R libraries post-install, you could also bake those in the image by adding them to the following run statement in the Dockerfile:\n```RUN R -e \"install.packages(c('shiny', 'Cairo'), repos='http://cran.rstudio.com/')\"```.\nCairo is needed for the hello-world preloaded app. If it's missing the histogram won't be loaded.\n\n### Node.js (DEPRECATED since R4.5.2-S1.5.23.1030)\nI have written the [determine_arch.sh](https://github.com/hvalev/shiny-server-arm-docker/blob/master/determine_arch.sh) script, which automagically determines the architecture it's running on, fetches the appropriate node.js checksum and replaces it in the install-node.sh file. It should be future-proof as the reference node.js version is taken from the cloned shiny-server repository itself.\n\n## Acknowledgements\nThe following resources were very helpful in putting this together:\n* https://community.rstudio.com/t/setting-up-your-own-shiny-server-rstudio-server-on-a-raspberry-pi-3b/18982\n* https://emeraldreverie.org/2019/11/17/self-hosting-shiny-notes-from-edinbr/\n* https://github.com/rstudio/shiny-server/wiki/Building-Shiny-Server-from-Source\n* https://www.brodrigues.co/blog/2020-09-20-shiny_raspberry/ for indicating a few libraries to be included in the build which are required for some packages.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhvalev%2Fshiny-server-arm-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhvalev%2Fshiny-server-arm-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhvalev%2Fshiny-server-arm-docker/lists"}