# Zero-to-dapp run on a fresh box — started 2026-11-01T14:22:22Z ### machine $ cat /etc/os-release | head -2; uname -m; free -m | head -2; nproc; which java chr psql || true PRETTY_NAME="Debian GNU/Linux 12 (bookworm)" NAME="Debian GNU/Linux" x86_64 total used free shared buff/cache available Mem: 473 61 315 1 109 412 2 [exit 0, 0.0s] ### Docs step 1: trust the Chromia apt key $ curl -fsSL https://apt.chromia.com/chromia.gpg | sudo tee /usr/share/keyrings/chromia.gpg >/dev/null [exit 0, 0.0s] ### Docs step 2: add the Chromia repository $ echo "deb [arch=amd64 signed-by=/usr/share/keyrings/chromia.gpg] https://apt.chromia.com stable main" | sudo tee /etc/apt/sources.list.d/chromia.list deb [arch=amd64 signed-by=/usr/share/keyrings/chromia.gpg] https://apt.chromia.com stable main [exit 0, 0.0s] ### Docs step 3 $ sudo apt-get update -qq [exit 0, 0.0s] ### Docs step 4: install chr exactly as the docs say (expected to need Java 21) $ sudo apt-get install -y -qq chr 2>&1 | tail -15 E: Unable to correct problems, you have held broken packages. [exit 0, 0.0s] ### Java 21: add the Eclipse Temurin (Adoptium) repository $ sudo apt-get install -y -qq wget apt-transport-https gpg >/dev/null && wget -qO - https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/adoptium.gpg >/dev/null && echo "deb https://packages.adoptium.net/artifactory/deb $(awk -F= "/^VERSION_CODENAME/{print\$2}" /etc/os-release) main" | sudo tee /etc/apt/sources.list.d/adoptium.list debconf: delaying package configuration, since apt-utils is not installed deb https://packages.adoptium.net/artifactory/deb bookworm main [exit 0, 0.0s] ### Java 21: install $ sudo apt-get update -qq && sudo apt-get install -y -qq temurin-21-jre 2>&1 | tail -3; java -version update-alternatives: using /usr/lib/jvm/temurin-21-jre-amd64/bin/rmiregistry to provide /usr/bin/rmiregistry (rmiregistry) in auto mode Processing triggers for libc-bin (2.36-9+deb12u3) ... Processing triggers for fontconfig (2.14.1-4) ... openjdk version "21.0.13" 2026-10-20 LTS OpenJDK Runtime Environment Temurin-21.0.13+9 (build 21.0.13+9-LTS) OpenJDK 64-Bit Server VM Temurin-21.0.13+9 (build 21.0.13+9-LTS, mixed mode, sharing) [exit 0, 0.0s] ### Docs step 4 again: install chr $ sudo apt-get install -y -qq chr 2>&1 | tail -3 Unpacking chr (0.34.3) ... Setting up chromia-cli (0.34.3) ... Setting up chr (0.34.3) ... [exit 0, 0.0s] ### check $ chr --version chr version 0.34.3 rell version 0.16.7 postchain version 3.49.21 EIF version 0.32.7 Java version 21.0.13 [exit 0, 0.0s] ### PostgreSQL exactly as the docs say (postgresql-16) $ sudo apt-get install -y -qq postgresql-16 2>&1 | tail -5 E: Unable to locate package postgresql-16 [exit 0, 0.0s] ### PostgreSQL from the distribution instead $ sudo apt-get install -y -qq postgresql 2>&1 | tail -3; pg_lsclusters Setting up libjson-xs-perl (4.040-1~deb12u1) ... Setting up postgresql (15+248+deb12u1) ... Processing triggers for libc-bin (2.36-9+deb12u14) ... Ver Cluster Port Status Owner Data directory Log file 15 main 5432 down postgres /var/lib/postgresql/15/main /var/log/postgresql/postgresql-15-main.log [exit 0, 0.0s] ### Docs: start PostgreSQL $ sudo service postgresql start [exit 0, 0.0s] ### start PostgreSQL without systemd/service $ pg_lsclusters | awk 'NR>1{print $1, $2}' | while read v c; do sudo pg_ctlcluster $v $c start; done; pg_lsclusters Ver Cluster Port Status Owner Data directory Log file 15 main 5432 online postgres /var/lib/postgresql/15/main /var/log/postgresql/postgresql-15-main.log [exit 0, 0.0s] ### Docs: create the postchain database and role $ sudo -u postgres psql -c "CREATE DATABASE postchain WITH TEMPLATE = template0 LC_COLLATE = 'C.UTF-8' LC_CTYPE = 'C.UTF-8' ENCODING 'UTF-8';" -c "CREATE ROLE postchain LOGIN ENCRYPTED PASSWORD 'postchain'; GRANT ALL ON DATABASE postchain TO postchain;" CREATE DATABASE CREATE ROLE GRANT [exit 0, 0.0s] ### PostgreSQL 15+: let postchain create schemas $ sudo -u postgres psql -d postchain -c 'GRANT ALL ON SCHEMA public TO postchain; ALTER DATABASE postchain OWNER TO postchain;' GRANT ALTER DATABASE [exit 0, 0.0s] # --- Tutorial steps re-run on 2026-11-03 with chr 0.34.3 and the default project name (`chr create-rell-dapp` → my-rell-dapp / my_rell_dapp) --- ### Tutorial 1: create a project (default name) $ cd /home/user/tut && timeout -k 5 300 chr create-rell-dapp [exit 0, 1.1s] ### Tutorial: project files $ cd /home/user/tut/my-rell-dapp && find . -type f | sort && cat chromia.yml src/main.rell ./.gitignore ./.rell_format ./.rell_lint ./chromia.yml ./src/main.rell ./src/test/arithmetic_test.rell ./src/test/data_test.rell blockchains: my_rell_dapp: module: main compile: rellVersion: 0.16.6 database: schema: schema_my_rell_dapp test: modules: - test module; object my_name { mutable name = "World"; } operation set_name(name) { my_name.name = name; } query hello_world() = "Hello %s!".format(my_name.name); [exit 0, 0.0s] ### Tutorial 2: run the tests $ cd /home/user/tut/my-rell-dapp && timeout -k 5 600 chr test ====================Running unit tests==================== TEST: test.arithmetic_test:test_foo OK: test.arithmetic_test:test_foo (0.871s) TEST: test.arithmetic_test:test_bar OK: test.arithmetic_test:test_bar (0.510s) TEST: test.data_test:test_add_name OK: test.data_test:test_add_name (1.296s) ------------------------------------------------------------------------ TEST RESULTS: OK test.arithmetic_test:test_foo (0.871s) OK test.arithmetic_test:test_bar (0.510s) OK test.data_test:test_add_name (1.296s) SUMMARY: 0 FAILED / 3 PASSED / 3 TOTAL (2.678s) ***** OK ***** [exit 0, 5.5s] ### Tutorial 3: start a local node (background) $ cd /home/user/tut/my-rell-dapp && (nohup chr node start --wipe > /home/user/tut/node.log 2>&1 &) ; for i in $(seq 1 90); do grep -q 'Node is initialized' /home/user/tut/node.log && break; sleep 2; done; grep -E 'Started blockchain|Node is initialized|Error|ERROR' /home/user/tut/node.log | cut -c1-200 | head -8 Started blockchain my_rell_dapp. Chain-id: 0, brid F6438317F85A756AE5E41485AF846D1D4F27EB1F8BE5FA2B6E27553AC558F091 Node is initialized [exit 0, 6.0s] ### Tutorial 4: query $ cd /home/user/tut/my-rell-dapp && timeout -k 5 120 chr query hello_world "Hello World!" [exit 0, 1.7s] ### Tutorial 5: transaction $ cd /home/user/tut/my-rell-dapp && timeout -k 5 120 chr tx set_name Alice --await transaction with rid B28ECA83E1BFBDE7C63EE67D1957970D014882C0C49AE8A63644C126C94C222E was posted and confirmed [exit 0, 3.5s] ### Tutorial 6: query again $ cd /home/user/tut/my-rell-dapp && timeout -k 5 120 chr query hello_world "Hello Alice!" [exit 0, 1.5s] ### stop the node $ pkill -f '[M]ainKt node start'; sleep 2; echo stopped stopped [exit 0, 2.0s]