CasaOS

command module
v0.4.81 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 38 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

CasaOS

Not affiliated with IceWhale. This is an independent, community-maintained distribution of CasaOS. It is not produced, endorsed, sponsored, certified or supported by Shanghai IceWhale Technology Limited or by any of the upstream CasaOS maintainers.

CASAOS is a trademark of Shanghai IceWhale Technology Limited. The name is used here only to identify the upstream project that this software is a distribution of, as permitted for referential use; no rights in the CasaOS name or logo are claimed, and no affiliation is implied.

The original project is IceWhaleTech/CasaOS. Please do not report problems with this distribution to IceWhale — open them at ReCasaOS/CasaOS/issues.

A personal cloud for the home: a dashboard, an app store, Docker apps, files and shares on your own hardware. This repository is the core service of ReCasaOS, a maintained release of the project after upstream IceWhaleTech/CasaOS stopped shipping in 2025.

Latest release Licence Issues Pull requests

CasaOS dashboard

Install

curl -fsSL https://github.com/ReCasaOS/CasaOS-Install/releases/latest/download/install.sh | sudo bash

One command for every supported system and architecture; the installer detects both at run time. Run it again to upgrade, or use the update button in the dashboard, which follows this distribution's releases.

Migrating from IceWhale's or alvins82's installer works the same way, in place, without uninstalling first. The installer stops and restarts the CasaOS services while upgrading, so back up what matters. Afterwards, cat /var/lib/casaos/fork-release prints the distribution release installed. Do not use get.casaos.io/update after migrating: it installs IceWhale's frozen component bundle over this one.

If the dashboard reports you are on the latest version and never offers an update, run the install command once by hand. Up to v0.4.41, four files shipped here still carried the previous fork's release URLs, and one of them rewrote /etc/casaos/casaos.conf on every install, so a host installed from this distribution polled a feed whose newest release is older than what it was already running. From CasaOS-Install v0.4.42 onwards, re-running the installer corrects the configuration in place, and the update button follows this distribution on its own afterwards.

Everything the installer downloads is verified against a SHA-256 digest before extraction. What is in each release, and how a release is built, is described in CasaOS-Install.

Compatibility

Architectures: amd64, arm64, armv7.

Tested: Debian 12, Ubuntu Server 20.04 and 26.04, Raspberry Pi OS. Reported working by the community: Elementary 6.1, Armbian 22.04. Not fully tested: Alpine, OpenWrt, Arch.

Docker 28 and 29 are tested on every release, and the installer accepts Docker 20 or later (24.0.5 and 20.10.24 were also tried by hand on v0.5.16). The Docker 29 incompatibility that broke the upstream release is fixed here, without the DOCKER_MIN_API_VERSION workaround.

Uninstall
sudo casaos-uninstall

What this distribution changes

Relative to upstream, through alvins82's fork and then here. The full list per release is in CHANGELOG.md.

  • Sharing — Samba shares can be restricted to an account, managed from the dashboard and separate from the CasaOS login; shares convert between guest and account access in place. Upstream shares were world-writable, with files created as root, and Windows 10 and 11 refuse guest SMB entirely. Hosts advertise themselves over mDNS and Windows discovery without SMB1.
  • Apps — The docker-compose.yml of an installed app is editable from its settings, with validation before apply. Apps open inside CasaOS or in a new tab, per app. System package updates run from the dashboard.
  • Storage — External disks form the merged /DATA while the system disk stays out of it; volumes can be renamed; merge mounts are restored across reboots and slow disks.
  • Network — The gateway serves HTTPS with a certificate you supply.
  • Security — Routes that act as root on the host require a token even from loopback. The dashboard no longer sends a machine fingerprint to a third party, and the core no longer carries the helper and configuration entries that pointed at IceWhale's api.casaos.io. The install-time migration script no longer geo-locates the host either: it asked ipconfig.io, then ifconfig.io, for the country on every install and every upgrade in order to pick a download mirror. Migration tools come from GitHub, and the domain is a constant rather than a setting: what it points at is downloaded and run as root without verification.
  • Updater — Update discovery and installation follow this distribution's releases rather than IceWhale's frozen bundle, in the binary, in the shipped configuration samples, and in the setup script that writes the running host's configuration.
  • Platform — Docker 29 and Ubuntu 26 support; every component is built and released from CI, with digests published alongside.
  • Packaging — The Go module is github.com/ReCasaOS/CasaOS, built against the forked github.com/ReCasaOS/CasaOS-Common, so log lines, stack traces and go version -m on the shipped binary name this distribution instead of IceWhale.

