Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Installation

Prerequisites: Linux, Python 3.7+, sudo access. Full dependency lists and licenses are in Reference below.

There are two ways to install Yunetas, depending on what you want to do:

ℹ️ The PyPI package yunetas (pipx install yunetas) is the management/build CLI (currently 0.x), not the C framework runtime (currently 7.x). The .deb bundles both; building from source uses the CLI to drive the build.


Quick install

One-liner:

curl -fsSL https://raw.githubusercontent.com/artgins/yunetas/main/install.sh | sudo sh

The script:

Pin a version (must exist as a published Release):

curl -fsSL https://raw.githubusercontent.com/artgins/yunetas/main/install.sh | sudo sh -s -- 7.3.1

Or download the .deb manually from the Releases page and run:

sudo apt install ./yuneta-agent-<version>-<release>-<arch>.deb

The package installs the agent + CLI tools + bundled openresty under /yuneta/, creates the yuneta system user, applies kernel tuning and PAM limits, and starts the SysV service. Full inventory in packages/README.md.

ℹ️ Build the .deb yourself instead of using the published asset: see packages/README.md for the four arch wrapper scripts (AMD64.sh, ARM32.sh, ARMhf.sh, RISCV64.sh). Requires the SDK already built (next section).


Build from source

The 7-step flow below installs the full SDK — sources, build deps, tooling — under ~/yunetaprojects/.

1. Create the yuneta user

sudo adduser yuneta
sudo mkdir /yuneta
sudo chown yuneta:yuneta /yuneta

Log out and log back in as yuneta for the rest of the steps.

2. Install OS packages

sudo apt -y install --no-install-recommends \
  git mercurial make cmake ninja-build \
  gcc clang g++ \
  python3-dev python3-pip python3-setuptools \
  python3-tk python3-wheel python3-venv \
  libjansson-dev libpcre2-dev liburing-dev libcurl4-openssl-dev \
  libpcre3-dev zlib1g-dev libssl-dev \
  perl dos2unix tree curl \
  postgresql-server-dev-all libpq-dev \
  kconfig-frontends telnet pipx \
  patch gettext fail2ban rsync \
  build-essential pkg-config ca-certificates linux-libc-dev

pipx install kconfiglib
What each non-obvious package is for
  • libjansson-dev — required for libjwt

  • libpcre2-dev — required by openresty

  • perl dos2unix mercurial — required by openresty

  • pipx kconfiglib — yunetas configuration tool

  • kconfig-frontends — alternative configuration tool

  • telnet — required by tests

Optional: lib-yui end-to-end tests (Playwright)

The WebKit browser used by the lib-yui e2e suite needs two extra packages on Debian/Ubuntu:

sudo apt -y install --no-install-recommends \
    libgstreamer-plugins-bad1.0-0 libavif16

The kernel/js/lib-yui/install-e2e-deps.sh helper installs them along with all three Playwright browsers. Chromium and Firefox bundle their own deps.

3. Install the yunetas CLI

With `pipx`
With `conda`
sudo apt install pipx     # Ubuntu 23.04+
pipx ensurepath
pipx install yunetas
Older Ubuntu (≤22.04)
python3 -m pip install --user pipx
python3 -m pipx ensurepath
Update / uninstall
pipx upgrade yunetas
pipx uninstall yunetas

4. Clone the repo

mkdir ~/yunetaprojects
cd ~/yunetaprojects
git clone --recurse-submodules https://github.com/artgins/yunetas.git
Pin a specific version
git clone -b <version> --recurse-submodules https://github.com/artgins/yunetas.git <version>

5. Activate the environment

cd ~/yunetaprojects/yunetas
source yunetas-env.sh

yunetas-env.sh exports three variables and prepends /yuneta/bin plus $YUNETAS_BASE/scripts to PATH:

VariableValue
YUNETAS_BASEThe yunetas repo root (the dir you sourced from).
YUNETAS_OUTPUTS$(dirname $YUNETAS_BASE)/outputs
YUNETAS_YUNOS$YUNETAS_OUTPUTS/yunos

ℹ️ Layout contract. outputs/ and your own project repos sit as siblings of the yunetas repo (e.g. ~/yunetaprojects/myproject/). Pick the parent dir freely; keep the sibling relationship.

⚠️ Re-source per shell. New SSH sessions, cron jobs and CI need to source yunetas-env.sh again. Without it, ybatch / ycommand / yshutdown are not on PATH and deploy scripts fail with “command not found”.

Make it permanent — add to ~/.bashrc:

cd ~/yunetaprojects/yunetas
source yunetas-env.sh

The script also sources ~/.yunetasrc if it exists — use that file for your own personal additions.

6. Configure (menuconfig)

cd ~/yunetaprojects/yunetas
menuconfig

Pick compiler, build type and the modules you need, then save — this writes .config, which the build needs.

Full menuconfig options
(Top) → Compiler Selection
    (X) GCC compiler (default)
    ( ) Clang compiler

(Top) → Build Configuration
    Build Type
        (X) RelWithDebInfo (default)
        ( ) Release
        ( ) Debug
        ( ) MinSizeRel
    [*] Build fully static binaries (default y)
         Produces binaries with no shared library dependencies.
         Copy to any Linux machine of the same architecture and run — nothing to install.

(Top) → TLS Library
    (X) OpenSSL (default)
    ( ) Mbed-TLS

(Top) → Debug Options
    [*] Use backtrace library (default y)
    [ ] Enable track memory
    [ ] Print times of yev_loop

(Top) → Modules
    [*] C_CONSOLE support
    [*] C_MQTT support
    [*] C_MODBUS support
    [*] C_POSTGRES support
    [*] C_TEST support

⚠️ Save .config or the build fails. If you switch compiler, re-run ./set_compiler.sh so the external libs are rebuilt with the matching toolchain.

7. Build and test

Build the bundled external libraries first (one-shot):

cd ~/yunetaprojects/yunetas/kernel/c/linux-ext-libs
./extrae.sh         # clone libraries
./configure-libs.sh # configure, build and install

Then build, install and test yunetas:

cd ~/yunetaprojects/yunetas
yunetas init
yunetas build
yunetas test

Artefacts land in $YUNETAS_OUTPUTS/ (= /yuneta/development/outputs/ by default): include/, lib/, bin/, yunos/.

ℹ️ Fully static builds (CONFIG_FULLY_STATIC=y) reuse the same configure-libs.sh with GCC or Clang — no separate toolchain. OpenSSL is built with no-dso and no-sock to avoid glibc resolver stubs in the static binary. See kernel/c/linux-ext-libs/HACKS.md for details.


Troubleshooting

Bring back /var/log/syslog
sudo apt-get update
sudo apt-get install rsyslog
sudo systemctl enable --now rsyslog
Fix “Setting locale failed” warnings
dpkg-reconfigure locales

Reference

License

MIT, except for kernel/c/libjwt/* which is MPL-2.0.

Build dependencies (C / Linux)

Runtime / deploy dependencies