Open Source Software
OSS - Open Source Software
Home Media System
Kodi, Jellyfin, Plex and Emby 家庭影音資料庫系統。
Jellyfin
Introduction
Jellyfin is the volunteer-built media solution that puts you in control of your media. Stream to any device from your own server, with no strings attached. Your media, your server, your way.
Installation
With Docker
# Pull the image
docker pull jellyfin/jellyfin
# Create the directories
mkdir {config,cache,video}
#Create the account
addgroup --system jellyfin
adduser --system --ingroup jellyfin jellyfin
# Set the permission
chown jellyfin.jellyfin config cache
# Run the container
docker run -d \
--name jellyfin \
--user $(id -u jellyfin):$(id -g jellyfin) \
--net=host \
--volume $(pwd)/config:/config \
--volume $(pwd)/cache:/cache \
--mount type=bind,source=$(pwd)/video,target=/video \
--restart=unless-stopped \
jellyfin/jellyfin
docker-compose.yaml:
services:
jellyfin:
image: jellyfin/jellyfin
container_name: jellyfin
# Optional - specify the uid and gid you would like Jellyfin to use instead of root
user: jellyfin:jellyfin
ports:
- 8096:8096/tcp
volumes:
- ./config:/config
- ./cache:/cache
- type: bind
source: ./video
target: /video
read_only: true
# Optional - extra fonts to be used during transcoding with subtitle burn-in
- type: bind
source: ./fonts
target: /usr/local/share/fonts/custom
read_only: true
restart: 'unless-stopped'
# Optional - alternative address used for autodiscovery
#environment:
# - JELLYFIN_PublishedServerUrl=http://example.com
# Optional - may be necessary for docker healthcheck to pass if running in host network mode
extra_hosts:
- 'host.docker.internal:host-gateway'
Quick Start
http://SERVER_IP:8096
Plugins
- https://github.com/JavScraper/Emby.Plugins.JavScraper
- 91270/MeiamSubtitles: Emby Server / Jellyfin Server 端字幕插件 ,使用 迅雷影音、 射手网 接口精准匹配视频字幕
新增第三方套件庫位址
- 官方說明:https://jellyfin.org/docs/general/server/plugins/index.html
- danieladov's Repo:
https://raw.githubusercontent.com/danieladov/JellyfinPluginManifest/master/manifest.json - dkanada's Repo:
https://raw.githubusercontent.com/dkanada/jellyfin-plugin-intros/master/manifest.json
控制台 > 附加元件 > 儲存庫 > 新增
安裝附加元件
控制台 > 附加元件 > 目錄 > [選擇要安裝的元件] > Install
直播頻道
刮削器
Storj DCS Cloud Storage
rclone mount
rclone mount storjdcs-jellyfin:media /root/jellyfin/video --vfs-che-mode full --dir-cache-time 1h --no-checksum --no-modtime --rc
rclone mount storjdcs-jellyfin:media /root/jellyfin/video \
--vfs-cache-mode full \
--allow-other \
--dir-cache-time 1h \
--uid=$(id -u jellyfin) \
--gid=$(id -g jellyfin) \
--no-checksum --no-modtime --rc
Refreshing the Local Sync Location
This recursively refreshes the root directory of the Rclone mount to pick up the newly uploaded files in Storj.
rclone rc vfs/refresh -v --fast-list recursive=true
- 掛載時,程式會在前景模式下執行;如果要卸載,直接 CTRL+C。
- 遠端目錄的權限 owner 只能是 root,所以必須修改 docker 的啟動參數,將這行刪除
--user $(id -u jellyfin):$(id -g jellyfin) \。
FAQ
媒體庫封面無法顯示中文。
Solution: 在主機端安裝中文字形
# On the docker host
apt install fonts-noto-cjk
# Adjust the launch command
docker run -d \
...
--volume /usr/share/fonts:/usr/share/fonts \
--volume /usr/share/fontconfig:/usr/share/fontconfig \
...
jellyfin/jellyfin
清除 Browser cache,並重新登入後再試一次。
如果還是顯示不正常,清除 config/metadata/library/ 內的所有目錄,重新掃描媒體庫後再試一次。
ASS 字幕無法顯示中文。
Solution:
- 下載中文字型檔(網頁字型)
NotoSansCJKtc-Regular.woff2,NotoSerifCJKtc-Regular.woff2。下載位址:https://github.com/CodePlayer/webfont-noto/releases - 在主機端 docker 目錄下新增 font/ 資料夾,並將字型檔上傳到該資料夾。
- 修改 docker 啟動檔,在中間處加上這一行
--volume $(pwd)/fonts:/fonts \,重新啟動 container。 - 開啟 Jellyfin 管理界面 > 控制台 > 播放 > Fallback font folder path: /fonts ,Enable fallback fonts: Checked
- Done
rclone 掛載 StorjDCS 發生錯誤:
Fatal error: failed to mount FUSE fs: fusermount: exec: "fusermount": executable file not found in $PATH
Solution:
sudo apt install fuse
OSS & Freewares
OSS List
Good Articles to OSS
網站瀏覽統計分析 (Alternative to Google Analytics)
- Plausible Analytics
- Rybbit Analytics
- GitHub: https://github.com/rybbit-io/rybbit
- Doc: Introduction - Rybbit
Video Conference
Data Backup
- Restic - Commands and tools such as cp, rsync, and unison are excellent for moving data from one location to the other and even for synchronizing data. However, they are not ideal for a differential or incremental backup strategy. They are also not efficient in terms of resource usage. A good backup solution not only performs a full backup, but also examines the objects to see what has changed. It accounts for these changes and saves them accordingly with emphasis on security and efficiency. When it comes to restoration, a viable backup solution should allow for the bulk and granular restoration of files, directories, and objects based on a point-in-time. Restic checks all of the boxes when it comes to a solid backup solution.
- Kopia - 備份路徑支援本地磁碟, Amazon S3, Azure Blob Storage, Google Drive, Cloud storages supported by Rclone,支援快照功能、傳輸加密、跨平台等功能,提供 GUI 與 CLI 介面。
Performance Analytics
Guider - Python-based Tools
- Official: https://iipeace.github.io/docs/guider.html
- How to Install Guider Linux Performance Analyzer on Ubuntu 20.04
Presentation
Make a slide with Markdown
- https://revealjs.com/ Web Presentation
- https://github.com/jdan/cleaver
- https://rabbit-shocker.org/
- https://hackmd.io/ Online-Slide
- moffee: Make Markdown Ready to Present
Prezi - 沉浸式簡報
Remote Control
- RPort: Self-hosted open source remote management solution for Windows & Linux. Intuitive, easy to use inventory management, remote access, script execution, VPN replacement, and much more.
- Rustdesk - Alternative to Teamviewer, Anydesk
Console & Terminal
- tmate: Instantly Share Terminal Session With Other Linux Users
- Web Console
- Terminal Output
Mail Server
- grommunio
- Mail-in-a-Box
- BillionMail - 廣告信郵件系統
- Cloud-Mail - 可使用 Cloudflae + Resend 架設自有域名的郵件伺服器
中文化-多國語言翻譯 Translation
語言翻譯協作平台
中文化資源
Software Router
- OPNSense
- pfSense
- OpenWrt
- RouterOS
- IPFire
- RaspAP is feature-rich wireless router software that just works on many popular Debian-based devices, including the Raspberry Pi.
Linux Firewall
Kiosk
- Porteus Kiosk
- Raspberry Pi Kiosk Mode
Web Benchmark
- Ddosify - High-performance load testing tool
- Apache JMeter is open source software, a 100% pure Java application designed to load test functional behavior and measure performance.
Calendar
Active Directory
- Zentyal - Join Windows® clients to the domain and manage them transparently. No disruption to your users, no user or device CALs.
Cloud Storage
- MinIO offers high-performance, S3 compatible object storage.
- SeaweedFS is a fast distributed storage system for blobs, objects, files, and data lake, for billions of files.
- Nimbus - An open source alternative to Google Drive, One Drive, iCloud, etc.
- PersonalDrive - Self Hosted Google drive alternative
Bootable USB Drive with ISO files
Game OS
影像監視系統
- Shinobi
- Viseron - AI 影像辨識
- Zoneminder
NAS
- TrueNAS CORE
- OpenMediaVault
- Default Login: admin / openmediavault
- Documentation
Forum
Home Lab/Cloud Server
- 5 of the most beginner-friendly home server operating systems
- CasaOS - Your Personal Cloud OS
- Umbrel - Your cloud. In your home.
- 1Panel - Web-based linux server management control panel
- GitHub: https://github.com/1Panel-dev/1Panel
- Doc: 1Panel 文档
- Home Assistant - Open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts.
- Homebridge allows you to integrate with smart home devices that do not natively support HomeKit.
- homepage - 整合了100 種以上各式常用服務 API 的儀錶板首頁
OAuth2/SSO
- Authelia - Protect your applications with Single Sign-On and 2 Factor.
- Authentik - Identity made easy. authentik makes single-sign on (SSO), user enrollment, and access control simple.
- Zitadel - Secure authentication management for your application.
- Keycloak - Open Source Identity and Access Management
- JumpServer is an open-source Privileged Access Management (PAM) tool that provides DevOps and IT teams with on-demand and secure access to SSH, RDP, Kubernetes, Database and RemoteApp endpoints through a web browser.
Audio
File Transfer
- ProjectSend - 檔案分享平台
- Jirafeau - PHP 開發的簡易型檔案傳輸平台,下載期限設定。
- Croc - 點對點即時檔案傳輸,PAKE 加密,支援跨平台,指令模式,支援 Proxy。
- AltSendme - 點對點即時檔案傳輸,端對端加密,跨平台支援,檔案無限制,毋須帳戶認證。
- MicroBin - A secure, configurable file-sharing and URL shortening web app written in Rust.
Database
- Greenplum - 是一種建立在 PostgreSQL 基礎上的大規模平行(MPP)資料倉儲
- ChartDB - Open-source database diagrams editor
- drawDB - Free and open source, simple, and intuitive database design editor, data-modeler, and SQL generator
- Basemulti is a developer-friendly no-code database that allows you to quickly build spreadsheets, management backends, and API interfaces using your favorite database.
SQL Tools
- Beekeeper Studio is a cross-platform SQL editor and database manager available for Linux, Mac, and Windows.
- Lazysql - A cross-platform TUI database management tool written in Go
- Tabularis - 一款開源、跨平台的現代數據庫客戶端。支援 PostgreSQL、MySQL/MariaDB 和 SQLite,內置 AI、MCP 與 Notebook,並支援外掛插件。輕量、原生、高顏值,專為開發者打造。
Business Management
- Odoo
- Zulip - Open-source team chat that helps teams stay productive and focused. Alternative to Slack.
Desktop Tools
- Keyviz - 顯示鍵盤的輸入畫面,可用於教學影片檔製作或線上展示。
Push notification
- ntfy - Send push notifications to your phone or desktop using PUT/POST
- Bark - An iOS App which allows you to push customed notifications to your iPhone.
Network Monitoring
- WatchYourLAN
- Arpwatch
- NetAlertX
- ServiceRadar - A distributed network monitoring system designed for infrastructure and services in hard to reach places
Network Diagnostic Tools
Sniffer
- Sniffnet - 跨平台流量嗅探分析軟體,以 Rust 語言開發。
- Oryx - TUI for sniffing network traffic using eBPF on Linux
- RustNet - 是一款終端 TUI 工具,將每條 TCP/UDP/QUIC 連接關聯到對應程序,通過深度封包檢測識別 HTTP、TLS/SNI、DNS、SSH、QUIC 等協議,無需外部解析器。
Diagnostic Tools
- ttl - Network diagnostic tool that goes beyond traceroute: MTU discovery, NAT detection, route flap alerts, IX identification, and more.
- TraceBar - See your network, hop by hop.
- Netwatch - Real time network diagnostics in your terminal.
- NetSonar - 單機網路診斷視覺化工具
Android stuff
- Termux: 在 Android 手機上使用 Termux 打造你的 Linux 終端
- UserLAnd: UserLAnd 安裝指南:在 Android 上運行 Ubuntu 的簡單方法
- LocalDesktop: Home | Local Desktop | Linux on Android
- Scrcpy - This application mirrors Android devices (video and audio) connected via USB or TCP/IP and allows control using the computer's keyboard and mouse.
IoT
- Home-Assistant - Open-source home automation platform
Note-Taking
- Docs - 文件協作及寫作平台,平替 Notions,協作即時同步,法國與德國政府共同開發。
- Outline - A fast, collaborative, knowledge base for your team built using React and Node.js.
- CodiMD - 台灣人開發的 HackMD 文件協作平台的開放原始碼版本
- Memos - Open Source, Self-hosted, Your Notes, Your Way
- GitJournal - 用 Git 來寫筆記
- Trilium Notes - Build your personal knowledge base, 類似 Obsidian 筆記軟體
- Blinko - 平替 Google Keep 的自架平台
- clin - A TUI note management for Obsidian Valut
KM Management
- Wiki-Go is a modern, feature-rich, databaseless flat-file wiki platform built with Go.
- Docmost - Enterprise-ready Wiki for Modern Teams
Website Builder
- Hugo - 快速網站建置(不需 Apache, Nginx Web Engine),Markdown 格式內容
Gallery/Photos
OSINT 開源情報
- Crucix - 全球即時情報監測網,整合了 AI 與 Telegram。
- World Monitor - 即時全球情報儀表板
- Redroom - Open-Source Geopolitical Intelligence Platform
其他自架(self-hosted)服務
- 測速網站 - LibreSpeed
- UVdesk: A Free and Open-Source Helpdesk Ticket System
- Rundeck - 雲端主機自動化平台
- Alnoda Workspace - 自架雲端開發工作平台(支援各種程式語言),全 Web 介面。
- Redmine - 軟體專案管理平台
- Matrix - An open network for secure, decentralized communication
- PeerTube - An alternative to Big Tech's video platforms
- dataease - 數據分析可視化平台,Tableau 替代。
- Trigger.dev - Open source background jobs with no timeouts
- Puter - The Internet OS! Free, Open-Source, and Self-Hostable
- Automatisch - Open source Zapier alternative, which helps you to automate your business processes without coding. Use our affordable cloud solution or self-host on your own servers.
- MyIP - A Better IP Toolbox, IP 線上工具箱,IP 地理位址檢測,ping 測試,whois 查詢等。
- YOURLS - PHP 開發的短網址平台
- speedtest-tracker - 主機的外網連線定期測速並告警通知。
phpIPAM
Introduction
phpIPAM - Open source IP address management.
phpipam is an open-source web IP address management application (IPAM). Its goal is to provide light, modern and useful IP address management. It is php-based application with MySQL database backend, using jQuery libraries, ajax and HTML5/CSS3 features.
URLs:
- Home: https://phpipam.net/
- API: https://phpipam.net/api/api_documentation/
- Github: https://github.com/phpipam/
Installation
Requirements
- Apache2 webserver with php support or Nginx with php-fpm
- Mysql server (5.1+)
- PHP:
- version 5.3 supported to phpipam version 1.3.1
- version 5.4
- version 7.2 and higher supported from phpipam release 1.3.2
- PHP modules:
- pdo, pdo_mysql : Adds support for mysql connections
- session : Adds persistent session support
- sockets : Adds sockets support
- openssl : Adds openSSL support
- gmp : Adds support for dev-libs/gmp (GNU MP library) -> to calculate IPv6 networks
- ldap : Adds LDAP support (Lightweight Directory Access Protocol – for AD also)
- crypt : Add support for password encryption
- SimpleXML: Support for SimpleXML (optional, for RIPE queries and if required for API)
- json: Enable JSON support
- gettext: Enables translation
- filter : Adds filtering support
- pcntl : Add support for process creation functions (optional, required for scanning)
- cli : Enable CLI (optional, required for scanning and status checks)
- mbstring : Enable mbstring support
- php PEAR support
You can check which php modules are enabled by issuing php -m in command line.
API Develop
Enable API and Create new API Key (code)
By default, the API is Disabled, go to Enable it first.
IPAM Web > Administration > Server management > phpIPAM settings > API: ON
IPAM Web > Administration > API > Create API Key
- App id: devappro (自定義 app 名稱,建議不同的 APP 使用不同的 app_id)
- App code: <系統自動產生一組密鑰>
- App permissions: Read (依實際需求選擇)
- App security: User token (如果連線協定不想用 HTTPS,這裡必須是 User token)
- Transaction locking: No
- Lock timeout: 0
- Nest custom fields: No
- Show links: No
NOTE:
如果 App security 是 User token,表示 API 連線協定使用不加密的 HTTP,這時系統會提示需要變更
config.php的參數。$api_allow_unsafe = true;
API Test with curl
API 使用注意
- 第一次連線,需要先登入 IPAM 的帳號/密碼並取得一組 Token,預設有效期是 6 小時。
- 每次連線 API 時,必須在 header 內包含一組有效的 Token,才能通過認證;否則會顯示 Unauthorized。
- 先前建立的 API Key 與 第一項的 Token 兩個是不一樣的東西,用途也不同。基本上 API Client 開發只會用到 Token。
- Token 一旦超過有效期,有兩種做法可以繼續 API 連線。
- 延展已過期的 Token。
- 以帳密重新取得新的 Token。(注意: 原 Token 將會永久失效)
以帳號取得一組 token: /api/{app_id}/user/
TIP: 相同語法也能用在驗證特定帳密是否有效。
#> curl -X POST --user admin:thisispassword http://10.10.2.207/api/devappro/user/ -i
HTTP/1.1 200 OK
Date: Wed, 15 Jun 2022 05:40:01 GMT
Server: Apache/2.4.6 (CentOS) PHP/5.4.16
X-Powered-By: PHP/5.4.16
Set-Cookie: phpipam=ttm3cg1ctpq1vqn2lv1rht3kl1; expires=Thu, 16-Jun-2022 05:40:01 GMT; path=/; HttpOnly
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-cache
Pragma: no-cache
Content-Length: 116
Content-Type: application/json; charset=utf-8
{"code":200,"success":true,"data":{"token":"7dMGzul08SsPMhDDOK-oZdBk","expires":"2022-06-15 19:40:01"},"time":0.009}
查詢 token 的有效期: /api/{app_id}/user/token_expires/
#> curl -X GET http://10.10.2.207/api/devappro/user/token_expires/ --header "token: 7dMGzul08SsPMhDDOK-oZdBk"
{"code":200,"success":true,"data":{"expires":"2022-06-15 19:44:31"},"time":0.002}
延展 token 有效期: /api/{app_id}/user/
TIP: 每次延展會以 6 小時為限,多次延展也不會超過 6 小時
curl -X PATCH http://10.10.2.207/api/devappro/user/ --header "token: 7dMGzul08SsPMhDDOK-oZdBk"
{"code":200,"success":true,"data":{"expires":"2022-06-15 21:11:37"},"time":0.004}
以 IP 搜尋資料庫: /api/{app_id}//addresses/search/{ip-address}/
# IP is existed.
curl -X GET http://10.10.2.207/api/devappro/addresses/search/10.10.1.8 --header "token: 7dMGzul08SsPMhDDOK-oZdBk"
{"code":200,"success":true,"data":[{"id":"271","subnetId":"22","ip":"10.10.1.8","is_gateway":null,"description":"FAB A-VM Server-VM05","hostname":"TPECIMVM05","mac":null,"owner":null,"tag":"2","deviceId":null,"location":"3","port":null,"note":null,"lastSeen":"2022-06-15 13:30:01","excludePing":null,"PTRignore":null,"PTR":"0","firewallAddressObject":null,"editDate":"2022-06-15 13:30:10","customer_id":null}],"time":0.017}
# IP not found
curl -X GET http://10.10.2.207/api/devappro/addresses/search/10.10.1.7 --header "token: 7dMGzul08SsPMhDDOK-oZdBk"
{"code":200,"success":false,"message":"Address not found","time":0.007}
延伸閱讀
- Perl5 Interface: https://github.com/natxo/phpipam-API
- 11 Best IP Address Management Tools for Linux Network
NextBox Community
NetBox Community 開放原始碼 IPAM 平台,有非常豐富的功能,適合企業中大型網路管理。
- GitHub: https://github.com/netbox-community/netbox
- Wiki: https://github.com/netbox-community/netbox/wiki/Community-Contributions
- Doc: https://deepwiki.com/netbox-community/netbox/1-netbox-overview
- Doc2: https://netboxlabs.com/docs/netbox/installation/
Server Monitor
Server Performance
- Collectd
- Checkmk
- Healthchecks - Healthchecks is a cron job monitoring service. It listens for HTTP requests and email messages ("pings") from your cron jobs and scheduled tasks ("checks"). When a ping does not arrive on time, Healthchecks sends out alerts. 可監控 Cron job,排程時間到若沒有正常執行,也可以收到告警。可以整合任何程式碼或 script 以 HTTP API 方式觸發告警。可以監控某個程式的執行時間是否過長。
- Netdata - Monitor your servers, containers, and applications, in high-resolution and in real-time.
- Beszel 是一個輕量級的伺服器監控平台,包含 Docker 統計資訊、歷史數據和告警功能。
Server UpTime
- Uptime Kuma
- NEMS Linux: NEMS is the Nagios Enterprise Monitoring Server for Single Board Computers
- Gatus: Gatus is a developer-oriented health dashboard that gives you the ability to monitor your services using HTTP, ICMP, TCP, and even DNS queries as well as evaluate the result of said queries by using a list of conditions on values like the status code, the response time, the certificate expiration, the body and many others. The icing on top is that each of these health checks can be paired with alerting via Slack, Teams, PagerDuty, Discord, Twilio and many more. 支援 Line 告警
- BlueWave Uptime
- OneUptime: OneUptime helps you handle incidents, set up on-call rotations, run tests, secure your services, analyze logs, track performance, and debug errors.
- CoolMonitor
- CheckCle: Open-source monitoring platform offering real-time insights into server and service health, incident management, and operational transparency.