Features

  • A dashboard designed for the home: no forms, no configuration files to learn
  • An app store with one-click installs — Nextcloud, Home Assistant, AdGuard, Jellyfin, the *arr stack and more — and any Docker image beyond it
  • File management and network shares that need no technical background
  • Widgets for what you care about: resource usage, app status, storage

Community and contributing

Bug reports and requests go to issues on this repository, whichever component is involved. Pull requests are welcome on any of the component repositories under ReCasaOS; each has its own release workflow, and the installer pins them.

The upstream Discord, wiki and website belong to IceWhale and are not run by this distribution.

Repositories

Repository Role
CasaOS this one: system API, files, shares, updater
CasaOS-UI the dashboard (a submodule here)
CasaOS-AppManagement apps, Compose, the app store client
CasaOS-Gateway reverse proxy in front of every service
CasaOS-UserService accounts and login
CasaOS-MessageBus events between services
CasaOS-LocalStorage disks, volumes, merged storage
CasaOS-Install the installer and the release bundle

Development

This repository builds casaos, the core service. Behind the gateway it serves the /v1 API — system information and power actions, listening ports, the file manager (/v1/file, /v1/folder, /v1/batch, /v1/image), Samba shares and accounts (/v1/samba), cloud drivers, and status notifications from the other services (/v1/notify) — together with a /v2 API generated from api/casaos/openapi.yaml. It also polls this distribution's release feed and runs the installer when the dashboard asks for an update.

Its configuration is /etc/casaos/casaos.conf, created on first run from the sample embedded in the binary. Its database and user data live under /var/lib/casaos, its logs under /var/log/casaos, and the shell helpers it shells out to under /usr/share/casaos/shell. The dashboard is the UI submodule and is built separately.

Go 1.21 or newer is the only requirement; the Go build does not need the submodule.

CGO_ENABLED=0 GOOS=linux go build .
go test ./...

TestPorts reads the host's own listening sockets, so it fails in a container that has none.

Release packages for amd64, arm64 and armv7 are built on a tag by .github/workflows/release.yml, not on a workstation.

History

CasaOS was created by IceWhale as the pre-installed system of the ZimaBoard. Upstream development moved to their proprietary ZimaOS and the open-source project stopped receiving releases in 2025. alvins82 kept it installable — Docker 29, Ubuntu 26, merged storage fixes, SMB discovery — and this distribution started from his v0.4.39 in September 2026, adding the changes above and a release process that no longer depends on a workstation.

alvins82's fork changelog (August 2026)

Upstream credits

CasaOS is the work of IceWhale and its contributors. Their copyright notices are kept throughout the source, as the licence requires, and their contributor list is kept here as it stood.


老竭力

💻 📖 🤔 🚇 🚧 📦 💬 👀

link

💻 📖 🤔 🚇 🚧 💬 👀

太戈

💻 📖 🤔 🚇 🚧 🧑‍🏫 🛡️ 💬 👀

Lauren

🤔 🔍 📆 💬 ⚠️

John Guan

📝 🖋 📖 🤔 📋 🧑‍🏫 💬 👀

David Tippett

📖 🤔 💬

Skaya

🧑‍🏫 💬 ✅ 🌍

AuthorShin

⚠️ 🐛 💬 🤔

baptiste313

🌍

DrMxrcy

⚠️ 🤔 💬

Joooost

🤔

Vitaly Potyarkin

🤔

Bjørn Friese

🤔

Protektor

🐛 🤔 💬

llwaini

📆 ⚠️ ✅

CorrectRoadH

💻 📖

zhanghengxin

💻 📖

Licence

