Skip to content

About

No description, website, or topics provided.

Resources

Stars

4 stars

Watchers

0 watching

Forks

Latest commit

 

History

35 Commits

Folders and files

Repository files navigation

This repo lets you builds an OpenWrt-image with Cosmos Cloud included and a compressing BTRFS-partition for app-data/storage.

Download the finished Image or Clone the repo and run the action in your fork. Tested with a Raspberry Pi 4 and on amd64 (experimental).

What is Cosmos OpenWrt?

Cosmos-OpenWrt is a wrapper / gh-action around the OpenWrt Image-builder that creates an OpenWrt-Image with Cosmos Cloud and it's dependencies preinstalled. On first boot, the image looks for free space on the root disk, creates an additional BTRFS-partition and uses this partition for your app storage. Per default, the partition is compressed so you could run cosmos on very low disk space. Like even an 8GB SD-Card. Though I recommend at least 32GB.

additional Features vs plain Cosmos Cloud

Differences vs. Cosmos on a conventional Linux like Debian/Ubuntu etc.: You get all the advantages of Cosmos + OpenWrt + BTRFS in a single box:

  • Low Disk wear / support for controller-less Storage like SD-Cards or eMMC
  • simple, easy install. Flashable like f.e. Home Assistant OS
  • Lightweight. The system image is below 256MB
  • flashable aio system upgrades. Rerun the gh-action and flash the new sysupgrade via Luci OR use owut integrated in OpenWrt
  • Full Router-, Firewall- and Wireless-Accesspoint
  • BTRFS: Automatic compression & Snapshot Support
  • ZRAM: zram RAM-Compression is enabled per default. This means Home Assistant and other RAM-Hungry apps should run on low RAM (f.e. 1GB) despite min recommendation of 2GB.

OpenWrt is preconfigured to work right out of the box with cosmos. But you still have full control, so you can break it in probably unlimited ways I cannot imagine 😉 Don't forget to backup your known working configuration in Luci.

How to use

Fork the repo and run the gh action "Build OpenWrt Image" with your desired parameters. Download and unzip your image from the artifacts uploaded by the action. Flash the image per your device instructions.

How to add your public SSH-Key

SSH-Access is disabled per default. Key-based access can be enabled initially via /boot/.env (if a boot partition exists like on RPI's), gh-secret or via Luci Webinterface.

  • /boot/.env: If you want to access your machine via ssh, put a file called .env into the boot partition with the following content SSH_KEY="<public SSH-key>" Example: SSH_KEY="ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILoVc1iQIp8Rdk5NhZ2WNMeBS2kCpI8OaGQre5qnpJ9h user"
  • gh-secret: Add a secret in your gh-repo or account called SSH_KEY containing your public ssh-key (f.e. ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILoVc1iQIp8Rdk5NhZ2WNMeBS2kCpI8OaGQre5qnpJ9h user).
  • Luci Webinterface: Navigate to System->Administration->SSH-Keys and enter your public SSH-Key

On Debian, you can create an ssh-key with ssh-keygen -t ed25519

first boot, initial config

Per Default, OpenWrt is configured as a DHCP-Client with static failover 192.168.0.11. mdns is enabled. If there is no existing DHCP-Server, Cosmos will serve DHCP-Addresses per default (Non Authorative, so any other DHCP-Server can take over at anytime).

Per default, Luci (HTTPS) is accessible via Port 4443, while Port 8080 redirects to it, until you set up Cosmos. When Cosmos Initial setup is Done, the direct HTTP/HTTPS ports are closed down: LuCI only listens on 127.0.0.1:8080 and the Cosmos Proxy serves it on Port 4443 (proxying 4443 -> 8080). LuCI (OpenWrt Webinterface) is then integrated into cosmos (after setup).

If you want to use a static IP for cosmos and you want to change this static IP, you need to Allow insecure access via local IP. Follow this guide:

change-static-ip-compressed.mp4

Looking for a Plug & Play Solution?

You can buy our prebuilt devices and lots of accessories at our webshop: Cosmos Cloud T4, C4, R3S at Asera AG

For the time being, we're shipping only to Switzerland. International buyers, please send us a message via Form: Contact Form

Cosmos OpenWrt Features

About

No description, website, or topics provided.

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages