Jump to content

Docker Applications: Difference between revisions

From 太極
Brb (talk | contribs)
Brb (talk | contribs)
 
(193 intermediate revisions by the same user not shown)
Line 2: Line 2:
* [[Self_hosting|Self hosting]]
* [[Self_hosting|Self hosting]]
* [https://noted.lol/what-are-your-most-used-self-hosted-applications What are your Most Used Self Hosted Applications?] and [https://www.reddit.com/r/selfhosted/comments/udxlnp/what_are_your_most_used_self_hosted_applications/ more]
* [https://noted.lol/what-are-your-most-used-self-hosted-applications What are your Most Used Self Hosted Applications?] and [https://www.reddit.com/r/selfhosted/comments/udxlnp/what_are_your_most_used_self_hosted_applications/ more]
* [https://youtu.be/9uF2us2PabM?si=ia76EPobqVRohIOy Best Docker Containers for Home Server!] 2022/11 (video)
== Top/best ==
* https://hub.docker.com/
* [https://github.com/veggiemonk/awesome-docker Awesome Docker]
* [https://fleet.linuxserver.io/ LinuxServer.io]. Need to sort by downloads.
* Reddit [https://www.reddit.com/r/homelab/comments/zy5io8/what_are_your_must_docker_containers_for_home_lab/ what are your must docker containers for home lab?]
* [https://www.blackvoid.club/docker-top-10-images-and-solutions/ Docker top (18) images and solutions]
* [https://www.smarthomebeginner.com/best-docker-containers-for-home-server/ 60+ Best Docker Containers for Home Server Beginners 2023]
* 15 Best Docker Containers To Self-Host For A Powerful Setup
** [https://kasm.com/downloads Kasm Workspaces] (run full desktop sessions inside Docker containers), Plex/Jellyfin/Emby, Nextcloud, Pi-Hole/AdGuard Home, Home Assistant, Bitwarden, Ghost, Gitea, Dashy, Uptime Kuma, [https://github.com/YoRyan/mailrise Mailrise] (converts the emails it receives into [https://github.com/caronc/apprise Apprise] notifications), FreshRSS.
= Templates =
* [https://github.com/Lissy93/portainer-templates 400+ 1-click Portainer app templates]
= LXC != VM =
<ul>
<li>When I try to run a seafile docker in LXC, I got an error.
{{Pre}}
error during container init: open sysctl net.ipv4.ip_unprivileged_port_start file: reopen fd 8: permission denied
</pre>
Why it happens: The Seafile Caddy image tries to make itself able to bind to ports <1024 without root.
<li>LXC vs full VM
* '''LXC containers share the host kernel'''.
* '''By default, LXC limits certain sysctls and capabilities, especially ones that can affect networking or security''', like net.ipv4.ip_unprivileged_port_start.
* In a normal VM (like a full Proxmox KVM VM), the container would have its own kernel, so this wouldn’t be blocked.
<li>'''Privileged vs. unprivileged LXC''': Pick your poison. [https://www.xda-developers.com/heres-how-i-run-docker-in-an-lxc-on-proxmox/ Here's how I run Docker in an LXC on Proxmox, and why it's a solid alternative to a VM]
</ul>


= App store =
= App store =
Line 13: Line 41:


= Crontab =
= Crontab =
[https://www.cloudsavvyit.com/9033/how-to-use-cron-with-your-docker-containers/ How to Use Cron With Your Docker Containers]
* [https://www.howtogeek.com/devops/how-to-use-cron-with-your-docker-containers/ How to Use Cron With Your Docker Containers]
* [https://github.com/alseambusher/crontab-ui Crontab UI]


= Install macOS =
= Install macOS =
Line 33: Line 62:


= Bioinformatics analyses =
= Bioinformatics analyses =
* [https://www.biorxiv.org/content/early/2017/10/17/204495 Hot-starting software containers for bioinformatics analyses]
<ul>
* [https://academic.oup.com/gigascience/article/6/8/1/3894236 Bio-Docklets: virtualization containers for single-step execution of NGS pipelines]
<li>[https://www.biorxiv.org/content/early/2017/10/17/204495 Hot-starting software containers for bioinformatics analyses]
* [https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1009244 Performance and scaling behavior of bioinformatic applications in virtualization environments to create awareness for the efficient use of compute resources] Hanussek, 2021
<li>[https://academic.oup.com/gigascience/article/6/8/1/3894236 Bio-Docklets: virtualization containers for single-step execution of NGS pipelines]
* [https://github.com/StaPH-B/docker-builds docker-builds] - Dockerfiles and documentation on tools for public health bioinformatics
<li>[https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1009244 Performance and scaling behavior of bioinformatic applications in virtualization environments to create awareness for the efficient use of compute resources] Hanussek, 2021
* [https://github.com/shmohammadi86/ACTIONet/tree/R-release/mini_docker ACTIONet] and the paper [https://pubmed.ncbi.nlm.nih.gov/36650127/ Transcriptional vulnerabilities of striatal neurons in human and rodent models of Huntington's disease] 2023.
<li>[https://github.com/StaPH-B/docker-builds docker-builds] - Dockerfiles and documentation on tools for public health bioinformatics
<li>[https://github.com/shmohammadi86/ACTIONet/tree/R-release/mini_docker ACTIONet] and the paper [https://pubmed.ncbi.nlm.nih.gov/36650127/ Transcriptional vulnerabilities of striatal neurons in human and rodent models of Huntington's disease] 2023.
<li>[https://bmcbioinformatics.biomedcentral.com/articles/10.1186/s12859-024-05695-9 CREDO: a friendly Customizable, REproducible, DOcker file generator for bioinformatics applications] 2024
 
[[File:CredoError.png|240px]]
</ul>


= Cloud provider =
= Cloud provider =
Line 47: Line 81:
* http://linoxide.com/linux-how-to/use-docker-machine-cloud-provider/
* http://linoxide.com/linux-how-to/use-docker-machine-cloud-provider/
* [http://www.ithome.com.tw/news/106274 HTC採用AWS的三大原因]: 上市時間縮短、節省成本以及提供創新發想的低成本空間。
* [http://www.ithome.com.tw/news/106274 HTC採用AWS的三大原因]: 上市時間縮短、節省成本以及提供創新發想的低成本空間。
= Notification =
== Gotify ==
* https://gotify.net/
* [https://www.youtube.com/watch?v=mIVHxFrFKqQ Gotify: My New Favorite Way To Get Notified!]
** Create an '''app''' (e.g. "Uptime" in the Gotify interface). It will automatically create a '''Token'''
*** Go to Uptime Kuma - Settings - Notifications - Notification type = Gotify.
*** Copy Gotify application token here.
*** Copy Gotify server URL http://xxx.xxx.x.xxx:8010
*** Do a test
*** Gotify shall show` a notification on the app "Uptime"
** Create another app called "watchTower"
*** WatchTower is launched through a docker compose
*** Docker compose file can specify notification settings. It can receive notifications from many apps.
* [https://www.xda-developers.com/gotify-is-my-favorite-utility-for-receiving-notifications/ Gotify is my favorite FOSS utility for receiving notifications from my self-hosted services]


= Dashboard =
= Dashboard =
[https://www.howtogeek.com/homelab-dashboard-what-it-is-and-why-you-need-one/ Homelab Dashboard: What It Is and Why You Need One]
== Homepage ==
<ul>
<li>https://github.com/gethomepage/homepage
* [https://gethomepage.dev/configs/ Documentation]
* [https://technotim.live/posts/homepage-dashboard/ Meet Homepage - Your HomeLab Services Dashboard]. Examples of yaml files in the config folder.
* [https://ettoreciarcia.com/publication/25-homepage/ Homepage: a single pain of glass for your Homelab]
* [https://www.howtogeek.com/how-i-created-a-detailed-dashboard-for-all-of-my-self-hosted-apps/ How I Created a Detailed Dashboard for All of My Self-Hosted Apps]
<li>How-to:
<syntaxhighlight lang='sh'>
nano compose.yml # copy from https://github.com/gethomepage/homepage
                # remember to the URLs on HOMEPAGE_ALLOWED_HOSTS
mkdir config    # it's ok the folder is empty
docker compose up -d
nano config/services.yaml  # modify for our need
nano config/bookmarks.yaml # modify for our need
</syntaxhighlight>
<li>Tip:
* By default, port 3000 is used.
* If I want to use port 80, make sure DO NOT INCLUDE ":80" to '''HOMEPAGE_ALLOWED_HOSTS''' in the compose.yml since browsers usually send the request with the Host header as just "homepage.local" (without ":80").
* To include [https://gethomepage.dev/widgets/services/pihole/ pihole] as a widget in the dashboard, I need to modify services.yaml. I also need to get the pihole api from Settings -> api. The api key is needed in order to access pihole statistics.
<li>Files under the config folder
<pre>
$ ls -t config/*.*
settings.yaml  widgets.yaml  bookmarks.yaml  services.yaml  docker.yaml  kubernetes.yaml  custom.css  custom.js
</pre>
It seems the most important ones are [https://gethomepage.dev/configs/services/ services.yaml] and [https://gethomepage.dev/configs/bookmarks/ bookmarks.yml]. Homepage automatically creates default/skeleton config files on first run inside /app/config if they do not already exist.
<li>[https://gethomepage.dev/configs/services/#icons Icons]
* Icons can be specified by names. They are obtained from https://dashboardicons.com/.
* Local icons can be placed in a new folder 'icons' and use '''-v ./icons:/app/public/icons''' in docker command. Recall Homepage's web root is '''/app/public'''.
* Icons can be specified by using the way "/icons/myicon.png" in '''config/services.yaml''' file.
* Icons can be specified by full URLs.
* To download some website's favicon file, go to the source of a website and search for "icon". Alternatively, use a [https://onlineminitools.com/website-favicon-downloader web tool].
* Supported formats: .ico, .png, .svg, .webp
* Use '''docker compose restart homepage''' to see its effects.
<li>[https://gethomepage.dev/widgets/ Widgets]
* [https://gethomepage.dev/widgets/services/pihole/ Pihole]
<li>To hide the CPU usage, RAM, storage, and the search box in your Homepage dashboard, modify '''config/widgets.yaml''' file. If you want to hide the entire "resources" section, you can simply remove or comment out the entire - resources: block from your widgets.yaml.
<li>(Related to hide CPU/RAM/Storage/Search) To hide a horizontal bar at top (related to the header section), modify '''config/settings.yaml''' file by adding a line: '''headerStyle: none'''
<li>Examples :
* [https://github.com/epoch-philosophy/homepage-example epoch-philosophy]
</ul>


== Dashy ==
== Dashy ==
* https://github.com/Lissy93/dashy
* https://github.com/Lissy93/dashy
* [https://youtu.be/QsQUzutGarA Dashy, a configurable, themable, flexible personal dashboard for your homelab!] (video) and [https://shownotes.opensourceisawesome.com/dashy-powerful-informative/ Notes]
* [https://youtu.be/QsQUzutGarA Dashy, a configurable, themable, flexible personal dashboard for your homelab!] (video) and [https://wiki.opensourceisawesome.com/books/self-hosted-dashboards/page/dashy-powerful-informative-configurable-self-hosting-dashboard Notes]
** https://github.com/walkxcode/dashboard-icons for icons
* Icons are located in ~/dash/icons/dashboard-icons/png directory.
* Icons are located in ~/dash/icons/dashboard-icons/png directory.
* Download an icon from [https://icons8.com/icons/ icons8.com] or [https://uxwing.com/ uxwing.com]. The default 48x48 works fine.
* Better to work on one icon and then save the change. Repeat.
<pre>
<pre>
docker run -d \
docker run -d \
Line 63: Line 164:
   lissy93/dashy:latest
   lissy93/dashy:latest
</pre>
</pre>
== Glance ==
* https://github.com/glanceapp/glance
* [https://www.youtube.com/watch?v=2dGD4C2g8ig Glance Dashboard: Your New Favorite Docker Dashboard]
== Flame ==
https://github.com/pawelmalak/flame


== Homer ==
== Homer ==
* https://github.com/bastienwirtz/homer
* https://github.com/bastienwirtz/homer
* [https://youtu.be/7re4LlJGBXE Homer Dashboard - Open Source, Self Hosted, Beautiful Shortcuts to all your sites and services], [https://youtu.be/9iTPm45EmxM This Homelab Dashboard is simple and beautiful!] (videos)
* [https://youtu.be/7re4LlJGBXE Homer Dashboard - Open Source, Self Hosted, Beautiful Shortcuts to all your sites and services], [https://youtu.be/9iTPm45EmxM This Homelab Dashboard is simple and beautiful!] (videos)
== Uptime Kuma ==
<ul>
<li>[https://hub.docker.com/r/louislam/uptime-kuma Docker], [https://github.com/louislam/uptime-kuma Github]
<li>[https://linuxiac.com/uptime-kuma-monitoring-tool-setup-guide/ Uptime Kuma Docker Setup Guide: Installation and Configuration]
<li>[https://youtu.be/tqgqFbxd7rg Uptime Kuma | Fancy service and server monitoring] (Video)
<li>Since I like to use Uptime Kuma to monitor servers using IPs from my tailscale, I need to expose host's network to the container. That is, I would use something like "docker run -d --network host louislam/uptime-kuma" or
<pre>
services:
  uptime-kuma:
    image: louislam/uptime-kuma:1
    container_name: kuma
    volumes:
      - ./data:/app/data
    network_mode: "host"  # Use host network mode
    restart: always
</pre>
Note
* In host network mode, the container shares the network stack of the host directly, bypassing Docker's network isolation.
* The container can access all host network interfaces directly.
* Any ports exposed by the container are automatically accessible on the host without explicit port mapping.
* Port mapping is not applicable when the container is using host network. In host network mode, the container shares the network stack of the host system directly, bypassing Docker's network isolation.
</ul>


== heimdall ==
== heimdall ==
Line 92: Line 223:
* Reboot the host OS will not affect the grafana (assuming we include '''restart: unless-stopped''' in the 3 containers). But if we modify docker-compose.yml and run ''docker-compose down; docker-compose up'' it will result in data lose and we will need to re-create the admin password and all the setup.
* Reboot the host OS will not affect the grafana (assuming we include '''restart: unless-stopped''' in the 3 containers). But if we modify docker-compose.yml and run ''docker-compose down; docker-compose up'' it will result in data lose and we will need to re-create the admin password and all the setup.


= ownCloud =
= Google keep =
== Joplin ==
* https://hub.docker.com/r/joplin/server
* [https://www.howtogeek.com/i-ditched-google-keep-for-this-self-hosted-note-taking-app/ I Ditched Google Keep for This Self-Hosted Note-Taking App]
 
= Google photo =
* [https://empty.coffee/photo-backup-bakeoff-photoprism-vs-immich-review/ Photo Backup Bakeoff: PhotoPrism vs Immich]
 
== Immich ==
* [https://github.com/immich-app/immich immich] - High performance self-hosted photo and video backup solution
** [https://immich.app/docs/overview/quick-start/ Quick Start]
** [https://docs.immich.app/FAQ FAQ]
** It does not delete photos/videos from local devices
 
* [https://www.makeuseof.com/raspberry-pi-immich-google-photos-alternative/ Immich Is a Great Google Photos Alternative You Can Host on Raspberry Pi]
* [https://linuxiac.com/how-to-install-immich-with-docker/ 9How to Install Immich with Docker: A Comprehensive Guide]
* [https://pimylifeup.com/immich-docker/ Setting up Immich using Docker]
 
== PhotoPrism ==
* [https://docs.photoprism.app/getting-started/docker/ PhotoPrism]
 
= Document management =
* [https://docs.paperless-ngx.com/ Paperless-ngx]
* [https://github.com/papra-hq/papra Papra], [https://www.youtube.com/watch?v=r3DdVXZ06Ho Video]
 
= Music: Navidrome =
[https://www.makeuseof.com/raspberry-pi-navidrome-self-hosted-music-server/ Navidrome Is the Perfect Self-Hosted Music Server for Raspberry Pi]
 
= File server =
 
== samba ==
https://github.com/dockur/samba
<pre>
services:
  samba:
    image: dockurr/samba
    container_name: samba
    environment:
      NAME: "Data"
      USER: "samba"
      PASS: "secret"
    ports:
      - 445:445
    volumes:
      - ./samba:/storage
    restart: always
</pre>
* It works on Linux (<nowiki>smb://192.168.x.x</nowiki>) and Windows (<nowiki>\\\\192.168.x.x\Data</nowiki>)
* '''It doesn’t announce itself on the local network, so Windows Explorer or Linux “Files” doesn’t auto-discover it. It’s a networking limitation of Docker by default.'''
** Network discovery (SMB browsing) depends on NetBIOS / mDNS broadcasts, which are local-network (Layer-2) broadcast packets.
** Docker NATs traffic through a virtual bridge. The container cannot announce itself via NetBIOS name service (UDP 137/138) or mDNS.
 
== ownCloud ==
* https://hub.docker.com/_/owncloud/
* https://hub.docker.com/_/owncloud/
* https://doc.owncloud.com/server/10.0/admin_manual/installation/docker/
* https://doc.owncloud.com/server/10.0/admin_manual/installation/docker/
Line 107: Line 290:
After I use '''docker run --rm --name myowncloud -p 81:80 owncloud:8.1''', I find I can only access it through http://localhost:81. If I try to access it through another computer by http://xxx.xxx.xx.1:81, the URL is changed back to http://localhost:81 so it failed to load.
After I use '''docker run --rm --name myowncloud -p 81:80 owncloud:8.1''', I find I can only access it through http://localhost:81. If I try to access it through another computer by http://xxx.xxx.xx.1:81, the URL is changed back to http://localhost:81 so it failed to load.


= nextcloud =
== nextcloud ==
* https://hub.docker.com/_/nextcloud/
* https://hub.docker.com/_/nextcloud/
* https://github.com/nextcloud/docker
* https://github.com/nextcloud/docker
Line 114: Line 297:
* Based on [https://github.com/owncloud owncloud's github repositories] or [https://github.com/nextcloud nextcloud's github repositories], android app has been updated more often than ios app.
* Based on [https://github.com/owncloud owncloud's github repositories] or [https://github.com/nextcloud nextcloud's github repositories], android app has been updated more often than ios app.
* [https://youtu.be/Wj0SsbRbCNo Setting Up NextCloud on Docker w/ NGINX and CloudFlare for Remote Access!] (video)
* [https://youtu.be/Wj0SsbRbCNo Setting Up NextCloud on Docker w/ NGINX and CloudFlare for Remote Access!] (video)
* [https://www.wundertech.net/install-nextcloud-on-proxmox/ How to Install Nextcloud on Proxmox]
* [https://www.howtogeek.com/how-i-self-host-a-synced-password-manager/ How I Self-Host a Synced Password Manager]


Nextcloud looks more modern than owncloud though their interface are very similar. I got the same problem (URL is changed from IP to localhost) when I try to access its web from another computer. '''Using the IP instead of localhost to finish the initial setup can fix the error'''.
Nextcloud looks more modern than owncloud though their interface are very similar. I got the same problem (URL is changed from IP to localhost) when I try to access its web from another computer. '''Using the IP instead of localhost to finish the initial setup can fix the error'''.
Line 122: Line 307:
* Nextcloud includes a small mp4 file. I can use browser to play mp4. Photos files can be opened in browsers too (including slideshow).
* Nextcloud includes a small mp4 file. I can use browser to play mp4. Photos files can be opened in browsers too (including slideshow).


== [https://apps.nextcloud.com/ Nextcloud Apps] ==
=== Add external storage like SAMBA ===
For mp3, no apps are shipped with nextcloud.  
To connect to a Samba drive in Nextcloud, you will need to use the '''External Storage''' app. This app allows you to mount external storage services, including Samba shares, as directories within your Nextcloud instance. Here are the steps to connect to a Samba drive in Nextcloud:
 
First, make sure that the '''External Storage''' app is installed and enabled on your Nextcloud instance. You can do this by going to the '''Apps''' section in the Nextcloud '''admin panel''' and searching for the External Storage app. If it is not installed, you can install it from there.


Once the External Storage app is installed and enabled, go to the Settings section in the Nextcloud admin panel and select the External Storages option under the '''Administration''' section (Left panel, scroll down to see the app).
On the External Storages page, click on the '''Add storage''' button and select SMB / CIFS from the dropdown menu.
In the configuration form that appears, enter the details of your Samba share, including the hostname or IP address of the server, share name, username, and password. You can also specify a subfolder within the share if you only want to mount a specific subfolder.
Once you have entered all of the required information, click on the Save button to save your configuration.
=== [https://apps.nextcloud.com/ Nextcloud Apps] ===
* [https://docs.nextcloud.com/server/15/admin_manual/installation/installation_wizard.html#trusted-domains "access through untrusted domain" error]. On my Casaos, I found the file ''/DATA/AppData/nextcloud/var/www/html/config/config.php'' shows trusted domain is casaos.local:10081. So I just need to change the app's setting in CasaOS to use http://casaos.local:10081 instead of http://IP:10081 to open the page.
* [https://apps.nextcloud.com/apps/audioplayer Audio Player]. When I play mp3 files, the web interface does not show a progress bar:( <syntaxhighlight lang='bash'>
* [https://apps.nextcloud.com/apps/audioplayer Audio Player]. When I play mp3 files, the web interface does not show a progress bar:( <syntaxhighlight lang='bash'>
$ docker run --rm --name mynextcloud -v ~/Downloads/nextcloudapps:/var/www/html/custom_apps -p 81:80 nextcloud
$ docker run --rm --name mynextcloud -v ~/Downloads/nextcloudapps:/var/www/html/custom_apps -p 81:80 nextcloud
Line 159: Line 356:
* [https://apps.nextcloud.com/apps/radio Radio]. After enable it, a new "Radio" icon will be shown at the top. Only 20 stations are available from the 'Top'. No response after I clicked "Categories".
* [https://apps.nextcloud.com/apps/radio Radio]. After enable it, a new "Radio" icon will be shown at the top. Only 20 stations are available from the 'Top'. No response after I clicked "Categories".


= FileRun =
== Seafile ==
* https://www.filerun.com/download
* https://en.wikipedia.org/wiki/Seafile. Seafile's functionality is similar to other popular file hosting services such as Dropbox and Google Drive.
* [https://www.howtoforge.com/how-to-install-filerun-using-docker/ How to Install FileRun using Docker]
* Official manual: [https://manual.seafile.com/latest/setup/setup_ce_by_docker/#install-docker Installation of Seafile Server Community Edition with Docker]
* [https://computingforgeeks.com/running-filerun-storage-sync-server-in-docker-container/ Running Filerun Storage Sync Server in Docker Container]. You can access, create and edit your files using Filerun via the web interface or the desktop sync app like NextCloud.
** [https://github.com/haiwen/seafile-server Github source] (516 star)
* [https://www.reddit.com/r/selfhosted/comments/8fbpjx/filerun_vs_nextcloud/ Filerun vs NextCloud?]
* [https://itsfoss.com/deploy-seafile-server-docker/ How to Deploy Seafile Server with Docker to Host Your Own File Synchronization and Sharing Solution] 2021
* [https://pimylifeup.com/docker-seafile/ Running a Seafile Server using Docker] 2025
** Seafile 13.0.
** It works. No need to use any special port.
** The admin email and password defined in '''.env''' will be used to login.
* Seafile vs '''File browser''' app
** '''Versioning''' / Snapshots: You can restore a previous versiceon if a file gets overwritten or deleted.
** Sync Clients: Seafile has desktop and mobile sync clients. You can sync specific libraries (folders) to multiple devices automatically.
** Collaboration & Sharing: Seafile share folders or files with other users inside your server or via '''secure links'''. Permission control: read-only or read-write per folder.
** Libraries & Organization. Seafile: Uses libraries instead of flat folders.
 
== Copyparty ==
<ul>
<li>https://github.com/9001/copyparty. A lightweight, portable file server supporting protocols like HTTP, FTP,WebDAV, and more.
* https://hub.docker.com/r/copyparty/ac
* https://github.com/9001/copyparty/tree/hovudstraum/scripts/docker
* [https://www.howtogeek.com/copyparty-is-an-ultra-simple-file-server/ I Wish I'd Discovered This Ultra-Simple File Server a Long Time Ago]
* [https://www.makeuseof.com/stop-paying-google-drive-start-doing-this-with-phone/ Stop paying for Google Drive and start doing this with your old phone]
 
<li>Examples
<pre>
docker run --rm -it --name copyparty \
  -u 1000 \
  -p 3923:3923 \
  -v "$PWD/share:/w" \
  copyparty/ac \
  -v .::rw
</pre>
<li>The interface looks weird.
</ul>


= File manager =
= File manager =
* [https://www.linuxlinks.com/best-free-open-source-web-based-linux-file-managers/ 15 Best Free and Open Source Web-Based Linux File Managers]
== Filestash ==
[https://github.com/mickael-kerjean/filestash Filestash – Dropbox-like file manager]


== File browser ==
== File browser ==
* https://filebrowser.org/installation/, https://github.com/filebrowser/filebrowser
<ul>
* [https://youtu.be/30MYRgCObu8 Pi-Hosted : Installing JDownloader and File Browser On The Pi Docker Server Part 4] (video)
<li>https://filebrowser.org/installation/,  
* https://github.com/filebrowser/filebrowser
* Default credential: admin/admin


The original image (filebrowser/filebrowser) does not work but linuxserver's image (filebrowser/filebrowser:s6) works fine.
<li>[https://youtu.be/30MYRgCObu8 Pi-Hosted : Installing JDownloader and File Browser On The Pi Docker Server Part 4] (video)
{{Pre}}
<li>It appears Filebrowser can only browse files in one directory from the same computer only.
<li>[https://www.bitdoze.com/deploy-filebrowser-docker/ Simplify File Management with Docker Filebrowser: Easy Setup Guide] still works in 2025.
* Note the username is "admin". The password was generated randomly and can be found using 'docker logs' command. We can modify the password after the first login.
<syntaxhighlight lang='sh'>
$ touch filebrowser.db
$ touch filebrowser.db
$ cat settings.json
$ nano settings.json
{
{
   "port": 80,
   "port": 80,
Line 183: Line 418:
   "root": "/srv"
   "root": "/srv"
}
}
$ sudo chown 911:1001 filebrowser.db
$ mkdir project


#  Modify $FULL_PATH1 <- directory to share files
$ nano compose.yml
#      &  $FULL_PATH2  <- directory contains filebrowser.db & settings.json
services:
    filebrowser:
        container_name: filebrowser
        volumes:
            - ./root:/srv
            - ./filebrowser.db:/database/filebrowser.db
            - ./settings.json:/config/settings.json
        environment:
            - PUID=$(id -u)
            - PGID=$(id -g)
        ports:
            - 8088:80
        image: filebrowser/filebrowser:s6
$ docker compose up -d
$ docker logs -f filebrowser
...
User UID:    911
User GID:    1001
...
2025/11/29 21:27:44 Using config file: /config/settings.json
2025/11/29 21:27:44 WARNING: filebrowser.db can't be found. Initialing in /database/
2025/11/29 21:27:44 Using database: /database/filebrowser.db
2025/11/29 21:27:44 Performing quick setup
2025/11/29 21:27:44 User 'admin' initialized with randomly generated password: Mq12FFSReZ8EVzqW
2025/11/29 21:27:44 Listening on [::]:80
</syntaxhighlight>


$ docker run \
== FileBrowser Quantum ==
    --name filebrowser \
https://github.com/gtsteffaniak/filebrowser. It supports multiple sources!
    -v $FULL_PATH1:/srv \
    -v $FULL_PATH2/filebrowser.db:/database/filebrowser.db \
    -v $FULL_PATH2/settings.json:/config/settings.json \
    -e PUID=$(id -u) \
    -e PGID=$(id -g) \
    -p 8080:80 \
    filebrowser/filebrowser:s6
</pre>


== FilGator ==
== FilGator ==
https://filegator.io/
https://filegator.io/


= Seafile =
= Run a Linux desktop =
* https://en.wikipedia.org/wiki/Seafile. Seafile's functionality is similar to other popular file hosting services such as Dropbox and Google Drive.
* [https://itsfoss.com/deploy-seafile-server-docker/ How to Deploy Seafile Server with Docker to Host Your Own File Synchronization and Sharing Solution]


= Run a Linux desktop VM with VNC =
== Run a Linux desktop VM with VNC ==
[https://computingforgeeks.com/run-ubuntu-linux-in-docker-with-desktop-environment-and-vnc/ Run Ubuntu Linux in Docker with Desktop Environment and VNC]
[https://computingforgeeks.com/run-ubuntu-linux-in-docker-with-desktop-environment-and-vnc/ Run Ubuntu Linux in Docker with Desktop Environment and VNC]
== Webtop ==
* See [[#Webtop:_Linux_desktop_in_a_browser|Guacamole - Webtop]]
* Each Docker run will create one linux desktop
== Kasm Workspaces ==
* https://www.kasmweb.com/community-edition
** [https://www.kasmweb.com/docs/latest/install/single_server_install.html Installation Guide]
** Kasm UI Login Credentials & Database Credentials are listed after the installation is complete. It's good to save the information.
* Kasm Workspaces includes several Linux Desktop already.
* [[Docker#Linux_in_browser|Linux in browser]]
== Distrobox & BoxBuddy (No Desktop) ==
<ul>
<li>https://github.com/89luca89/distrobox (in the 'Installation' section there is a table. It seems the green color is used to show which Linux distributions has the latest version of distrobox)
* Idea: Distrobox uses containerization technologies like '''Podman, Docker''', or '''LXC''' to create '''containers''' with your chosen Linux distribution (Why worry about Podman/LXC?)
* Important: Since it integrated with the host system, '''always back up important data and double-check configurations to avoid unintended changes. Changes may happen when we use a software (eg install R packages) launched from a box.'''
* Practical uses:
** Running GUI Applications from Other Distros (Containers): distrobox-enter fedora-box -- firefox
*** (not tested) OnlyOffice (Ubuntu/Debian, CentOS/RHEL, snap, flatpak, appimage). 1. Install Distrobox on Manjaro '''sudo pacman -Syu && sudo pacman -S distrobox''', 2. Create an Ubuntu container '''distrobox create --image ubuntu:latest --name ubuntu-container''' , 3. Enter the Ubuntu container '''distrobox enter ubuntu-container''', 4. Update package lists and install ONLYOFFICE Desktop Editor '''sudo apt install onlyoffice-desktopeditors''', 5, Run ONLYOFFICE Desktop Editors '''onlyoffice-desktopeditors'''.
** Developing and Testing on Multiple Linux Distributions
** Using Up-to-Date Tools on Older Systems
** Lightweight Alternative to Virtual Machines
** Persistent Workflows Across Systems: the created container is tightly integrated with the host, allowing sharing of the HOME directory (yes, no extra configuration), external storage, USB devices
** Running Different Package Managers: Use Arch's pacman or Fedora’s dnf on a system where apt is the native package manager.
<li>[https://www.howtogeek.com/how-to-install-and-use-distrobox/ How I Break Linux's Rules and Install Any Package on Any Distro]
<li>[https://wiki.archlinux.org/title/Distrobox Archwiki]
<li>Installation
* Distribution's version
* PPA for Ubuntu https://launchpad.net/~michel-slm/+archive/ubuntu/distrobox
* Installation script provided by distrobox. "curl -s https://raw.githubusercontent.com/89luca89/distrobox/main/install | sudo sh". See [https://idroot.us/install-distrobox-debian-12/ How To Install Distrobox on Debian 12]
<li>[https://www.howtogeek.com/run-any-app-on-any-linux-distro-with-distrobox/ DEB Files on Arch? Run Any App on Any Linux Distro With This Tool]
<li>[https://itsfoss.com/distrobox/#4-integration-of-distrobox-applications Distrobox: Try Multiple Linux Distributions via the Terminal]. The line "distrobox-export --app foliate" gives an error "cannot find any desktop files".
<li> [https://youtu.be/Sj064D9ZUl8 Stop Distro Hopping! Use this AWESOME tool on Linux] 7/15/2023
* Linux subsystem in another Linux
<li>[https://www.maketecheasier.com/run-program-from-any-linux-distro-with-distrobox/ How to Run Any Program from Any Linux Distro with Distrobox]
<li>Testing using arch linux container where packages are always updated. Refer to [https://github.com/89luca89/distrobox/blob/main/docs/usage/distrobox-create.md distrobox create] doc for examples.
{{Pre}}
sudo apt install distrobox
distrobox --version # 1.7.0
distrobox create # default is fedora-toolbox:XX
distrobox-create --name ubuntu2404 -i ubuntu:24.04 # same as docker.io/library/ubuntu:24.04
distrobox-create --name arch --pull -i quay.io/toolbx/arch-toolbox:latest
distrobox enter arch # slow on Celeron N3160 Udoo
cat /etc/os-release  # guest
uname -r            # still host
sudo pacman -Syu    # update the entire arch linux system
sudo pacman -S r    # install R
R                    # plotting also works
sudo pacman -S netsurf
sudo pacman -R netsurv
sudo pacman -S vivaldi
sudo pacman -Sy chromium
# Arch Linux Package Search:
# https://archlinux.org/packages/?q=browser&sort=-last_update
# and sort by 'Last Updated'
chromium &            # so prompt is returned
distrobox-list
podman images # list image's size; podman is the default container manager on my debian
              # possibly 'docker images'
distrobox-rm ubuntu2404
</pre>
Use GUI Applications from the Container
<pre>
apt install x11-apps -y
xeyes
</pre>
<li>'''add-apt-repository command not found''' in Ubuntu box. This happened when I try to run a command like "sudo add-apt-repository ppa:rvm/smplayer".
<pre>
sudo apt update
sudo apt install soft-properties-common
</pre>
<li>List of compatible images and container managers, [https://github.com/89luca89/distrobox/blob/main/docs/compatibility.md#containers-distros Compatibility] page.
<li>Some images works fine on my distrobox 1.7.0
* quay.io/toolbx/arch-toolbox:latest
* docker.io/library/archlinux:latest
* registry.fedoraproject.org/fedora-toolbox:35
* docker.io/library/debian:bullseye-backports
* quay.io/toolbx-images/debian-toolbox:12
<li>Change the default container manager. distrobox-create --help.
<pre>
DBX_CONTAINER_MANAGER="docker"
</pre>
<li>distrobox-export --app XXX
* This is to export an application to the host system
* It seems there is no way to undo it. We need to enter the guest OS, remove the app and then remove the guest OS from the host.
</ul>
=== Atoms ===
* Easily manage Linux Chroot(s) and Containers with Atoms. https://github.com/AtomsDevs/Atoms (421 stars)
* [https://www.linuxlinks.com/useful-free-open-source-distrobox-gui-tools/ 4 Useful Free and Open Source Distrobox GUI Tools]
=== BoxBuddy ===
* https://www.dvlv.co.uk/BoxBuddyRS/ & https://github.com/Dvlv/BoxBuddyRS. Currently it is 2.5.5 (443 stars)
* [https://www.linuxlinks.com/boxbuddy-graphical-manager-distrobox/ BoxBuddy – graphical manager for Distrobox]
* The advantage is it includes a list of all distributions. Users only need to select one and enter a name for the 'box'.
* Install by '''flatpak install flathub io.github.dvlv.boxbuddyrs''' (no need to download flatpakref file)
* How does the software keep an updated list of images?
* Tested:
** install Debian12,
** install sublime deb inside Debian12 through host's right click button. Sublime can be launched too from "View Applications".
** Upgrade my arch Box (rolling release) works
== QuickEmu (Non Docker approach) ==
See [[KVM#QuickEMU|KVM - QuickEmu]]/


= Guacamole =
= Guacamole =
* Guacamole is nothing more than a centralized front end to access multiple VNC/RDP devices. You are still using either VNC or RDP to access the device.
* Probably there is no point to use Guacamole if the VM was created in Proxmox since Proxmox provides a web interface to access the VM.
* Probably there is no point to use Guacamole if the VM was created in Proxmox since Proxmox provides a web interface to access the VM.
* [https://youtu.be/DGw6P5Lkj-U Guacamole Remote Desktop - Open Source, Self Hosted remote access to your machines in the browser!] (video). https://github.com/jwetzell/docker-guacamole
* [https://youtu.be/DGw6P5Lkj-U Guacamole Remote Desktop - Open Source, Self Hosted remote access to your machines in the browser!] (video). https://github.com/jwetzell/docker-guacamole
** One line script to install Docker-CE, Docker-Compose, Portainer-CE (not needed), and NGinX Proxy manager (not needed)
** Once creating docker-compose.yml, we can fire up it using '''docker-compose up -d'''
** We can create a new admin user and delete the default username/password guacadmin/guacadmin
** Open a browser tab and go to the IP:Port to open guacamole web page
** We can add various connections (Kubenetes/RDP/SSH/Telnet/VNC). After that, we can run connections through our web browser.
** After saving the new connection, go back to "Home" to use the new connections.
* [https://youtu.be/Mjrj6tdj1wo Guacamole Remote Access Gateway on Docker] (video). https://github.com/boschkundendienst/guacamole-docker-compose works fine. Your guacamole server should now be available at '''https'''://ip:8443/. The default username is '''guacadmin''' with password '''guacadmin'''. Four containers will be launched: nginx, postgres, guacamole and guacd.
* [https://youtu.be/Mjrj6tdj1wo Guacamole Remote Access Gateway on Docker] (video). https://github.com/boschkundendienst/guacamole-docker-compose works fine. Your guacamole server should now be available at '''https'''://ip:8443/. The default username is '''guacadmin''' with password '''guacadmin'''. Four containers will be launched: nginx, postgres, guacamole and guacd.
* [https://youtu.be/tg1CbMEzCsc How To Access Your PCs and Servers from Anywhere Using Guacamole and CloudFlare Tunnels]
* [https://youtu.be/tg1CbMEzCsc How To Access Your PCs and Servers from Anywhere Using Guacamole and CloudFlare Tunnels]


== Webtop: Linux desktop in a browser ==
== Webtop: Linux desktop in a browser ==
* https://hub.docker.com/r/linuxserver/webtop/. Ubuntu, Alpine, Arch, and Fedora based Webtop images, Linux in a web browser supporting popular desktop environments.
* https://hub.docker.com/r/linuxserver/webtop/, or https://github.com/linuxserver/docker-webtop. Ubuntu, Alpine, Arch, and Fedora based Webtop images, Linux in a web browser supporting popular desktop environments.
* An example. It seems the host's Disk space, Memory are all passed to VM. In this example, the host's directory "/tmp/downloads" will serve as the HOME directory in VM.
:<syntaxhighlight lang='sh'>
mkdir /tmp/downloads/
docker run -d --name=webtop  \
  -e PUID=1000 -e PGID=1000  \
  -e TZ=US/Eastern  \
  -p 3000:3000  \
  -v /tmp/downloads:/config  \
  --shm-size="1gb"  \
  --restart unless-stopped  \
  linuxserver/webtop:ubuntu-xfce
</syntaxhighlight>
* [https://www.linuxserver.io/blog/2021-05-05-meet-webtops-a-linux-desktop-environment-in-your-browser Meet Webtops A Linux Desktop Environment In Your Browser]
* [https://www.linuxserver.io/blog/2021-05-05-meet-webtops-a-linux-desktop-environment-in-your-browser Meet Webtops A Linux Desktop Environment In Your Browser]
* [https://youtu.be/bQrtnZ1UrQQ Run Linux Desktops in your Browser with Docker and Webtops!] (video) and [https://shownotes.opensourceisawesome.com/webtops/ Notes]
* [https://youtu.be/bQrtnZ1UrQQ Run Linux Desktops in your Browser with Docker and Webtops!] (video) and [https://wiki.opensourceisawesome.com/books/webtops-for-remote-sessions/page/webtops-linux-desktops-in-docker Notes]
* Default username/password is abc/abc
* Default username/password is abc/abc. But we don't need to enter the password when we use "sudo".
* [https://youtu.be/Gd9bvdkIXOQ Linux desktop, inside of a container, inside of a browser??? Yes. A Webtop], [https://youtu.be/Gd9bvdkIXOQ?t=811 privileged: true] is required for installing something like vscode in VM (video) and [https://docs.technotim.live/posts/webtop-container/ Doc]
* [https://youtu.be/Gd9bvdkIXOQ Linux desktop, inside of a container, inside of a browser??? Yes. A Webtop], [https://youtu.be/Gd9bvdkIXOQ?t=811 privileged: true] is required for installing something like vscode in VM (video) and [https://docs.technotim.live/posts/webtop-container/ Doc]
* If I'm not using the default desktop, I need to switch to use some user's account instead of root to run docker-compose command. If I use root to launch ubuntu-kde, for example, the desktop is blank.
* If I'm not using the default desktop, I need to switch to use some user's account instead of root to run docker-compose command. If I use root to launch ubuntu-kde, for example, the desktop is blank.
Line 247: Line 637:
https://hub.docker.com/r/linuxserver/cloud9
https://hub.docker.com/r/linuxserver/cloud9


== vs code ==
== VS Code ==
* [https://github.com/coder/code-server code-server] VS Code in the browser. https://hub.docker.com/r/codercom/code-server
* [https://www.reddit.com/r/docker/comments/waebx5/development_container_with_visual_studio_code_how/ Development container with Visual Studio code - how does it work?]
 
= Use with R (r-base) & RStudio IDE: Rocker =
<ul>
<li>[https://solutions.rstudio.com/environments/docker/ Docker 101 for Data Scientists] by RStudio </li>
<li>[https://registry.hub.docker.com/_/r-base/ r-base] (Official image, R version is tagged), [https://hub.docker.com/r/rocker/rstudio/tags RStudio]
<ul>
<li>[https://www.rocker-project.org/use/managing_users/ Managing Users] </li>
<li>[https://colinfay.me/docker-r-reproducibility/ An Introduction to Docker for R Users]: how to write your own <Dockerfile>, install packages, run a script and get results.</li>
<li>Extensions from r-base. For example, [https://github.com/rocker-org/rocker/issues/119 r-spatial-base]. It also mentions [https://registry.hub.docker.com/u/rocker/ropensci/ ropensci] container is built upon rocker/rstudio. </li>
<li>The r-base image does not have pdflatex, git. Need to manually install them.</li>
<li>Not sure if the Docker Official Image is the same as the one provided by Rocker Project.</li>
<li>NOTE: Plotting works by forwarding X11. The instruction depends on the host OS. See rocker [https://github.com/rocker-org/rocker/wiki/Allowing-GUI-windows Wiki] or the command below. Creating graphics files inside a container is still OK 👌; see the example [https://jlintusaari.github.io/2018/07/how-to-compile-rmarkdown-documents-using-docker/ How to compile R Markdown documents using Docker].
{{Pre}}
docker pull r-base:3.5.3
docker run -it --rm rocker/drd RD              # a little smaller, 3.6GB for R 4.0
docker run -it --rm rocker/drd R              # good to test the pipe operator (due in R 4.1.0)
docker run -it --rm rocker/r-devel RD          # initial one, larger, 5.7GB for R 4.0
docker run -it --rm rocker/r-devel R          # r-release
docker run -it --rm r-base:3.5.3              # default is root "/"
docker run -it --rm rocker/r-rspm:22.04        # seems the 'latest' tag is missing
docker run -it --rm rocker/r-bspm:22.04        # better than r-rspm in the case of 'tidyverse'
                                              # since bspm can take care of missing system OS libraries
                                              # 'Many' Bioconductor packages like DESeq2/limma/sva are avail
docker run -v ~/Downloads:/src -it --rm r-base # /src does not exist
docker run -v ~/Downloads:/home/docker -it --rm r-base # /home/docker exists and is empty by default
                                              # setwd("/home/docker")
docker run -it --rm -u1000:1000 -e DISPLAY=$DISPLAY \
          -v /tmp/.X11-unix:/tmp/.X11-unix \
          -v $(pwd):/work -w /work r-base
 
docker run -it --rm -p 8787:8787 \
      -v $(pwd):/home/rstudio/project \
      -e PASSWORD=mypassword \
      -w /home/rstudio/project rocker/tidyverse
 
# Disable authorization
docker run -it --rm -p 8787:8787 \
      -v $(pwd):/home/rstudio/project \
      -e DISABLE_AUTH=true \
      -w /home/rstudio/project rocker/tidyverse:4.2
</pre>
The "-u" option causes an error "s6-supervise (child): fatal: unable to exec run: Permission denied" (2/19/2023). According to the [https://rocker-project.org/images/versioned/rstudio.html rocker/tidyverse] documentation, '''the non-root default user rstudio is set up as RStudio Server user.''' So it is not needed to use a different username.
<pre>
docker run -ti --rm -v "$PWD":/home/docker -w /home/docker \
      -u docker r-base bash  # Non-root user
 
docker run -ti --rm -v "$PWD":/home/rstudio -w /home/rstudio \
      -u rstudio rocker/rstudio bash  # Non-root user
</pre>
</li>
</ul>
</li>
</ul>
* Dirk.eddelbuettel
** slides http://dirk.eddelbuettel.com/presentations/
** http://dirk.eddelbuettel.com/papers/useR2014_keynote.pdf
** http://dirk.eddelbuettel.com/papers/r_and_docker_sep2014.pdf
** [http://dirk.eddelbuettel.com/blog/2014/10/23/ Introducing Rocker: Docker for R]
** [http://dirk.eddelbuettel.com/blog/2019/08/05/#023_rocker_debug_example Debugging with Docker and Rocker – A Concrete Example helping on macOS]
** [https://arxiv.org/abs/2001.10641 The Rockerverse: Packages and Applications for Containerization with R]
** [https://github.com/rocker-org/rocker/tree/master/r-bspm #29: Easy, Reliable, Fast Linux CRAN Binaries via BSPM], [https://github.com/rocker-org/rocker/tree/master/r-bspm Source] on Github
* [https://www.rocker-project.org/ The Rocker Project] (<strike>only has the latest version</strike>)
** https://github.com/rocker-org/rocker Github repository
** [https://github.com/rocker-org/rocker-versioned/blob/master/VERSIONS.md R, MRAN, RStudio Server versions correspondance]
** [https://github.com/rocker-org/rocker-versioned/blob/master/r-dependencies.md What dependencies are included in included in r-ver?]
* RStudio server recommends 8GB memory. So I cannot use it in Play with Docker.
* [https://github.com/rocker-org/rocker/wiki/Using-the-RStudio-image Using the RStudio image] includes the official instruction for the latest change. PS the default username is '''rstudio'''. <syntaxhighlight lang='bash'>
docker run -d -p 8787:8787 \
  -e PASSWORD=<password> \
  -v "$PWD":/home/rstudio -w /home/rstudio \
  --name rstudio rocker/rstudio
# mount a local directory, change the username. A new directory /src will be created.
docker run -d -p 8787:8787 \
  -v ~/Downloads:/src \
  -e USER=<username>
  -e PASSWORD=<password> \
  --name rstudio rocker/rstudio
 
# Use R, without RStudio
docker run -it -e DISABLE_AUTH=true rocker/rstudio:3.5.3 R
# Use Bash without RStudio, mount the current directory
docker run -it -e DISABLE_AUTH=true -v $(pwd):/home/rstudio/project rocker/rstudio:3.5.3 bash
 
# '-e ROOT=TRUE' so that I can be root in the Terminal and test some installation steps
# before creating my own derivated Dockerfile
docker run -d -p 8787:8787 -e ROOT=TRUE -e DISABLE_AUTH=true rocker/rstudio:devel
 
# Fix an error when running library(tidyverse): libxml2.so.2 no such file
$ docker exec -it rstudio bash
# apt update
# apt upgrade
# apt install libcurl4-openssl-dev libssl-dev libxml2-dev
</syntaxhighlight>
** [https://github.com/rocker-org/rocker/wiki/Sharing-files-with-host-machine Sharing files with host machine]
** [http://www.magesblog.com/2014/09/running-rstudio-via-docker-in-cloud.html Running RStudio in cloud]
** [https://sbamin.com/blog/2016/02/running_rstudio_in_docker_environment/ Running RStudio in a docker container]
* [http://ropenscilabs.github.io/r-docker-tutorial/ R Docker tutorial] from ropenscilabs. It covers sharing your analysis.
 
== Dockerfile ==
Create a new directory and a new file 'Dockerfile' with the content.
 
<pre>
FROM debian:testing
MAINTAINER Dirk Eddelbuettel [email protected]
## Remain current
RUN apt-get update -qq
RUN apt-get dist-upgrade -y
RUN apt-get install -y --no-install-recommends r-base r-base-dev r-recommended littler
RUN ln -s /usr/share/doc/littler/examples/install.r /usr/local/bin/install.r
</pre>
 
NOTE
# From [https://hub.docker.com/_/r-base r-base] in DockerHub click the "latest" in the "Supported tags and respective Dockerfile links" section.
# I ran into errors when I use the above (short) Dockerfile. But the Dockerfile from rocker (leave out the last line of launching R) works well. The R packages built in the image include 'docopt', 'magrittr', 'stringi', and 'stringr'.
# Install R package is possible when we launch a container. But we are not able to save the packages?? The [https://github.com/rocker-org/rocker/wiki rocker wiki] also mentions something about installing packages.
# See also [https://github.com/rocker-org/rocker/wiki/How-to-save-data How to save data] in wiki.
 
== install2.r ==
The '''install2.r''' command can be used to concisely describe the installation of the R package in the Dockerfile. See
[https://rocker-project.org/use/extending.html Rocker project - Extending images]
 
== A quick run of an R script ==
<pre>
docker run --rm \
  -v $(pwd):/tmp/working_dir \
  -w /tmp/working_dir \
  rocker/tidyverse:latest \
  Rscript my_script.R
</pre>
 
== docker run ==
Note that if we are using the Dockerfile above to create an image, we will be dropped to the Linux shell. If we are pulling the rocker/r-base image from Docker Hub, we will be in R console directly. See the last line of Dockerfile on [https://github.com/rocker-org/rocker/blob/master/r-base/Dockerfile github] website for rocker.
 
Then run the following to do some exercise (We could possibly replace 21b6a9e8b9e8 with your image ID or use ''rocker/r-base''). For simplicity, we can try the [http://cran.rstudio.com/web/packages/colortools/index.html colortools package] first which does not depend on other packages and there is no need to compile the package.
<syntaxhighlight lang='bash'>
sudo docker build -t debian:testing-add-r . # create an image based on the above Dockerfile
wget http://cran.r-project.org/src/contrib/sanitizers_0.1.0.tar.gz
sudo docker run -v `pwd`:/mytmp -t 21b6a9e8b9e8 \
    R CMD check --no-manual --no-build-vignettes /mytmp/sanitizers_0.1.0.tar.gz
sudo docker run -v `pwd`:/mytmp -t 21b6a9e8b9e8 \
    Rdevel CMD check --no-manual --no-build-vignettes /mytmp/sanitizers_0.1.0.tar.gz
 
sudo docker search eddelbuettel
sudo docker pull eddelbuettel/docker-ubuntu-r  # default tag is 'latest'; actually older than the other tags
sudo docker images eddelbuettel/docker-ubuntu-r # see the tag column
sudo docker pull eddelbuettel/docker-ubuntu-r:add-r # the tag name can only be obtained from hub.docker.com
sudo docker images eddelbuettel/docker-ubuntu-r # see the tag column
sudo docker pull eddelbuettel/docker-ubuntu-r:add-r-devel
sudo docker images eddelbuettel/docker-ubuntu-r # see the tag column
sudo docker run -v `pwd`:/mytmp -t 54d865dbd2c9 R CMD check --no-manual --no-build-vignettes /mytmp/sanitizers_0.1.0.tar.gz
 
sudo docker run -t -i eddelbuettel/docker-ubuntu-r /bin/bash
$ sudo docker images
REPOSITORY                    TAG                IMAGE ID            CREATED            VIRTUAL SIZE
debian                        testing-add-r      21b6a9e8b9e8        28 minutes ago      572.2 MB
ubuntu                        14.04              ed5a78b7b42b        4 days ago          188.3 MB
ubuntu                        latest              ed5a78b7b42b        4 days ago          188.3 MB
debian                        testing            88ba2870bfbe        7 weeks ago        154.7 MB
eddelbuettel/docker-ubuntu-r  add-r-devel        c998a74a1fb4        11 weeks ago        460.4 MB
eddelbuettel/docker-ubuntu-r  add-r              54d865dbd2c9        11 weeks ago        460.4 MB
eddelbuettel/docker-ubuntu-r  latest              a7cd5ddeb98e        5 months ago        515.4 MB
 
sudo docker logs xxxxx                # view the log
sudo docker restart xxxxx
sudo docker exec -it xxxx /bin/bash  # view any changes in R library
sudo docker stop xxxxx
sudo docker rm xxxxx
</syntaxhighlight>
 
[https://hub.docker.com/r/dennishazelett/motifbreakr/ This] is another example of using 'docker run' accompanying [https://github.com/Simon-Coetzee/MotifBreakR MotifBreakR] package.
 
== Testing a new R release ==
[https://twitter.com/eddelbuettel/status/1384510084622032900 R 4.1.0]
<pre>
docker pull rocker/r-base:4.1.0
 
alias dkrr='docker run --rm -it -u1000:1000 -v$(pwd):/work -w /work'
dkrr rocker/r-ubuntu:20.04 bash
dkrr r-base:latest R --version | head -1
dkrr r-base:3.6.3 R --version | head -1
 
# Assume we are in a directory called 'curse'
# (Yes you may need to add Depends and LaTeX support ...)
# Even the 'survival' package requires pdflatex in 'R CMD build' step.
# A toy package like https://cran.r-project.org/web/packages/QuadRoot/ works
dkrr rocker/r-base:4.1.0 R CMD build .  # this will create curse_1.0.0.tar.gz
dkrr rocker/r-base:4.1.0 R CMD check --no-vignettes --no-manual curse_1.0.0.tar.gz
</pre>
A closer solution is to use ''rocker/verse:4.0.4'' image. But it gives different errors
<ul>
<li>survival: LaTeX Error: File `fancyvrb.sty' not found. </li>
<li>glmnet: dependencies ‘foreach’, ‘shape’ are not available. A workaround solution (need to figure out the dependencies first):
<pre>
$ curl -s https://cran.r-project.org/src/contrib/glmnet_4.1-1.tar.gz | tar xzv
$ cd glmnet
$ docker run --rm -it -v$(pwd):/work -w /work rocker/verse:4.0.4 bash
# Rscript -e "install.packages(c('foreach', 'shape', 'knitr', 'lars', 'testthat', 'xfun', 'rmarkdown'))"
# su rstudio
$ R CMD build .
$ exit
# exit
</pre>
If we don't install the 'Suggests' packages, building will fail when it was trying to build the vignette. A more relaxed solution is adding the option '''--no-build-vignettes'''
</li>
</ul>
 
== Testing R packages ==
* [http://cran.rstudio.com/web/packages/RColorBrewer/index.html RColorBrewer] (pure R)
* [http://cran.rstudio.com/web/packages/digest/index.html digtest] (need compile, with vignette) [https://github.com/eddelbuettel/digest github source]
* [http://cran.rstudio.com/web/packages/randomForest/index.html randomForest] (need compile & has suggests RColorBrewer)
 
== Multiple containers ==
* When I run multiple containers at the same time with different ports, only 1 container can be logged in OR reload constantly. The problem happened on Linux host and Mac host.
* It seems to be related to cookies. One can get rid of the problem by open a new container in incognito mode, or '''use a different domain name''' (e.g. localtest.me or modifying your /etc/hosts file) or different browsers.
* [https://github.com/rocker-org/rocker-versioned2/issues/171 Can't login into servers on different ports on the same computer #171]
* [https://github.com/rstudio/rstudio/issues/9175 Issue with RStudio user authentication cookies #9175]
* [https://stackoverflow.com/q/71856297 Running multiple instances of RStudio in Docker]
 
== Docker for R Package Development ==
http://www.jimhester.com/2017/10/13/docker/
 
== A DevOps Perspective ==
* https://www.opencpu.org/posts/opencpu-with-docker/
 
== Reproducible ==
* [https://journal.r-project.org/archive/2020/RJ-2020-007/RJ-2020-007.pdf The Rockerverse: Packages and Applications for Containerisation with R] 2020
** [https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1008316 Ten Simple Rules for Writing Dockerfiles for Reproducible Data Science], [https://github.com/nuest/ten-simple-rules-dockerfiles code in github]
** [https://www.theoj.org/joss-papers/joss.01603/10.21105.joss.01603.pdf containerit: Generating Dockerfiles for reproducible research with R], [https://o2r.info/containerit/ containerit] package with GUI via [https://rstudio.github.io/rstudioaddins/ RStudio Addins].
<ul>
<li>A simple example to produce a PDF report from an Rmarkdown file by using [https://hub.docker.com/r/rocker/verse rocker/verse] image:
<pre>
docker run -it --rm --name pdmr -v $(pwd):/home/docker -w /home/docker \
      --user rstudio rocker/verse:4.0.3 \
      Rscript -e "rmarkdown::render('Example.Rmd')"
</pre>
</li>
<li>[https://datawookie.netlify.com/blog/2019/08/r-docker-and-checkpoint-a-route-to-reproducibility/ R, Docker and Checkpoint: A Route to Reproducibility]
</li>
<li>[https://cran.r-project.org/web/packages/liftr/index.html liftr]: Persistent reproducible reporting by containerization of R Markdown documents. I am not successful running the example in vignette.
{{Pre}}
> render_docker(input)
Sending build context to Docker daemon  6.144kB
Step 1/8 : FROM rocker/r-base:latest
---> 4e232e9b4097
Step 2/8 : MAINTAINER Nan Xiao <[email protected]>
---> Running in f75404db590a
Removing intermediate container f75404db590a
---> ceae0a54648c
Step 3/8 : RUN  rm -f /var/lib/dpkg/available  && rm -rf  /var/cache/apt/*  && apt-get update -qq  && apt-get install -y
  --no-install-recommends    ca-certificates    libssl-dev    libcurl4-openssl-dev    libxml2-dev    git
---> Running in 8a4324cc7c53
W: Failed to fetch http://deb.debian.org/debian/dists/testing/InRelease  Temporary failure resolving 'deb.debian.org'
W: Failed to fetch http://http.debian.net/debian/dists/sid/InRelease  Temporary failure resolving 'http.debian.net'
W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists...
E: The value 'testing' is invalid for APT::Default-Release as such a release is not available in the sources
</pre>
</li>
</ul>
 
== Research papers ==
* [https://github.com/qianhuiSenn/scRNA_cell_deconv_benchmark Evaluation of Cell Type Annotation R Packages on Single-cell RNA-seq Data] 2020
 
== Debugging R memory problem ==
[https://hub.docker.com/r/wch1/r-debug/ Docker image for debugging R memory problems] (valgrind)
 
== Debugging with gcc problem ==
https://twitter.com/eddelbuettel/status/1232341601483182081
 
== More examples ==
* [[#Docker|R -> Docker]]
* [https://www.rplumber.io/docs/hosting.html#docker Plumber] package
 
== Building a Repository of Alpine-based Docker Images for R ==
* [https://velaco.github.io/my-dockerfile-for-r-shiny-based-on-alpine-linux/ Part I]
* [https://velaco.github.io/my-dockerfile-for-r-shiny-based-on-alpine-linux-II/ Part II]
 
== RStudio in Docker – now share your R code effortlessly!. Markdown ==
https://harini.blog/2019/05/25/rstudio-and-rshiny-in-docker/
 
It is interesting the Dockerfile uses '''install2.r''' (R script with a shebang line) from the [https://cran.r-project.org/web/packages/littler/ littler] package to install R packages. See http://dirk.eddelbuettel.com/code/littler.examples.html or [https://hub.docker.com/r/rocker/verse/dockerfile rocker/verse] Dockerfile. But it is not clear how to install private R packages (mount host folder and use install.packages()).
 
Note that the tag name should be lower case; awesomer instead awesomeR.
 
Also got an error when trying to build the image: ''Failed to fetch http://deb.debian.org/debian/dists/stretch/InRelease  Temporary failure resolving 'deb.debian.org' ''.
 
Try it again at home. The ''apt update'' part is OK but I still got a new error: ''Error: installation of package ‘gifski’ had non-zero exit status''
 
(Updated 9-18-2020) Try both the long and short commands using the tag '4.0.2' instead of '3.5.1'. Both work. The report file <example_report.pdf> is generated. In this example, the Rmd file is called through an R file. See [https://github.com/jlintusaari/R-docker-report the source code].
 
== How to manage R package dependencies for shiny app deployment (docker) ==
[https://community.rstudio.com/t/how-to-manage-r-package-dependencies-for-shiny-app-deployment-docker/18593 How to manage R package dependencies for shiny app deployment (docker)]
 
== METACRAN web ==
https://github.com/metacran/metacranweb It works (2019-11-3).
 
== Modified Dockerfile ==
[https://joachim-gassen.github.io/2020/05/checking-your-package-for-compatibility-with-r-4/ Checking your Package for Compatibility with R 4.0.0]
 
== Best Practices for R with Docker ==
[https://hosting.analythium.io/best-practices-for-r-with-docker/ Best Practices for R with Docker]
 
== Warning: unable to load shared object 'R_X11.so' ==
Using rocker/rstudio:4.2 image, I got the following message when I use arrange_ggsurvplots().
<pre>
Warning message:
In grSoftVersion() :
  unable to load shared object '/usr/local/lib/R/modules//R_X11.so':
  libXt.so.6: cannot open shared object file: No such file or directory
</pre>
See https://github.com/rocker-org/rocker-versioned/issues/234, https://issuekiller.com/issues/rocker-org/rocker/81299432.
{{Pre}}
$ ls -l /usr/local/lib/R/modules//R_X11.so
-rwxr-xr-x 1 root root 665128 May  7 00:48 /usr/local/lib/R/modules//R_X11.so
 
$ ldd /usr/local/lib/R/modules//R_X11.so | grep libX
        libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f74b07bb000)
        libXt.so.6 => not found
        libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1 (0x00007f74af598000)
        libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007f74af583000)
        libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f74ad479000)
        libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f74ad46f000)
 
$ cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.4 LTS (Focal Fossa)"
...
</pre>
My solution is
<pre>
$ docker exec -it CONTAINER bash
# apt update
# apt install libxt-dev
</pre>
Another case when I use ggsurvplot()
{{Pre}}
Error in dyn.load(file, DLLpath = DLLpath, ...) :
  unable to load shared object '/usr/local/lib/R/site-library/xml2/libs/xml2.so':
  libxml2.so.2: cannot open shared object file: No such file or directory
</pre>
{{Pre}}
$ ls -l /usr/local/lib/R/site-library/xml2/libs/
total 1404
-rwxrwxr-x 1 rstudio staff 1437536 Jun  3 12:04 xml2.so
 
$ ldd /usr/local/lib/R/site-library/xml2/libs/xml2.so
        linux-vdso.so.1 (0x00007ffd369b0000)
        libxml2.so.2 => not found
        libR.so => /usr/local/lib/R/lib/libR.so (0x00007faf7406a000)
...
</pre>
Applying the same method seems to fix the problem.
 
The above problems happened on my mac computer. When I check the problematic files on my Ubuntu host using ''ldd'', it does not have the same problem (but the path is a little different???)
{{Pre}}
# ls -l /usr/local/lib/R/site-library/xml2/libs/
total 1404
-rwxrwxr-x 1 rstudio staff 1437536 May 22 19:29 xml2.so
 
# ldd /usr/local/lib/R/site-library/xml2/libs/xml2.so
linux-vdso.so.1 (0x00007fff6f51d000)
libxml2.so.2 => /lib/x86_64-linux-gnu/libxml2.so.2 (0x00007facc1dd8000)
libR.so => not found
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007facc1bf6000)
...
</pre>
 
Similar problem when I try to install tidyverse package on top of a rocker/r-rspm:22.04 container. See also [https://github.com/rocker-org/rocker/issues/404 piggy-back on RSPM's system dependency data base #404]. To fix it, run the following in the R session
<pre>
system("apt update")
system("apt-get install libxml2-dev")
</pre>
 
= [http://www.bioconductor.org/help/docker/ Bioconductor] =
(2020-1-30)
<ul>
<ul>
<li>https://bioconductor.org/help/docker/
<li>[https://coder.com/ Coder] - Your Self-Hosted Remote Development Platform
<li>https://hub.docker.com/r/bioconductor/bioconductor_docker (support as early as RELEASE_3_10 with R 3.6.3)
* [https://github.com/coder/code-server code-server] (75.1k star) VS Code in the browser. https://hub.docker.com/r/codercom/code-server (100M+ pulls)
* docker image is 792MB
* current directory is the project path
* access url http://ip:8080
<pre>
<pre>
docker run \
docker run -d --name code-server -p 8080:8080 \
    -e PASSWORD=bioc \
  -v "$HOME/.config:/home/coder/.config" \
    -p 8787:8787 \
  -v "$PWD:/home/coder/project" \
    bioconductor/bioconductor_docker:devel
  -u "$(id -u):$(id -g)" \
 
  -e "DOCKER_USER=$USER" \
docker run -it --user rstudio bioconductor/bioconductor_docker:RELEASE_3_10 R
  -e PASSWORD="MySecretePassword" \
 
  codercom/code-server:latest
docker run -it --user rstudio bioconductor/bioconductor_docker:devel bash
</pre>
</pre>
One case (Bioc 3.14 works with R 4.1.3)
<li>[https://hub.docker.com/r/gitpod/openvscode-server OpenVSCode Server] 1M+ pulls. [https://github.com/coder/code-server/discussions/4267 Difference to OpenVSCode Server].
* [https://docs.linuxserver.io/images/docker-openvscode-server/ linuxserver]
* docker image is 425MB
* ./config/workspace is the project path
* access url http://ip:3000
<pre>
<pre>
docker run -it --name hungry_wiles \
      -v $(pwd):/home/rstudio -w /home/rstudio \
      --user rstudio \
      bioconductor/bioconductor_docker:RELEASE_3_14 R
# q()
# docker restart hungry_wiles
# docker attach hungry_wiles
</pre>
<li>https://github.com/Bioconductor/bioconductor_docker
</ul>
(2019-10-15)
* [https://hub.docker.com/r/bioconductor/bioconductor_full bioconductor_full]
* [https://seandavi.github.io/post/build-linux-r-binary-packages/ Building R Binary Packages for Linux]
[https://medium.com/@nitesh.turaga/how-i-use-bioconductor-with-docker-ca9d17d87771 How I use Bioconductor with Docker], [https://medium.com/@nitesh.turaga/how-i-use-bioconductor-with-docker-part-2-more-memory-faster-bioconductor-with-docker-fd7e69dce2bf Part 2: More memory, faster Bioconductor with Docker]
== [https://github.com/Bioconductor-notebooks/BiocImageBuilder BiocImageBuilder] ==
[http://www.rna-seqblog.com/reproducible-bioconductor-workflows-using-browser-based-interactive-notebooks-and-containers/ Reproducible Bioconductor workflows using browser-based interactive notebooks and containers]
== Bioc Conference ==
* [http://app.orchestra.cancerdatasci.org/ Orchestra]
* [https://github.com/Bioconductor/BiocWorkshops2019/blob/master/README.md Bioc2019 conference]. [http://biocworkshops2019.bioconductor.org.s3-website-us-east-1.amazonaws.com/ Workshopt material]. Before the meeting (6/20/2019) there are 13 downloads and it bumps to 32 downloads after the meeting for [https://hub.docker.com/r/seandavi/bioc_2019 the docker image].
** Download a tarball containing R packages (binary). 605 packages are included. It bundles 605 packages based on R 3.6.0 and Bioconductor 3.10 (BiocManager 1.30.4).
** Run RStudio container. All R packages downloaded in the last step are mounted. (user=rstudio, ps=bioc). That is, built-in is at '''/usr/local/lib/R/library''', custom is at '''/usr/local/lib/R/site-library'''. These two locations are what '''.libPaths()''' gives.
* [http://bioc2020.bioconductor.org/workshops BioC 2020]
** Workshop packages were created using the [https://github.com/seandavi/BuildABiocWorkshop2020?s=09 BuildABiocWorkshop2020] template. From the 'Dockerfile', we see each workshop material is organized as an R package. So each workshop's package is built in the Docker image. There is no need to build the vignette again. NOTE: it takes a while to build the Docker image locally since it requires to compile each R package separately.
** [https://docs.google.com/presentation/d/1xY4-8rTVAv9Z6fVXIv1fAIlZGtvGPN6G5e-bKKPLEx0/ BioC 2020: Where Software and Biology Connect] Opening Remarks
** Take the [https://github.com/LieberInstitute/recountWorkshop2020 recount2 workshop] for example, we don't need to knit the Rmd file. To view HTML vignette, we type '''browseVignettes(package="recountWorkshop2020") ''' and click the link "HTML". In case of the requested page was not found error, add '''help/''' to the URL right after the hostname, e.g., http://localhost:8787/help/library/recountWorkshop2020/doc/recount-workshop.html. Another way to open the HTML without any tweak is type "help(package = 'recountWorkshop2020')" -> User Guide -> HTML.
** [https://biocasia2020.bioconductor.org/workshops Bioc Asia 2020]
** The vignette may not include the R code. So the Rmd file is still needed to understand the content or do a practice.
== single-cell RNA-Seq ==
<ul>
<li>[http://bioinformatics.sph.harvard.edu/knowledgebase/scrnaseq/rstudio_sc_docker.html Docker image with rstudio for single cell analysis] ([https://github.com/hbc/knowledgebase/blob/master/scrnaseq/rstudio_sc_docker.md github]), https://hub.docker.com/r/vbarrerab/singlecell-base. Other images: https://github.com/rnakato/docker_singlecell, https://hub.docker.com/r/leanderd/single-cell-analysis
{{Pre}}
docker run -d -p 8787:8787 \
  --name scrna \
  -e USER='rstudio' \
  -e PASSWORD='rstudioSC' \
  -e ROOT=TRUE \
  -v /home/$USER/Documents/scrna:/home/rstudio/projects \
  vbarrerab/singlecell-base:R.4.0.3-BioC.3.11-ubuntu_20.04
</pre>
If I accidentally reboot the computer, installed packages were not lost. But it is safer to use ''docker stop XXX'' and then run ''docker start XXX''.
</li>
<li>Image containing rstudio + conda + a set of helpful packages for single cell analysis analysis, </li>
<li>[https://hub.docker.com/r/vbarrerab/singlecell-base/tags docker hub], </li>
<li>[https://github.com/vbarrera/docker_configuration/blob/master/docker_singlecell/r_4.0.3_bioc_3.11/Dockerfile Dockerfile] </li>
<li>To use with Portainer, it is better to use [https://www.composerize.com/ composerize] to convert the docker run command into a stack. Note Portainer cannot take version 3.x so I change version to 2. A stack/docker-compose.yml file generated by '''composerize''' with a modification on version number.
<pre>
version: '2'
services:
services:
    singlecell-base:
  openvscode-server:
        ports:
    image: lscr.io/linuxserver/openvscode-server:latest
            - '8787:8787'
    container_name: openvscode-server
        container_name: scrna
    environment:
        environment:
      - PUID=1000
            - USER=rstudio
      - PGID=1000
            - PASSWORD=rstudioSC
      - TZ=America/New_York
            - ROOT=TRUE
      - CONNECTION_TOKEN= #optional
        volumes:
      - CONNECTION_SECRET= #optional
            - '/tmp/scrna:/home/rstudio/projects'
      - SUDO_PASSWORD=password #optional
        image: 'vbarrerab/singlecell-base:R.4.0.3-BioC.3.11-ubuntu_20.04'
      - SUDO_PASSWORD_HASH= #optional
    volumes:
      - ./config:/config
    ports:
      - 3000:3000
    restart: unless-stopped
</pre>
</pre>
Note: the right way to delete a stack is to stop the container, and then delete the container. The final step is to select the stack and remove it.
</li>
<li>
Note that I have 2 pythons installed. One is from the OS (/opt/conda/bin/python) whose version is 3.8.3. The other one is on (/home/rstudio/.conda/envs/sc_env/bin/python) whose version is 3.7.8. The '''$PATH''' variable will show differences.
</li>
<li>Another scRNA-Seq course including a docker image (not tried yet): [https://scrnaseq-course.cog.sanger.ac.uk/website/index.html Analysis of single cell RNA-seq data] (ebook, University of Cambridge Bioinformatics training unit) and the paper [https://www.nature.com/articles/s41596-020-00409-w Tutorial: guidelines for the computational analysis of single-cell RNA sequencing data] Andrews 2020. </li>
</ul>
</ul>


== Cellar: interactive tool for analyzing single-cell omics data ==
= Docker for R (r-base, rstudio) =
[https://github.com/euxhenh/cellar/ Cellar] is an interactive tool for analyzing single-cell omics data. Cellar is built in Python using the Dash framework and relies on several open-source packages.
See [[R_Docker|R Docker]].
 
== Nanopore sequencing ==
[https://github.com/thachnguyen/duesselpore DUESSELPORE Webserver] and the [https://www.biorxiv.org/content/10.1101/2021.11.15.468670v1 paper]


= Docker for Shiny Server =
= Docker for Shiny Server =
Line 725: Line 686:
<li>[https://hosting.analythium.io/user-2022-best-practicesfor-shiny-apps-with-docker-and-more/ UseR!2022: Best Practices for Shiny Apps with Docker and More]
<li>[https://hosting.analythium.io/user-2022-best-practicesfor-shiny-apps-with-docker-and-more/ UseR!2022: Best Practices for Shiny Apps with Docker and More]
<li>[https://hosting.analythium.io/containerizing-interactive-r-markdown-documents/ Containerizing Interactive R Markdown Documents] 2022/7
<li>[https://hosting.analythium.io/containerizing-interactive-r-markdown-documents/ Containerizing Interactive R Markdown Documents] 2022/7
<li>By default, Shiny Server looks for either:
* A single-file Shiny app named '''app.R''' in the root of a directory.
* A pair of files named '''ui.R''' and '''server.R''' within a directory.
<li>[https://datawookie.dev/blog/2022/09/using-shiny-server-in-docker/ Using Shiny Server in Docker] 2022/9/7. Hello world example. Need to generate ''Dockerfile''.
<li>[https://datawookie.dev/blog/2022/09/using-shiny-server-in-docker/ Using Shiny Server in Docker] 2022/9/7. Hello world example. Need to generate ''Dockerfile''.
<pre>
<pre>
Line 858: Line 822:
* Best proxy - traefik, NPM, SWAG, caddy or other?
* Best proxy - traefik, NPM, SWAG, caddy or other?
* [https://github.com/linuxserver/docker-swag swag]
* [https://github.com/linuxserver/docker-swag swag]
* Caddy
** [https://github.com/rocker-org/rocker/issues?q=caddy Rocker], [https://www.rocker-project.org/use/networking/ Networking: tips and tricks] from Rocker


== Nginx proxy manager ==
== Nginx proxy manager ==
* [https://youtu.be/cjJVmAI1Do4 Putting it All Together - Docker, Docker-Compose, NGinx Proxy Manager, and Domain Routing - How To] (video) and [https://shownotes.opensourceisawesome.com/putting-it-all-together/ Notes] 2020-10-06
* [https://youtu.be/cjJVmAI1Do4 Putting it All Together - Docker, Docker-Compose, NGinx Proxy Manager, and Domain Routing - How To] (video) and [https://shownotes.opensourceisawesome.com/putting-it-all-together/ Notes] 2020-10-06
* [https://youtu.be/UfCkwlPIozw Securing NGinX Proxy Manager - follow up - securing your admin console for this Open Source Software] (video) and [https://shownotes.opensourceisawesome.com/securing-nginx-proxy-manager/ Notes] 2020-10-20
* [https://youtu.be/UfCkwlPIozw Securing NGinX Proxy Manager - follow up - securing your admin console for this Open Source Software] (video) and [https://shownotes.opensourceisawesome.com/securing-nginx-proxy-manager/ Notes] 2020-10-20
== Caddy ==
* [https://github.com/rocker-org/rocker/issues?q=caddy Rocker], [https://www.rocker-project.org/use/networking/ Networking: tips and tricks] from Rocker
* [https://youtu.be/tv4A39yDDXs?t=526 Pi-Hosted : Reverse Proxy with Caddy]. We can play Caddy using IP address.
* [https://linuxiac.com/how-to-set-up-caddy-as-reverse-proxy/ How to Set up Caddy as a Reverse Proxy]
* [https://www.youtube.com/watch?v=qj45uHP7Jmo Reverse Proxy And Auto SSL Using Caddy And Docker Compose] (short video). Combine portainer and caddy in one compose.yml file.
= Website analysis =
* [https://www.howtoforge.com/how-to-install-plausible-analytics-with-docker-on-ubuntu-22-04/ How to Install Plausible Analytics with Docker on Ubuntu 22.04]


= Nginx =
= Nginx =
Line 1,133: Line 1,104:
= React =
= React =
[https://www.cloudsavvyit.com/9490/how-to-dockerise-a-react-app/ How to Dockerise A React App]
[https://www.cloudsavvyit.com/9490/how-to-dockerise-a-react-app/ How to Dockerise A React App]
= Java and GlassFish =
[https://www.howtoforge.com/how-to-install-glassfish-application-server-with-nginx-reverse-proxy-on-debian-12 How to Install GlassFish Application Server with Nginx Reverse Proxy on Debian 12]


= Redis =
= Redis =
Line 1,274: Line 1,248:


https://github.com/solidnerd/docker-bookstack
https://github.com/solidnerd/docker-bookstack
= Books =
== Audio Books ==
* [https://www.audiobookshelf.org/ audiobookshelf] (Self-Hosted Audible Alternative)
* [https://www.howtogeek.com/10-docker-containers-every-homelabber-should-run/ 10 Docker Containers Every Homelabber Should Run]
= HDHomeRun =
== tvheadend ==
<ul>
<li>docker-compose.yml. See [https://docs.linuxserver.io/images/docker-tvheadend/ linuxserver/tvheadend]. Open http://localhost:9981 .
<pre>
services:
    tvheadend:
        container_name: tvheadend
        environment:
            - PUID=1000
            - PGID=1000
            - TZ=Etc/UTC
        network_mode: host
        volumes:
            - ./data:/config
            - ./recordings:/recordings
        restart: unless-stopped
        image: lscr.io/linuxserver/tvheadend:latest
</pre>
<li>tvheadend setup. [https://www.youtube.com/watch?v=6Dgjn1IKrFM TVheadend and HDHomeRun using IPTV inputs].
<li>[https://www.youtube.com/watch?v=2Y-E4sQSb94 How to configure tvheadend server].
<li>[https://www.youtube.com/watch?v=Y4gnJRgMB9s How to install Tvheadend server on $40 Android box running Linux]. The configuration allows to scan channels on HDHomeRun.
</ul>


= Media server =
= Media server =
== Jellyfin ==
* https://hub.docker.com/r/jellyfin/jellyfin
* [https://youtu.be/psHLgVzjLhY Jellyfin Update - An amazing, open source, and self hosted media server alternative to Plex or Emby] (video)
* https://docs.linuxserver.io/images/docker-jellyfin (works)
** [https://www.addictedtotech.net/install-jellyfin-as-a-raspberry-pi-media-server/ Install Jellyfin As A Raspberry Pi Media Server – Episode 29]
** https://github.com/linuxserver/docker-jellyfin
* [https://jellyfin.org/downloads/clients/ Official clients]
* [https://youtu.be/aY732cSkopU ULTIMATE Jellyfin Guide - Hardware Acceleration, Codecs (PART 2) ]
* Problems:
** [https://www.reddit.com/r/jellyfin/comments/rf0taf/best_way_to_update_your_library_when_you_make/ Best way to update your library when you make changes to existing files?]. Answer: (manual) Settings - Dashboard - Libraries - Libraries - Scan all libraries, (automatic) scheduled tasks - scan media library (every 12 hour).
** My (downloaded) videos got different video titles.
* Split a large file
** If I already have 3 videos named "Video-part1.mp4", "Video-part2.mp4" and "Video-part3.mp4" (eg coming from DashCam), Jellyfin is smart enough to merge these 3 and shows only one video.
** Or we can use the commands '''ffmpeg''' , which would split the video at 30-minute intervals (1800 seconds) into 3 files : '''ffmpeg -i input.mkv -map 0 -c copy -f segment -segment_times 0,1800,3600 output%03d.mkv'''.
*** output001.mkv: Contains the first 30 minutes of the video (0 to 1800 seconds).
*** output002.mkv: Contains the next 30 minutes of the video (1800 to 3600 seconds).
*** output003.mkv: Contains the remainder of the video (from 3600 seconds to the end).
* [https://www.howtogeek.com/5-reasons-to-run-plex-and-jellyfin-together/ 5 Reasons to Run Plex and Jellyfin Together]
== Youtube downloader ==
== Youtube downloader ==
<ul>
<ul>
<li>[https://www.reddit.com/r/selfhosted/comments/ufxouk/download_youtube_videos_host_locally/ Download YouTube videos, host locally?]
<li>[https://www.reddit.com/r/selfhosted/comments/ufxouk/download_youtube_videos_host_locally/ Download YouTube videos, host locally?]
<li>[https://github.com/alexta69/metube MeTube] (simple but no thumbnails, [https://github.com/alexta69/metube/issues/108 deleted files seem not deleted from the disk]/deleted files from disks are still on the list; no sync),  
<li>[https://github.com/alexta69/metube MeTube],
<pre>
<syntaxhighlight lang='sh'>
mkdir /tmp/downloads # O.W. /tmp/downloads generated by root cannot be written
mkdir /tmp/downloads # O.W. /tmp/downloads generated by root cannot be written
docker run -d -p 8081:8081 \
docker run -d -p 8081:8081 \
  -e DELETE_FILE_ON_TRASHCAN=true \
   -v /tmp/downloads:/downloads \
   -v /tmp/downloads:/downloads \
   --user 1000:1001 alexta69/metube
   --restart always \
  alexta69/metube
# http://localhost:8081
# http://localhost:8081
</syntaxhighlight>
The following example value for "YTDL_OPTIONS" embeds English subtitles and chapter markers (for videos that have them), and also changes the permissions on the downloaded video and sets the file modification timestamp to the date of when it was downloaded (oudated. see examples on
[https://github.com/yt-dlp/yt-dlp?tab=readme-ov-file#usage-and-options yt-dlp] about the current options).
{{Pre}}
docker run -d -p 8081:8081 \
  -v /tmp/downloads:/downloads \
  -e YTDL_OPTIONS='{"writesubtitles":true,"subtitleslangs":["en","-live_chat"],"updatetime":false,"postprocessors":[{"key":"Exec","exec_cmd":"chmod 0664","when":"after_move"},{"key":"FFmpegEmbedSubtitle","already_have_subtitle":false},{"key":"FFmpegMetadata","add_chapters":true}]}' \
  --name metube \
  alexta69/metube
</pre>
</pre>
<li>Chapters and subtitles:
* Testing video: [https://www.youtube.com/watch?v=yG8sFwBISVU Macha Galette].
* In VLC, subtitle is available under "Subtitle" -> "Sub Track" -> "English". The subtitle can be extracted from the downloaded webm files using <syntaxhighlight lang='sh' inline>ffmpeg -i filename.webm -map 0:s:0? subs.srt</syntaxhighlight>. If a video's subtitle is auto-generated by Youtube, then there is no subtitle embedded in the downloaded webm files.
* In VLC, chapters is available under "Playback" -> "Chapter"
<li>[https://github.com/yt-dlp/yt-dlp yt-dlp]
<li>[https://github.com/Tzahi12345/YoutubeDL-Material YoutubeDL-Material]
<li>[https://github.com/Tzahi12345/YoutubeDL-Material YoutubeDL-Material]
</ul>
</ul>
Line 1,299: Line 1,339:


== Plex ==
== Plex ==
[https://github.com/plexinc/pms-docker Official Docker container for Plex Media Server]
* [https://github.com/plexinc/pms-docker Official Docker container for Plex Media Server]
* https://hub.docker.com/r/linuxserver/plex/
* Live tv subtitles/captions: Server -> Settings -> Languages -> Subtitle mode -> Always enabled -> Save Changes.
* [https://www.plex.tv/plex-pass/ Plex Pass] subscription
** [https://support.plex.tv/articles/225877347-live-tv-dvr/ Live tv DVR]
** [https://support.plex.tv/articles/115002178853-using-hardware-accelerated-streaming/ Using Hardware-Accelerated Streaming]
<pre>
---
services:
  plex:
    image: lscr.io/linuxserver/plex:latest
    container_name: plex
    network_mode: host
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=US/Eastern
      - VERSION=docker
      - PLEX_CLAIM= #optional
    volumes:
      - /tmp/plex/library:/config
      - /tmp/plex/tvseries:/tv
    devices:
      - /dev/dri:/dev/dri
    restart: unless-stopped
</pre>


My comment:
== Sonarr, Radarr, Prowlarr ==
* After starting, web browser cannot connect to it
* [https://www.youtube.com/watch?v=LD8-Qr3B2-o Make Automated Torrent Media Server with Emby, Sonarr, Radarr, Prowlarr, and qBittorrent on Windows!]
* [https://www.youtube.com/watch?v=zfYthZrDpVU How to install and configure Sonarr]


== Jellyfin ==
== MoonTV ==
* https://hub.docker.com/r/jellyfin/jellyfin
https://github.com/senshinya/MoonTV
* [https://youtu.be/psHLgVzjLhY Jellyfin Update - An amazing, open source, and self hosted media server alternative to Plex or Emby] (video)
* https://docs.linuxserver.io/images/docker-jellyfin (works)
** [https://www.addictedtotech.net/install-jellyfin-as-a-raspberry-pi-media-server/ Install Jellyfin As A Raspberry Pi Media Server – Episode 29]
** https://github.com/linuxserver/docker-jellyfin


= DNS server =
= DNS server =
Line 1,315: Line 1,377:


[https://www.howtoforge.com/tutorial/how-to-deploy-a-dynamic-dns-server-with-docker-on-debian-10/ How to Deploy a Dynamic DNS Server with Docker on Debian 10]
[https://www.howtoforge.com/tutorial/how-to-deploy-a-dynamic-dns-server-with-docker-on-debian-10/ How to Deploy a Dynamic DNS Server with Docker on Debian 10]
= Update DNS entries: ddclient =
* https://hub.docker.com/r/linuxserver/ddclient/
* https://github.com/linuxserver/docker-ddclient


= WireHole =
= WireHole =
* https://github.com/IAmStoxe/wirehole
* https://github.com/IAmStoxe/wirehole
* [https://youtu.be/DOJ39lyx6Js WireHole: WireGuard, Pi-Hole and Unbound in Docker] (video)
* [https://youtu.be/DOJ39lyx6Js WireHole: WireGuard, Pi-Hole and Unbound in Docker] (video)
= Speed test =
* [[Benchmark#OpenSpeedTest|OpenSpeedTest]]
* [https://github.com/alexjustesen/speedtest-tracker Speedtest Tracker] (3.7k)
** [https://www.howtogeek.com/this-docker-container-turned-my-nas-into-an-internet-performance-dashboard/ This Docker Container Turned My NAS Into an Internet Performance Dashboard]
* https://myspeed.dev/, https://github.com/gnmyt/myspeed (1.4k)
** http://localhost:5216. I need to open the page in incognito mode when using SSH local forwarding.
** For remote access, use '''ssh -L 5216:localhost:5216 username@remoteserver'''
** Visit http://localhost:5216 to access the webpage
** Settings -> Manage Storage -> Speedtest -> Export tests.
* [https://www.youtube.com/watch?v=tBJmhgn3ZOM MySpeed: Speedtest Automation Made Simple!]


= Pi-hole =
= Pi-hole =
<ul>
<ul>
<li>https://hub.docker.com/r/pihole/pihole/, https://github.com/pi-hole/docker-pi-hole
<li>https://hub.docker.com/r/pihole/pihole/, https://github.com/pi-hole/docker-pi-hole
<li>[https://pimylifeup.com/raspberry-pi-pi-hole/ Raspberry Pi Pi-Hole]: A Network Wide Ad-blocker
<li>On Boox Note Air, Settings - Wireless - SSID.
<li>[https://homenetworkguy.com/how-to/install-pihole-on-raspberry-pi-with-docker-and-portainer/ Install Pi-hole on a Raspberry Pi with Docker and Portainer]
* Proxy = None (default)
<li>[https://pimylifeup.com/pi-hole-docker/ Running Pi-Hole as a Docker Container]. Ubuntu.
* IP Settings - Static. Enter desired IP address & Gateway & DNS1 & DNS2.
* (Ubuntu) The command to disable the [https://wiki.archlinux.org/title/Systemd-resolved Systemd-Resolve] Service (Network Name Resolution manager) seems to be outdated. '''sudo systemctl stop systemd-resolve''' returns a message ''Failed to stop systemd-resolve.service: Unit systemd-resolve.service not loaded.''
<li>[https://pimylifeup.com/raspberry-pi-pi-hole/ Raspberry Pi Pi-Hole]: A Network Wide Ad-blocker (old)
* It looks ''sudo systemctl status systemd-resolved'' still works in Ubuntu 22.04
<li>Default domain on the blocklist is 101k.
* Before deploying pi-hole, run the following commands ([https://jeremygotcher.com/2022/12/28/ubuntu-22-04-docker-portainer-pi-hole/ Ubuntu 22.04, Docker, Portainer, Pi-Hole]):
<li>[https://www.youtube.com/watch?v=AwLq__HlTzA A Beginner's Guide to Pihole] (2025)
<pre>
* Adding New Blocklists: Lists - (go to https://firebog.net and copy some) - Add to blocklist. Then go to Tools - Update Gravity.
sudo systemctl stop systemd-resolved
* Blocking Specific Domains: Domains - domain management - Add to denied domains
sudo systemctl disable systemd-resolved
* Adding Allowed Domains: Domains - domain management - Add to allowed domains
</pre>
* Exporting/Importing Pi-Hole Settings: Settings - Teleporter
<li>[https://www.how2shout.com/linux/how-to-install-pi-hole-on-docker-network-wide-ad-blocking/ How to install Pi-hole on Docker – Network-wide Ad Blocking]
<li>[https://youtu.be/cE21YjuaB6o?si=vivzwAdmIfjH7Pvx&t=1927 Unbound installation and configuration] from the [https://www.crosstalksolutions.com/the-worlds-greatest-pi-hole-and-unbound-tutorial-2023/ World's Greatest Pi-hole Tutorial - Easy Raspberry Pi Project!] (2023)
<pre>
<li>[https://www.youtube.com/watch?v=e_EfmKdP2ng Pi-hole Made EASY - A Complete Tutorial]
sudo docker volume create etc-pihole
sudo docker volume create etc-dnsmasq.d
sudo docker run -d --name pihole \
  -p 53:53/tcp -p 53:53/udp -p 67:67 -p 80:80 -p 443:443 \
  -e TZ="Asia/Kolkata"  \
  -v etc-pihole:/etc/pihole/ \
  -v etc-dnsmasq.d:/etc/dnsmasq.d/ \
  --dns=127.0.0.1 --dns=1.1.1.1 --restart=unless-stopped \
  --hostname pi.hole \
  -e VIRTUAL_HOST="pi.hole" \
  -e ServerIP="127.0.0.1" \
  pihole/pihole:latest
</pre>
</ul>
</ul>


= Authelia =
= Authentication =
== Authelia ==
* https://hub.docker.com/r/authelia/authelia Authelia is an open-source authentication and authorization server providing two-factor authentication and single sign-on (SSO) for your applications via a web portal
* https://hub.docker.com/r/authelia/authelia Authelia is an open-source authentication and authorization server providing two-factor authentication and single sign-on (SSO) for your applications via a web portal
* [https://youtu.be/5KtbmrUwYNQ Authelia - Free, Open Source, Self Hosted authorization and authentication for your web applications] and [https://shownotes.opensourceisawesome.com/authelia-authentication/ Notes]
* [https://youtu.be/5KtbmrUwYNQ Authelia - Free, Open Source, Self Hosted authorization and authentication for your web applications] and [https://shownotes.opensourceisawesome.com/authelia-authentication/ Notes]
* [https://helgeklein.com/blog/samba-file-server-web-access-through-filebrowser-with-sso-https/ Samba File Server: Web Access Through Filebrowser With SSO & HTTPS]
* [https://www.youtube.com/watch?v=4UKOh3ssQSU Additional Self-Hosted Security with Authelia on NGINX Proxy Manager] (video)
== Authentik ==
* https://goauthentik.io/
* [https://www.youtube.com/watch?v=enwFWELCYJo Single Sign On With OAuth2.0 - Authentik Is AWESOME!]
* [https://www.youtube.com/watch?v=Nh1qiqCYDt4 Authentik - Application Setup | Nginx Proxy Manager | (Docker/Compose)]
* [https://www.youtube.com/watch?v=KlDJ4K45M_o Authentik - open source, self hosted authentication system with OIDC, SAML, and more...] and [https://wiki.opensourceisawesome.com/books/authentik/page/install-and-setup-authentik written notes].


= Whoogle =
= Whoogle =
Line 1,369: Line 1,443:
** Best practices for writing Compose files
** Best practices for writing Compose files
* [https://www.docker.com/blog/how-developers-can-get-started-with-python-and-docker/ How Developers Can Get Started with Python and Docker]
* [https://www.docker.com/blog/how-developers-can-get-started-with-python-and-docker/ How Developers Can Get Started with Python and Docker]
== Conda ==
* Prebuilt conda image: https://hub.docker.com/r/continuumio/miniconda3, https://hub.docker.com/r/continuumio/anaconda3/
* Conda-Forge Miniforge Images: https://hub.docker.com/r/condaforge/miniforge3
<pre>
# Pull the image
docker pull continuumio/anaconda3
# Run a container from the image
docker run -it continuumio/anaconda3 /bin/bash
# Inside the container, create a new Conda environment
conda create -n myenv python=3.8
# Activate the environment
conda activate myenv
# Install packages
# conda install numpy pandas
conda install numpy=1.21.2 pandas=1.3.3
# Verify installation
conda list
# Remove packages
conda remove numpy
# Run your application
python myscript.py
# Exit the container
exit
# List running containers
docker ps
# Stop a container
# docker stop <container_id>
# Remove a container
# docker rm <container_id>
# Commit changes to a new image
# docker commit <container_id> mynewimage
# Push the new image to a registry
# docker push mynewimage
</pre>


= Python Jupyter including R =
= Python Jupyter including R =
* [https://github.com/jupyter/docker-stacks Jupyter Docker Stacks],  
* [https://github.com/jupyter/docker-stacks Jupyter Docker Stacks],  
* https://registry.hub.docker.com/r/jupyter/datascience-notebook/
* https://registry.hub.docker.com/r/jupyter/datascience-notebook/
* [https://youtu.be/UXxUcZDSNwA How to customize the jupyter/datascience-notebook container with docker-compose].
* [https://youtu.be/UXxUcZDSNwA How to customize the jupyter/datascience-notebook container with docker-compose]. Change the $PWD below for your case.
<pre>
<pre>
docker run --rm -p 8888:8888 \
docker run --rm -p 8888:8888 \
       -e JUPYTER_ENABLE_LAB=yes \
       -e JUPYTER_ENABLE_LAB=yes \
       -v "$PWD":/home/jovyan/work \
       -v "$PWD":/home/jovyan/work \
       jupyter/datascience-notebook:r-4.0.3
      --name jupyter \
       jupyter/datascience-notebook:r-4.3.1
</pre>
</pre>
Follow the screen output to access the app by going to http://IP:8888/?token=XXXXXX. This will take care of the authentication problem.  
Follow the screen output to access the app by going to http://IP:8888/?token=XXXXXX. This will take care of the authentication problem.  
If we use 'docker compose up -d' method below, we need to use 'docker logs jupyter' to get the URL which includes the token password.
<pre>
version: '3.3'
services:
    datascience-notebook:
        ports:
            - '8888:8888'
        environment:
            - JUPYTER_ENABLE_LAB=yes
        volumes:
            - '"$PWD":/home/jovyan/work'
        container_name: jupyter
        restart: unless-stopped
        image: 'jupyter/datascience-notebook:r-4.3.1'
</pre>


This includes python3, Julia 1.0.0 and R. However, the R version is pretty old if we don't specify the tag.
This includes python3, Julia 1.0.0 and R. However, the R version is pretty old if we don't specify the tag.
Line 1,404: Line 1,543:
* https://hub.docker.com/r/freshrss/freshrss/
* https://hub.docker.com/r/freshrss/freshrss/
* [https://hub.docker.com/r/linuxserver/freshrss/ FreshRSS]
* [https://hub.docker.com/r/linuxserver/freshrss/ FreshRSS]
= Read it later/Pocket =
<ul>
<li>[https://lifehacker.com/tech/mozillas-pocket-app-is-shutting-down How to Export Your Saved Articles Before Pocket Shuts Down for Good]
<li>[https://www.androidpolice.com/pocket-is-dead-here-are-alternatives-to-save-links-instead/ Pocket is dead: Here are 6 alternatives to save links instead]
<li>[https://wallabag.org/ Wallabag]
* https://hub.docker.com/r/wallabag/wallabag
* (YT) [https://www.youtube.com/watch?v=OoTMoKtSOaI Wallabag - Save Web Pages for Later on Docker]
<li>(Not self-hosted) [https://raindrop.io/ Raindrop.io] and [https://www.instapaper.com/ Instapaper].
<li>[https://www.linuxlinks.com/karakeep-self-hostable-bookmark-everything-app/ Karakeep is a self-hostable bookmark-everything app]
<li>[https://github.com/omnivore-app/omnivore Omnivore]
</ul>


= Home Assistant =
= Home Assistant =
* [https://www.youtube.com/watch?v=42gopfIrPBY&list=PLGk2on7ccZOMMdaljjX8jeDpWhJGPzrcs&index=1&t=331s Install Proxmox and virtualize Home Assistant]
* [https://www.youtube.com/watch?v=42gopfIrPBY&list=PLGk2on7ccZOMMdaljjX8jeDpWhJGPzrcs&index=1&t=331s Install Proxmox and virtualize Home Assistant]
* [https://www.makeuseof.com/build-cheap-wireless-security-camera/ How to Build a $10 Wireless IP Security Camera for Your Home]
* [https://www.makeuseof.com/build-cheap-wireless-security-camera/ How to Build a $10 Wireless IP Security Camera for Your Home]
* [https://www.howtogeek.com/how-i-back-up-my-home-assistant-server-to-icloud-google-drive-and-more/ How I Back Up My Home Assistant Server to iCloud, Google Drive, and More]
* [https://www.howtogeek.com/how-i-kickstarted-my-home-assistant-smart-home-at-ikea-for-cheap/ How I Kickstarted My Home Assistant Smart Home at IKEA for Cheap], [https://www.howtogeek.com/you-should-be-binding-your-smart-home-switches-bulbs/ You should be binding your smart home switches and bulbs, just in case]


= Password manager =
= Password manager =


== Vaultwarden ==
== Settings ==
[https://youtu.be/mq7n_0Xs1Kg Vaultwarden - Open Source, self hosted backend for the Bitwarden password manager] (video)
[https://www.makeuseof.com/important-password-manager-settings/ These Are the 7 Password Manager Settings That Actually Matter]
 
== Bitwarden ==
* [https://www.youtube.com/watch?v=FSme38DPnak 一键部署 Bitwarden 密码管理器!完全开源,支持跨平台使用,100% 安全又可靠,密码自己掌控]
* [https://youtu.be/mq7n_0Xs1Kg Vaultwarden - Open Source, self hosted backend for the Bitwarden password manager] (video)


== KeeWeb: password manager compatible with KeePass ==
== KeeWeb: password manager compatible with KeePass ==
Line 1,420: Line 1,579:
* Padloc is a cloud-based password management solution that allows you to access and use your saved passwords across multiple platforms.  
* Padloc is a cloud-based password management solution that allows you to access and use your saved passwords across multiple platforms.  
* [https://www.howtoforge.com/how-to-install-padloc-password-manager-on-rocky-linux-8/ How to Install Padloc Password Manager on Rocky Linux 8]
* [https://www.howtoforge.com/how-to-install-padloc-password-manager-on-rocky-linux-8/ How to Install Padloc Password Manager on Rocky Linux 8]
= Share passwords =
[https://youtu.be/ImvOmI9El2k Share Password and Secrets Securely! Self-Destructing Messages with PassED (Docker)]


= Flask =
= Flask =
Line 1,440: Line 1,602:
* GetLab專案管理工具
* GetLab專案管理工具
* Jenkins開發版本管理工具
* Jenkins開發版本管理工具
= Notes =
== Obsidian ==
* https://obsidian.md/
* https://github.com/sytone/obsidian-remote (not official)
* [https://www.xda-developers.com/i-self-hosted-obsidian-so-i-can-access-it-in-web-browser-anywhere/ Access Obsidian from anywhere using a browser by self-hosting it]
* [https://www.makeuseof.com/letting-local-llm-organize-obsidian-notes/ I let my local LLM organize my chaotic Obsidian vault and it nailed it]
== Memo ==
* https://github.com/usememos/memos, [https://youtu.be/uxSV8UY5x5Y Memos: The EASY Way to Take Notes]


= Draw.io for diagrams and more =
= Draw.io for diagrams and more =
https://github.com/jgraph/drawio/tree/master/etc/docker
<ul>
<li>https://github.com/jgraph/drawio/tree/master/etc/docker
<pre>
<pre>
docker run -d --rm --name="draw" -p 8080:8080 -p 8443:8443 jgraph/drawio
docker run -d --restart=unless-stopped \
  --rm --name="draw" -p 8080:8080 \
  -p 8443:8443 jgraph/drawio
</pre>
</pre>
<li>To allow to save to devices, the app and the file have to be on the same machine.
<li>It is super easy to install draw.io in Nextcloud (just a few clicks). It is very natural to save the file in the Nextcloud storage.
</ul>
= Internet Archive: ArchiveBox =
* [https://ostechnix.com/self-host-internet-archive-with-archivebox/ How To Self-host Your Own Internet Archive With ArchiveBox In Linux]
* [https://www.maketecheasier.com/turn-raspberry-pi-into-private-internet-archive/ How I Turned My Raspberry Pi Into a Private Internet Archive]


= Internet Archive =
== Linkwarden ==
[https://ostechnix.com/self-host-internet-archive-with-archivebox/ How To Self-host Your Own Internet Archive With ArchiveBox In Linux]
[https://github.com/linkwarden/linkwarden Linkwarden] Bookmark Preservation for Individuals and Teams


= Run a benchmark program on ARM devices =
= Run a benchmark program on ARM devices =
Line 1,457: Line 1,639:


= Set up a Mastodon Instance on Linux =
= Set up a Mastodon Instance on Linux =
[http://www.makeuseof.com/tag/social-network-set-mastodon-instance-linux/ Your Own Social Network: How to Set Up a Mastodon Instance on Linux]
* https://joinmastodon.org/
* [http://www.makeuseof.com/tag/social-network-set-mastodon-instance-linux/ Your Own Social Network: How to Set Up a Mastodon Instance on Linux]
* [https://youtu.be/w_Xgw-UgcDI 3 Amazing Mastodon Clients for you to use to access a truly open social media platform & Fediverse]
* [https://www.usatoday.com/story/tech/2022/11/16/twitter-alternative-mastodon-social-network/8303119001/ What is Mastodon? What to know about the decentralized site some see as a Twitter alternative]
* [https://www.nature.com/articles/d41586-022-03668-7 Should I join Mastodon? A scientists’ guide to Twitter’s rival]


= Bioinformatics tools (Tophat, BWA, et al) =
= Bioinformatics tools (Tophat, BWA, et al) =
Line 1,510: Line 1,696:
* [https://github.com/statping/statping/wiki/Features statping]
* [https://github.com/statping/statping/wiki/Features statping]
* [https://github.com/dgtlmoon/changedetection.io changedetection.io], [https://www.reddit.com/r/selfhosted/comments/wsalyz/changedetectionio_the_selfhosted_website_change/ releases version v0.39.18]
* [https://github.com/dgtlmoon/changedetection.io changedetection.io], [https://www.reddit.com/r/selfhosted/comments/wsalyz/changedetectionio_the_selfhosted_website_change/ releases version v0.39.18]
** [https://youtu.be/SmUDirCSaoE ChangeDetection.io with Browser Agent Support in Docker]
* [https://www.makeuseof.com/best-website-change-detection-tools/ The 7 Best Free and Paid Website Change Detection Tools]
= AI =
== Grammarly alternative ==
[https://www.howtogeek.com/run-your-own-private-grammarly-clone-using-docker-and-languagetool/ Run Your Own Private Grammarly Clone Using Docker and LanguageTool]
= CasaOS =
* https://casaos.io/, [https://wiki.casaos.io/en/guides Wiki] (Very limited)
* https://blog.casaos.io/ Blog and new release announcement
* [https://docs.zimaboard.com/docs/Self-Deploying-Applications.html Self-Deploying-Applications] from Zimaboard.
* I installed CasaOS in Proxmox using Debian 12 LXC. I allocated 40GB space and 4GB ram. The memory can be increased without a need to shut down the LXC.
* Files app is similar to NextCloud but it can connect to cloud storage like Google Drive, Dropbox and OneDrive. It can also connect to other network storage something like smb://192.168.1.1
* I guess we are supposed to use CasaOS in a full screen model. The backward button in the browser will possibly quit CasaOS.
* Portainer, Uptime Kuma, Wireguard Easy are some of apps in the App Store.
* CasaOS can expand their App Store.
** Custom installer is another option; we can use Docker Compose or Docker CLI.
** "Add Source". [https://awesome.casaos.io/content/3rd-party-app-stores/list.html Store list]. After I copy/paste CasaOS-LinuxServer-AppStore '''https://casaos-appstore.paodayag.dev/linuxserver.zip''' and click "Add +" button it immediately shows 226 apps. That is cool! It includes Firefox, Chromium, Opera. I installed FF but when I use the web interface of FF on my Android tablet, I could not scroll. FreshRSS not working on my tablets. Firefox and Chromium are hard to use on my tablet.
** Apps are using ports other than 80. Clicking on an app (eg Snapdrop was changed to use port 88 instead of 80) sometimes opened a tab with a port 80. So the launching is not successfully. We need to click on each app's Settings and find out what the port it uses and modify the port on the Web UI field and 'Save'.
** Kasm not working.
** Snapdrop. I can't see other devices? [https://docs.linuxserver.io/images/docker-pairdrop/ pairdrop] from linuxserver.io works.
** OpenSpeedTest & librespeed/speedtest works but gave quite different results than speedtest.net
** [https://www.helpwire.app/blog/rdesktop-linux/ Rdesktop]. It is [https://youtu.be/jt_C3cStfAA?si=Mp-4UpV30Gn3lKVw&t=22 adding a desktop environment to your server]. So the IP should be IP:3389 when we use Remmina for example. The username/password is abc/abc. For example, I allocate 40GB to CasaOS and the remote desktop will show 40GB disk space for the server. The desktop includes the Chromium browser. We can connect to internet using the Chromium browser.
** [https://docs.linuxserver.io/images/docker-webtop/ Webtop] ([https://wiki.opensourceisawesome.com/books/webtops-for-remote-sessions/page/webtops-linux-desktops-in-docker video]) is based on KasmVNC. Webtops is a project where you can setup a variety of Linux desktops, with a variety of Desktop Environments in Docker, and access them through a web browser! The screen/desktop is synchronized across devices. So we can use our tablet device as a monitor and our mouse and keyboard are still connected to our desktop computer. Interesting! But no internet connection? The font size on the desktop changes with the connected devices. The default distro is Arch Linux.
** AdGuard: when I installed it, '''the default port for dashboard is 80'''. I changed it to 3000. But after the setup, the port 3000 is not working. Check the setting from CasaOS, it shows 3001. So the change of port in the initial set up was not taken (I ssh into the server and use '''ss''' to check open ports) though admin account was saved. The port 3001 is actually working. It works when I tested on a Android tablet (use only AdGuard IP as the only DNS, not including 1.1.1.1 or else). See [https://youtu.be/u9ylq5Gry_A?si=THSqnh84_VtdFhLv Adguard Home Installed on Docker] video for AdGuard setup.
** ddclient, Duckdns, Duplicati, [https://github.com/healthchecks/healthchecks healthchecks] (A watchdog for your cron jobs).
* [https://icewhale.community/t/casaos-tailscale-seamless-home-network-integration-remote-access-to-your-data/84 CasaOS+Tailscale: Seamless Home Network Integration + Remote access to your data]

Latest revision as of 17:30, 29 November 2025

Homelab

Top/best

Templates

LXC != VM

  • When I try to run a seafile docker in LXC, I got an error.
    error during container init: open sysctl net.ipv4.ip_unprivileged_port_start file: reopen fd 8: permission denied
    

    Why it happens: The Seafile Caddy image tries to make itself able to bind to ports <1024 without root.

  • LXC vs full VM
    • LXC containers share the host kernel.
    • By default, LXC limits certain sysctls and capabilities, especially ones that can affect networking or security, like net.ipv4.ip_unprivileged_port_start.
    • In a normal VM (like a full Proxmox KVM VM), the container would have its own kernel, so this wouldn’t be blocked.
  • Privileged vs. unprivileged LXC: Pick your poison. Here's how I run Docker in an LXC on Proxmox, and why it's a solid alternative to a VM

App store

Tipi

Dockerizing Compiled Software

Crontab

Install macOS

Raspberry Pi servers based on Docker

Data Science

Data Science

Illumina BaseSpace

Bioinformatics analyses

Cloud provider

Docker can be deployed on any cloud provider like Digital Ocean, Amazon Web Services (AWS), Microsoft Azure, Google Cloud Computing.

Notification

Gotify

  • https://gotify.net/
  • Gotify: My New Favorite Way To Get Notified!
    • Create an app (e.g. "Uptime" in the Gotify interface). It will automatically create a Token
      • Go to Uptime Kuma - Settings - Notifications - Notification type = Gotify.
      • Copy Gotify application token here.
      • Copy Gotify server URL http://xxx.xxx.x.xxx:8010
      • Do a test
      • Gotify shall show` a notification on the app "Uptime"
    • Create another app called "watchTower"
      • WatchTower is launched through a docker compose
      • Docker compose file can specify notification settings. It can receive notifications from many apps.

Dashboard

Homelab Dashboard: What It Is and Why You Need One

Homepage

  • https://github.com/gethomepage/homepage
  • How-to:
    nano compose.yml # copy from https://github.com/gethomepage/homepage
                     # remember to the URLs on HOMEPAGE_ALLOWED_HOSTS 
    mkdir config     # it's ok the folder is empty
    docker compose up -d
    nano config/services.yaml  # modify for our need
    nano config/bookmarks.yaml # modify for our need
  • Tip:
    • By default, port 3000 is used.
    • If I want to use port 80, make sure DO NOT INCLUDE ":80" to HOMEPAGE_ALLOWED_HOSTS in the compose.yml since browsers usually send the request with the Host header as just "homepage.local" (without ":80").
    • To include pihole as a widget in the dashboard, I need to modify services.yaml. I also need to get the pihole api from Settings -> api. The api key is needed in order to access pihole statistics.
  • Files under the config folder
    $ ls -t config/*.*
    settings.yaml  widgets.yaml  bookmarks.yaml  services.yaml  docker.yaml  kubernetes.yaml  custom.css  custom.js
    

    It seems the most important ones are services.yaml and bookmarks.yml. Homepage automatically creates default/skeleton config files on first run inside /app/config if they do not already exist.

  • Icons
    • Icons can be specified by names. They are obtained from https://dashboardicons.com/.
    • Local icons can be placed in a new folder 'icons' and use -v ./icons:/app/public/icons in docker command. Recall Homepage's web root is /app/public.
    • Icons can be specified by using the way "/icons/myicon.png" in config/services.yaml file.
    • Icons can be specified by full URLs.
    • To download some website's favicon file, go to the source of a website and search for "icon". Alternatively, use a web tool.
    • Supported formats: .ico, .png, .svg, .webp
    • Use docker compose restart homepage to see its effects.
  • Widgets
  • To hide the CPU usage, RAM, storage, and the search box in your Homepage dashboard, modify config/widgets.yaml file. If you want to hide the entire "resources" section, you can simply remove or comment out the entire - resources: block from your widgets.yaml.
  • (Related to hide CPU/RAM/Storage/Search) To hide a horizontal bar at top (related to the header section), modify config/settings.yaml file by adding a line: headerStyle: none
  • Examples :

Dashy

docker run -d \
  -p 8295:80 \
  --volume /home/$USER/dashy/public/conf.yml:/app/public/conf.yml \
  --volume /home/$USER/dashy/icons:/app/public/item-icons/icons \
  --name dashy \
  --restart=unless-stopped \
  lissy93/dashy:latest

Glance

Flame

https://github.com/pawelmalak/flame

Homer

Uptime Kuma

  • Docker, Github
  • Uptime Kuma Docker Setup Guide: Installation and Configuration
  • Uptime Kuma | Fancy service and server monitoring (Video)
  • Since I like to use Uptime Kuma to monitor servers using IPs from my tailscale, I need to expose host's network to the container. That is, I would use something like "docker run -d --network host louislam/uptime-kuma" or
    services:
      uptime-kuma:
        image: louislam/uptime-kuma:1
        container_name: kuma
        volumes:
          - ./data:/app/data
        network_mode: "host"  # Use host network mode
        restart: always
    

    Note

    • In host network mode, the container shares the network stack of the host directly, bypassing Docker's network isolation.
    • The container can access all host network interfaces directly.
    • Any ports exposed by the container are automatically accessible on the host without explicit port mapping.
    • Port mapping is not applicable when the container is using host network. In host network mode, the container shares the network stack of the host system directly, bypassing Docker's network isolation.

heimdall

https://github.com/linuxserver/docker-heimdall

Dashboard for monitoring system: grafana

After I change the firewall by adding two ports (9090 & 9100), the docker-compose method of grafana works like a charm.

  • Reboot the host OS will not affect the grafana (assuming we include restart: unless-stopped in the 3 containers). But if we modify docker-compose.yml and run docker-compose down; docker-compose up it will result in data lose and we will need to re-create the admin password and all the setup.

Google keep

Joplin

Google photo

Immich

  • immich - High performance self-hosted photo and video backup solution

PhotoPrism

Document management

Music: Navidrome

Navidrome Is the Perfect Self-Hosted Music Server for Raspberry Pi

File server

samba

https://github.com/dockur/samba

services:
  samba:
    image: dockurr/samba
    container_name: samba
    environment:
      NAME: "Data"
      USER: "samba"
      PASS: "secret"
    ports:
      - 445:445
    volumes:
      - ./samba:/storage
    restart: always
  • It works on Linux (smb://192.168.x.x) and Windows (\\\\192.168.x.x\Data)
  • It doesn’t announce itself on the local network, so Windows Explorer or Linux “Files” doesn’t auto-discover it. It’s a networking limitation of Docker by default.
    • Network discovery (SMB browsing) depends on NetBIOS / mDNS broadcasts, which are local-network (Layer-2) broadcast packets.
    • Docker NATs traffic through a virtual bridge. The container cannot announce itself via NetBIOS name service (UDP 137/138) or mDNS.

ownCloud

After I use docker run --rm --name myowncloud -p 81:80 owncloud:8.1, I find I can only access it through http://localhost:81. If I try to access it through another computer by http://xxx.xxx.xx.1:81, the URL is changed back to http://localhost:81 so it failed to load.

nextcloud

Nextcloud looks more modern than owncloud though their interface are very similar. I got the same problem (URL is changed from IP to localhost) when I try to access its web from another computer. Using the IP instead of localhost to finish the initial setup can fix the error.

Note:

  • The first we open the webpage, we need to create the admin username/password.
  • Nextcloud uses owncloud mobile application.
  • Nextcloud includes a small mp4 file. I can use browser to play mp4. Photos files can be opened in browsers too (including slideshow).

Add external storage like SAMBA

To connect to a Samba drive in Nextcloud, you will need to use the External Storage app. This app allows you to mount external storage services, including Samba shares, as directories within your Nextcloud instance. Here are the steps to connect to a Samba drive in Nextcloud:

First, make sure that the External Storage app is installed and enabled on your Nextcloud instance. You can do this by going to the Apps section in the Nextcloud admin panel and searching for the External Storage app. If it is not installed, you can install it from there.

Once the External Storage app is installed and enabled, go to the Settings section in the Nextcloud admin panel and select the External Storages option under the Administration section (Left panel, scroll down to see the app).

On the External Storages page, click on the Add storage button and select SMB / CIFS from the dropdown menu.

In the configuration form that appears, enter the details of your Samba share, including the hostname or IP address of the server, share name, username, and password. You can also specify a subfolder within the share if you only want to mount a specific subfolder.

Once you have entered all of the required information, click on the Save button to save your configuration.

Nextcloud Apps

  • "access through untrusted domain" error. On my Casaos, I found the file /DATA/AppData/nextcloud/var/www/html/config/config.php shows trusted domain is casaos.local:10081. So I just need to change the app's setting in CasaOS to use http://casaos.local:10081 instead of http://IP:10081 to open the page.
  • Audio Player. When I play mp3 files, the web interface does not show a progress bar:(
    $ docker run --rm --name mynextcloud -v ~/Downloads/nextcloudapps:/var/www/html/custom_apps -p 81:80 nextcloud
    # above will create an empty folder ~/Downloads/nextcloudapps (www-data:root)
    $ tar xzvf Downloads/audioplayer-2.3.1.tar.gz -C Downloads/
    $ docker cp Downloads/audioplayer mynextcloud:/var/www/html/custom_apps
    # Go to nextcloud and '+Apps', a new app 'Audio Player' should have shown up.
  • Music. GOOD. The app is from the owncloud team though for some reason the app is not included in owncloud/nextcloud. Yes, a progress bar is shown when I played a song downloaded from Youtube:)
    # No need to create a volume
    $ docker run -d --name mycloud -p 81:80 nextcloud
    
    # Open another terminal
    # Don't download the zip file from github. Get the zip file from the app store
    $ tar xzvf ~/Downloads/music_0.7.0_nc-signed.tar.gz -C ~/Downloads/
    $ docker cp Downloads/music mycloud:/var/www/html/custom_apps
    $ docker exec mycloud chmod -R 0750 /var/www/html/custom_apps
    $ docker exec mycloud chown -R www-data:www-data /var/www/html/custom_apps
    Now open the website. Click the gear icon (Settings) and click "Apps". Find out the 'music' app from the bottom of the list and click the 'Enable' button. A new Music icon will be created next to the Gallery icon at the top. Note: if we want to play music repeatedly, I should not play the music directly from Files. I should click the Music icon at the top and let it start to scan musics. Then once I can play a music from there, it will show two new icons; one is shuffle and the other is loop. To have a persistent data, we can 'run' using
    $ mkdir -p ~/nextcloud/{html,apps,config,data}
    $ docker run -d \
        --name mycloud \
        -p 81:80 \
        -v ~/nextcloud/html:/var/www/html \
        -v ~/nextcloud/apps:/var/www/html/custom_apps \
        -v ~/nextcloud/config:/var/www/html/config \
        -v ~/nextcloud/data:/var/www/html/data \
        nextcloud
    If we like to delete the contain and its unamed volume, run
    $ docker stop mycloud; docker rm -v mycloud
    If we run the container again mounting all volumes, all apps,files,configuration,admin's username & password are kept.
  • PDF viewer. PDF files will be downloaded instead of opening on the browser. This can be easily fixed. Click '+Apps' from the personal settings (the response is slow when I tested using Docker). Search for PDF viewer. Click the 'Enable' button (it will be changed to 'Disable' after that)
  • draw.io. After enable it, we can click the "+" sign and choose "Diagram" to create a new diagram (*.xml).
  • Radio. After enable it, a new "Radio" icon will be shown at the top. Only 20 stations are available from the 'Top'. No response after I clicked "Categories".

Seafile

Copyparty

File manager

Filestash

Filestash – Dropbox-like file manager

File browser