Apache License 2.0 — see LICENSE. CasaOS and the CasaOS logo are marks of IceWhale; this distribution uses the name to say what it is a release of, and nothing more.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package boot runs the module assistant (`casaos module ...`) before anything else of the core is initialised.
Package boot runs the module assistant (`casaos module ...`) before anything else of the core is initialised.
cmd
migration-tool command
* @Author: LinkLeong link@icewhale.org * @Date: 2022-08-23 18:09:11 * @LastEditors: LinkLeong * @LastEditTime: 2022-08-31 14:17:51 * @FilePath: /CasaOS/cmd/migration-tool/main.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.
* @Author: LinkLeong link@icewhale.org * @Date: 2022-08-23 18:09:11 * @LastEditors: LinkLeong * @LastEditTime: 2022-08-31 14:17:51 * @FilePath: /CasaOS/cmd/migration-tool/main.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.
* @Author: LinkLeong link@icewhale.org * @Date: 2022-08-24 17:37:36 * @LastEditors: LinkLeong * @LastEditTime: 2022-08-24 17:38:48 * @FilePath: /CasaOS/interfaces/migrationTool.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.
* @Author: LinkLeong link@icewhale.org * @Date: 2022-08-24 17:37:36 * @LastEditors: LinkLeong * @LastEditTime: 2022-08-24 17:38:48 * @FilePath: /CasaOS/interfaces/migrationTool.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.
internal
driver
* @Author: a624669980@163.com a624669980@163.com * @Date: 2022-12-13 11:05:05 * @LastEditors: a624669980@163.com a624669980@163.com * @LastEditTime: 2022-12-13 11:05:13 * @FilePath: /drive/internal/driver/config.go * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Author: a624669980@163.com a624669980@163.com * @Date: 2022-12-13 11:05:05 * @LastEditors: a624669980@163.com a624669980@163.com * @LastEditTime: 2022-12-13 11:05:13 * @FilePath: /drive/internal/driver/config.go * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
op
* @Author: LinkLeong link@icewhale.org * @Date: 2022-07-27 10:30:43 * @LastEditors: LinkLeong * @LastEditTime: 2022-08-04 20:06:04 * @FilePath: /CasaOS/model/connections.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.
* @Author: LinkLeong link@icewhale.org * @Date: 2022-07-27 10:30:43 * @LastEditors: LinkLeong * @LastEditTime: 2022-08-04 20:06:04 * @FilePath: /CasaOS/model/connections.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.
notify
* @Author: LinkLeong link@icewhale.com * @Date: 2022-05-26 14:21:57 * @LastEditors: LinkLeong * @LastEditTime: 2022-06-02 11:14:15 * @FilePath: /CasaOS/model/notify/file.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.
* @Author: LinkLeong link@icewhale.com * @Date: 2022-05-26 14:21:57 * @LastEditors: LinkLeong * @LastEditTime: 2022-06-02 11:14:15 * @FilePath: /CasaOS/model/notify/file.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.
system_model
* @Author: LinkLeong link@icewhale.com * @Date: 2022-06-15 11:30:47 * @LastEditors: LinkLeong * @LastEditTime: 2022-06-23 18:40:40 * @FilePath: /CasaOS/model/system_model/verify_information.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.
* @Author: LinkLeong link@icewhale.com * @Date: 2022-06-15 11:30:47 * @LastEditors: LinkLeong * @LastEditTime: 2022-06-23 18:40:40 * @FilePath: /CasaOS/model/system_model/verify_information.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.
pkg
alerts
Package alerts tells the owner, on their phone or by mail, that something needs them: a backup that failed, a disk failing or full, an app that crashed, an automatic update that failed or paused.
Package alerts tells the owner, on their phone or by mail, that something needs them: a backup that failed, a disk failing or full, an app that crashed, an automatic update that failed or paused.
autoupdate
Package autoupdate installs new ReCasaOS releases by itself, for an owner who turned it on: at night, inside a window of the box's local time, once a release is 48 hours old, and never while an update, a backup or an app operation runs.
Package autoupdate installs new ReCasaOS releases by itself, for an owner who turned it on: at night, inside a window of the box's local time, once a release is 48 hours old, and never while an update, a backup or an app operation runs.
config
* @Author: LinkLeong link@icewhale.com * @Date: 2021-09-30 18:18:14 * @LastEditors: LinkLeong * @LastEditTime: 2022-08-31 17:04:02 * @FilePath: /CasaOS/pkg/config/config.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.
* @Author: LinkLeong link@icewhale.com * @Date: 2021-09-30 18:18:14 * @LastEditors: LinkLeong * @LastEditTime: 2022-08-31 17:04:02 * @FilePath: /CasaOS/pkg/config/config.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.
dockerpkg
Package dockerpkg knows which of a Debian-family box's packages are Docker's, where the installed Docker came from, and what an apt simulation says it would do to them.
Package dockerpkg knows which of a Debian-family box's packages are Docker's, where the installed Docker came from, and what an apt simulation says it would do to them.
fs
hoststats
Package hoststats turns raw host readings into a stats.Sample.
Package hoststats turns raw host readings into a stats.Sample.
modulecmd
Package modulecmd is the module assistant: `casaos module list|plan|install|remove|status`.
Package modulecmd is the module assistant: `casaos module list|plan|install|remove|status`.
osmodule
Package osmodule reads the manifest of a ReCasaOS module: a component that is installed on its own (a service of its own, packages of its own) and that the core shows only when it is there.
Package osmodule reads the manifest of a ReCasaOS module: a component that is installed on its own (a service of its own, packages of its own) and that the core shows only when it is there.
osplan
Package osplan answers, for the machine it runs on, "if I upgraded now, what exactly would happen?", and changes nothing of the machine to say it.
Package osplan answers, for the machine it runs on, "if I upgraded now, what exactly would happen?", and changes nothing of the machine to say it.
osplan/boxtest
Package boxtest is the machine that the tests of the blocks of the upgrade run them on: a folder with the commands of a Debian 11 box replaced by small ones that answer what a test says (they are first in the PATH of the shell), the files that the blocks read at the places the folder gives them, and the way to point the text of a block at them.
Package boxtest is the machine that the tests of the blocks of the upgrade run them on: a folder with the commands of a Debian 11 box replaced by small ones that answer what a test says (they are first in the PATH of the shell), the files that the blocks read at the places the folder gives them, and the way to point the text of a block at them.
osreadiness
Package osreadiness says whether this machine could be upgraded to the next release of its operating system, and why not.
Package osreadiness says whether this machine could be upgraded to the next release of its operating system, and why not.
osrun
Package osrun is what the dashboard knows of an operating system upgrade that runs in a unit of its own: the words it and the unit use (phases, blocks, classes, states, markers), the reader of the unit's log, and the pure reducer that turns that log, a few files of the run and what systemd says into the state of the run and into the one thing to do next.
Package osrun is what the dashboard knows of an operating system upgrade that runs in a unit of its own: the words it and the unit use (phases, blocks, classes, states, markers), the reader of the unit's log, and the pure reducer that turns that log, a few files of the run and what systemd says into the state of the run and into the one thing to do next.
ossupport
Package ossupport says whether the operating system the core runs on still receives security updates, from a table of dates kept in this file.
Package ossupport says whether the operating system the core runs on still receives security updates, from a table of dates kept in this file.
osverify
Package osverify says whether a machine is as it was after an operating system upgrade, and what is not.
Package osverify says whether a machine is as it was after an operating system upgrade, and what is not.
samba
* @Author: LinkLeong link@icewhale.org * @Date: 2022-07-27 10:35:29 * @LastEditors: LinkLeong * @LastEditTime: 2022-08-01 13:56:44 * @FilePath: /CasaOS/pkg/samba/smaba.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.
* @Author: LinkLeong link@icewhale.org * @Date: 2022-07-27 10:35:29 * @LastEditors: LinkLeong * @LastEditTime: 2022-08-01 13:56:44 * @FilePath: /CasaOS/pkg/samba/smaba.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.
singleflight
Package singleflight provides a duplicate function call suppression mechanism.
Package singleflight provides a duplicate function call suppression mechanism.
sqlite
* @Author: LinkLeong link@icewhale.com * @Date: 2022-05-13 18:15:46 * @LastEditors: LinkLeong * @LastEditTime: 2022-08-31 13:39:24 * @FilePath: /CasaOS/pkg/sqlite/db.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.
* @Author: LinkLeong link@icewhale.com * @Date: 2022-05-13 18:15:46 * @LastEditors: LinkLeong * @LastEditTime: 2022-08-31 13:39:24 * @FilePath: /CasaOS/pkg/sqlite/db.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.
telemetry
Package telemetry sends ReCasaOS's anonymous usage statistics to PostHog's EU cloud: a heartbeat at most every three hours, which counts the boxes, and a version_changed event once per install or upgrade, which measures how fast they update.
Package telemetry sends ReCasaOS's anonymous usage statistics to PostHog's EU cloud: a heartbeat at most every three hours, which counts the boxes, and a version_changed event once per install or upgrade, which measures how fast they update.
utils
* @Author: LinkLeong a624669980@163.com * @Date: 2022-05-08 14:58:46 * @LastEditors: LinkLeong a624669980@163.com * @LastEditTime: 2022-05-09 13:42:26 * @FilePath: /CasaOS/pkg/utils/network_detection.go * @Description: * * Copyright (c) 2022 by LinkLeong a624669980@163.com, All Rights Reserved.
* @Author: LinkLeong a624669980@163.com * @Date: 2022-05-08 14:58:46 * @LastEditors: LinkLeong a624669980@163.com * @LastEditTime: 2022-05-09 13:42:26 * @FilePath: /CasaOS/pkg/utils/network_detection.go * @Description: * * Copyright (c) 2022 by LinkLeong a624669980@163.com, All Rights Reserved.
utils/encryption
* @Author: LinkLeong link@icewhale.com * @Date: 2022-06-14 14:33:25 * @LastEditors: LinkLeong * @LastEditTime: 2022-06-14 14:33:49 * @FilePath: /CasaOS/pkg/utils/encryption/md5_helper.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.
* @Author: LinkLeong link@icewhale.com * @Date: 2022-06-14 14:33:25 * @LastEditors: LinkLeong * @LastEditTime: 2022-06-14 14:33:49 * @FilePath: /CasaOS/pkg/utils/encryption/md5_helper.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.
utils/version
* @Author: LinkLeong link@icewhale.com * @Date: 2022-05-13 18:15:46 * @LastEditors: LinkLeong * @LastEditTime: 2022-07-21 15:27:53 * @FilePath: /CasaOS/pkg/utils/version/version.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.
* @Author: LinkLeong link@icewhale.com * @Date: 2022-05-13 18:15:46 * @LastEditors: LinkLeong * @LastEditTime: 2022-07-21 15:27:53 * @FilePath: /CasaOS/pkg/utils/version/version.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.
* @Author: LinkLeong link@icewhale.org * @Date: 2022-11-15 15:51:44 * @LastEditors: LinkLeong * @LastEditTime: 2022-11-15 15:55:16 * @FilePath: /CasaOS/route/init.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.
* @Author: LinkLeong link@icewhale.org * @Date: 2022-11-15 15:51:44 * @LastEditors: LinkLeong * @LastEditTime: 2022-11-15 15:55:16 * @FilePath: /CasaOS/route/init.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.
v1
* @Author: LinkLeong link@icewhale.com * @Date: 2022-07-26 11:08:48 * @LastEditors: LinkLeong * @LastEditTime: 2022-08-17 18:25:42 * @FilePath: /CasaOS/route/v1/samba.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.
* @Author: LinkLeong link@icewhale.com * @Date: 2022-07-26 11:08:48 * @LastEditors: LinkLeong * @LastEditTime: 2022-08-17 18:25:42 * @FilePath: /CasaOS/route/v1/samba.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.
v2
* @Author: LinkLeong link@icewhale.org * @Date: 2022-07-26 18:13:22 * @LastEditors: LinkLeong * @LastEditTime: 2022-08-04 20:10:31 * @FilePath: /CasaOS/service/connections.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.
* @Author: LinkLeong link@icewhale.org * @Date: 2022-07-26 18:13:22 * @LastEditors: LinkLeong * @LastEditTime: 2022-08-04 20:10:31 * @FilePath: /CasaOS/service/connections.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.
model
* @Author: LinkLeong link@icewhale.org * @Date: 2022-07-26 17:17:57 * @LastEditors: LinkLeong * @LastEditTime: 2022-08-01 17:08:08 * @FilePath: /CasaOS/service/model/o_connections.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.
* @Author: LinkLeong link@icewhale.org * @Date: 2022-07-26 17:17:57 * @LastEditors: LinkLeong * @LastEditTime: 2022-08-01 17:08:08 * @FilePath: /CasaOS/service/model/o_connections.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL