Jump to content

Docker Applications

From 太極

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