The KAGAMI mark КАГАМИ
kagami.bg/academy · lesson · machine-readable viewVERIFIED 2026-10-01 · UPDATED 2026-10-01
IDENTITY
module
GX10-04-116 · Morning dashboard with Appsmith over PostgreSQL and a local Ollama model
series
GX10 (local AI server class: NVIDIA GB10, e.g. ASUS Ascent GX10 / DGX Spark)
level
Intermediate
duration
2–3 h
prerequisites
A GB10-class machine with DGX OS (Ubuntu 24.04, Arm64), shell access (local or SSH), Docker and the NVIDIA Container Toolkit (preinstalled on DGX Spark per NVIDIA); basic SQL
trust_label
VERIFIED 2026-10-01 (Appsmith, Ollama and Docker documentation; image tags and arm64 builds checked on Docker Hub; licence file read on GitHub) · UPDATED 2026-10-01 · NOT TESTED end to end (no GB10 machine available during the check; the GitHub releases page could not be read, so the Appsmith version rests on the Docker Hub tag)
versions
Appsmith Community Edition v2.4.3 (image appsmith/appsmith-ce, pinned via env; linux/arm64 build present) · PostgreSQL 18 · Ollama 0.35.0 (pinned via env) · Docker Compose v2 plugin
licence
Appsmith Community Edition source: Apache License 2.0 (LICENSE file in the repository). The Appsmith docs recommend the Commercial edition image (appsmith-ee, with a free plan); this lesson uses the Community image. Feature differences between the two editions were not compared
language
human view: en · bulgarian edition: /academy/gx10/ (same file name)
previous / next
04-01_n8n_Training_GX10.html / 04-127_Invoice_OCR_Classification.html
PURPOSE

Build a manager-facing "morning dashboard" on a GB10-class AI server: one Docker Compose project with Appsmith (low-code internal-tool builder) on top of PostgreSQL 18 and Ollama. Four live figures and two lists come from SQL queries with a read-only database role; a short morning briefing is written by a local model through the Ollama REST API (POST /api/chat, stream false) and stored in a table. Only the Appsmith port is published, and only to loopback. All data in the lesson is fictional.

KEY CONCEPTS
COMMANDS / PATHS
CHECKLIST
NEXT MODULE

04-127 · Invoice OCR: Nemotron, EIK and VIES (04-127_Invoice_OCR_Classification.html) · optional: schedule the briefing with n8n (Schedule node → HTTP to Ollama → INSERT into briefings), see 04-01 · series index: kagami.bg/en/academy/gx10/ · offer: Quick experiment (kagami.bg/stalbata/)

SOURCES
TAGS
gx10nvidia-gb10arm64appsmithdashboardpostgresollamadocker-composelow-code
VERIFIED · 01.10.2026 UPDATED · 01.10.2026

Appsmith Dashboard over Postgres and Ollama

On a local AI server of the NVIDIA GB10 class we build a morning dashboard for a manager: four live figures and two lists from the database, and a short briefing written by a local model. It all runs in Docker, the model never leaves the machine, and the dashboard sees only what we allow it to see.

⏱ 2–3 h Intermediate GX10 NVIDIA GB10 · 20 Arm cores · 128 GB unified memory Docker · Appsmith · Postgres · Ollama
Docker · Compose (ARM64)🔒 local Appsmith Community Edition · Postgres🔒 local Ollama (the model)🔒 local
🔄
UPDATED · 01.10.2026 — what changed
The dashboard lesson was rebuilt against the current documentation. We removed: Appsmith without a pinned version or an image name, the llama3.1:70b model (about 43 GB, while an Appsmith query waits only 10 seconds by default), the old /api/generate format with a prompt and amounts in "lev" (it is now /api/chat with messages, and amounts are in EUR), the mandatory n8n run at 7:00 (it is simpler to start the briefing from a button; n8n stays optional), the cameras through another service (here they are a devices table), Telegram, and the claim that the Text widget renders Markdown (we did not verify it). We added: the appsmith/appsmith-ce image at version v2.4.3 (an ARM64 build exists), the Apache 2.0 licence of the Community Edition, Postgres 18 and Ollama 0.35.0 pinned in .env, Ollama as an internal service with no published port, a separate database role with only the rights it needs, secrets generated on the spot, fictional data, a JS Object with setInterval, a 60-second query timeout, backups of the database and of Appsmith, and an SSH tunnel. All data in the lesson is fictional.
⚠️
What we have not run ourselves
We had no GB10-class machine at hand during the check. The files were checked against the official documentation, but they have not been tested end to end — which is why there is no "TESTED" label. Especially unchecked: Appsmith running in a container on GB10, our choice to publish it on 127.0.0.1:8080 instead of port 80 (the documentation shows 80 and 443), the SQL file with the demo data, the exact names of settings in the Appsmith interface, and model speed. We could not read the GitHub releases page, so version v2.4.3 rests on the Docker Hub tag.

01What you'll learn

02Before you start

WhatValue (checked on 01.10.2026)
Appsmith Community Editionimage appsmith/appsmith-ce, latest version v2.4.3 (Docker Hub, 30.09.2026), a linux/arm64 build exists
LicenceApache License 2.0 (the LICENSE file in the Appsmith repository)
Postgresimage postgres:18, a linux/arm64 build exists
Ollamaimage ollama/ollama:0.35.0, a linux/arm64 build exists
💡
Community or Commercial?
Appsmith's documentation recommends the appsmith-ee image (the Commercial edition with a free plan) and says that for Community you replace appsmith-ee with appsmith-ce. Here we use the Community Edition because its code is licensed under Apache 2.0. ⚠️ We did not compare what exactly you get in the Commercial free plan — see the documentation if that matters to you.
🧪
The data is fictional
The company, clients, amounts and devices in the example are imaginary. That way you can try everything without touching real data.

03Steps

  1. What will sit where

    In the end you will have three containers in one project. Why containers? Each program comes with everything it needs, does not get in the way of the others, and is removed with one command.

    ServiceWhat it is forAccess
    AppsmithThe dashboard — screens, queries, chartsonly 127.0.0.1:8080 on the machine
    PostgresThe dashboard's data (fictional)internal, no published port
    OllamaThe local model that writes the briefinginternal, no published port

    Services find each other by the name in the compose file: the database is postgres, the model is ollama. Inside a container, localhost is the container itself.

  2. Check the machine

    bash · on the machine
    uname -m
    docker --version
    docker compose version

    You expect aarch64 and Compose v2. If you have gone through the n8n lesson, Docker is already checked — the dashboard stack is a separate project and can run next to it. ⚠️ We have not tried the two stacks at the same time on one machine.

  3. Folder and secrets file

    Passwords are not written in the compose file. We keep them in .env — Compose reads it by itself. We generate them on the spot. Two different passwords: the database owner's and the role the dashboard will log in with.

    bash · ~/dashboard-gx10/.env
    mkdir -p ~/dashboard-gx10 && cd ~/dashboard-gx10
    
    cat > .env <<EOF
    APPSMITH_VERSION=v2.4.3
    OLLAMA_VERSION=0.35.0
    POSTGRES_USER=dash_owner
    POSTGRES_PASSWORD=$(openssl rand -hex 24)
    POSTGRES_DB=dashboard
    DASH_PASSWORD=$(openssl rand -hex 24)
    TZ=Europe/Sofia
    EOF
    
    chmod 600 .env
    ✅
    Versions are pinned
    Do not write latest: the next time the container is created the version may change silently. Appsmith's documentation also recommends a pinned tag. The numbers are current as of 01.10.2026 — see "Updating" below.
  4. The compose.yaml file

    The rules are the same as in the n8n lesson: pinned versions, data in named volumes, the only published port is Appsmith's and only to 127.0.0.1, and Appsmith waits for Postgres to be "healthy". The ./stacks folder is where Appsmith keeps its data — that is how its documentation shows it.

    yaml · ~/dashboard-gx10/compose.yaml
    name: dashboard-gx10
    
    services:
      postgres:
        image: postgres:18
        restart: unless-stopped
        environment:
          POSTGRES_USER: ${POSTGRES_USER}
          POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
          POSTGRES_DB: ${POSTGRES_DB}
          DASH_PASSWORD: ${DASH_PASSWORD}
          PGDATA: /var/lib/postgresql/data
        volumes:
          - db_data:/var/lib/postgresql/data
        healthcheck:
          test: ["CMD-SHELL", "pg_isready -h localhost -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
          interval: 5s
          timeout: 5s
          retries: 10
    
      ollama:
        image: ollama/ollama:${OLLAMA_VERSION}
        restart: unless-stopped
        volumes:
          - ollama_models:/root/.ollama
        deploy:
          resources:
            reservations:
              devices:
                - driver: nvidia
                  count: all
                  capabilities: [gpu]
    
      appsmith:
        image: appsmith/appsmith-ce:${APPSMITH_VERSION}
        restart: unless-stopped
        depends_on:
          postgres:
            condition: service_healthy
        ports:
          - "127.0.0.1:8080:80"
        volumes:
          - ./stacks:/appsmith-stacks
    
    volumes:
      db_data:
      ollama_models:
    💡
    Why exactly like this
    PGDATA — Postgres 18 changed the default data location; without this line the database starts empty. Ollama without ports — the model is reachable only by the other containers in the project, not by the network. 127.0.0.1:8080:80 — Appsmith listens on port 80 inside the container; outside, we show it only on the machine itself. Postgres with its own database — the dashboard has its own, not someone else's database with important data.
    bash
    docker compose config --quiet && echo "compose: OK"
  5. Start the stack

    bash
    docker compose up -d
    docker compose ps
    docker compose logs -f appsmith --tail=30

    The first time, the images are downloaded. According to Appsmith's documentation, startup can take up to 5 minutes — watch the logs until they stop changing (leave with Ctrl+C). postgres should be healthy.

  6. Demo data and a role with few rights

    We create four tables with fictional data and a role, dash_app. Why a separate role? If someone steals the dashboard's password or a query goes wrong, they must not be able to delete or change the tables. The role reads everything and writes only to briefings. Its password comes from a variable, not from the file.

    bash · ~/dashboard-gx10/init.sql
    cat > init.sql <<'EOF'
    CREATE ROLE dash_app LOGIN PASSWORD :'pw';
    
    CREATE TABLE tickets (
      id         serial PRIMARY KEY,
      title      text NOT NULL,
      status     text NOT NULL CHECK (status IN ('open','closed')),
      created_at timestamptz NOT NULL DEFAULT now()
    );
    CREATE TABLE invoices (
      id         serial PRIMARY KEY,
      client     text NOT NULL,
      amount_eur numeric(10,2) NOT NULL,
      status     text NOT NULL CHECK (status IN ('pending','paid')),
      due_date   date NOT NULL,
      paid_at    timestamptz
    );
    CREATE TABLE devices (
      id     serial PRIMARY KEY,
      name   text NOT NULL,
      online boolean NOT NULL
    );
    CREATE TABLE briefings (
      id         serial PRIMARY KEY,
      created_at timestamptz NOT NULL DEFAULT now(),
      model      text NOT NULL,
      body       text NOT NULL
    );
    
    INSERT INTO tickets (title, status, created_at) VALUES
      ('Warehouse printer does not print', 'open',   now() - interval '3 hours'),
      ('New employee — mailbox access', 'open', now() - interval '20 hours'),
      ('Slow network in the office', 'open',   now() - interval '2 days'),
      ('Toner replacement', 'closed', now() - interval '4 days');
    
    INSERT INTO invoices (client, amount_eur, status, due_date, paid_at) VALUES
      ('Client Alpha',   420.00, 'pending', current_date - 12, NULL),
      ('Client Beta',    150.50, 'pending', current_date - 3,  NULL),
      ('Client Gamma',   980.00, 'pending', current_date + 9,  NULL),
      ('Client Delta',   310.00, 'paid',    current_date - 5,  now() - interval '1 hour'),
      ('Client Epsilon',  75.00, 'paid',    current_date - 2,  now() - interval '1 day'),
      ('Client Zeta',    205.00, 'paid',    current_date - 8,  now() - interval '3 days');
    
    INSERT INTO devices (name, online) VALUES
      ('Entrance sensor', true), ('Warehouse sensor', true),
      ('Yard sensor', false), ('Office sensor', true);
    
    GRANT SELECT ON tickets, invoices, devices, briefings TO dash_app;
    GRANT INSERT ON briefings TO dash_app;
    GRANT USAGE ON SEQUENCE briefings_id_seq TO dash_app;
    EOF
    
    docker compose exec -T postgres sh -c 'psql -U "$POSTGRES_USER" -d "$POSTGRES_DB" -v ON_ERROR_STOP=1 -v pw="$DASH_PASSWORD"' < init.sql

    You expect CREATE ROLE, CREATE TABLE, INSERT and GRANT lines, with no errors. The password is passed to psql as a variable called pw, which is why it is not in the file. ⚠️ We have not run this file on a live system.

  7. Open Appsmith from your own computer

    Appsmith listens only on the machine itself. From your computer you reach it through an SSH tunnel — a protected corridor that opens nothing to the network.

    bash · on your computer
    ssh -L 8080:localhost:8080 <user>@<server-address>

    Leave the connection open and go to http://localhost:8080. On the first visit Appsmith asks you to create an administrator account. It then offers a free plan or a licence key — for this lesson you do not need a key. If you work directly on the machine, open the same address there.

    🌐
    What Appsmith sends out
    According to Appsmith's telemetry page, its server sends a "keep-alive" signal every 2 hours regardless of the telemetry setting, and data from self-hosted installations is anonymised. Data returned by your databases is not collected. Read the page and decide for yourself what to switch off.
  8. Connect the database

    In Appsmith: Create new → Application, then Data → Datasources → PostgreSQL (menu names may have changed — ⚠️ see the documentation). Fill in:

    FieldValue
    Host addresspostgres — the service name, not localhost
    Port5432
    Database namedashboard
    Usernamedash_app
    Passwordthe value of DASH_PASSWORD from .env
    Connection modeRead/Write (we store the briefing; the role itself limits the rights)
    SSL modeDisable (traffic stays on Docker's internal network)

    Press Test, then Save. To see the password: grep DASH_PASSWORD .env.

    ⚠️
    Never put in the database owner
    The dash_owner password is not for the dashboard. If the dashboard gets a "permission denied" error, grant the needed right to dash_app instead of swapping it for the owner.
  9. The dashboard's queries

    On each page of the application add a query (Queries → New query on the database) and give it the name shown on the left. Leave the "Run behavior" setting (under the gear icon of the query) on On page load — that loads the data when the page opens. Amounts are in EUR.

    sql · Appsmith queries
    -- qAlerts: active alerts (last 24 h)
    SELECT count(*) AS active_alerts
    FROM tickets
    WHERE status = 'open'
      AND created_at > now() - interval '24 hours';
    
    -- qUnpaid: overdue unpaid invoices
    SELECT count(*) AS unpaid,
           COALESCE(sum(amount_eur), 0) AS total_owed
    FROM invoices
    WHERE status = 'pending' AND due_date < current_date;
    
    -- qUnpaidList: the list for the table
    SELECT client, amount_eur, due_date
    FROM invoices
    WHERE status = 'pending' AND due_date < current_date
    ORDER BY due_date
    LIMIT 20;
    
    -- qDevices: devices online
    SELECT count(*) FILTER (WHERE online) AS online,
           count(*) AS total
    FROM devices;
    
    -- qToday: revenue today (EUR)
    SELECT COALESCE(sum(amount_eur), 0) AS today_revenue
    FROM invoices
    WHERE status = 'paid' AND paid_at::date = current_date;
    
    -- qWeek: revenue by day, last 7 days (for the chart)
    SELECT paid_at::date AS day, sum(amount_eur) AS revenue
    FROM invoices
    WHERE status = 'paid' AND paid_at >= current_date - 6
    GROUP BY 1
    ORDER BY 1;
    
    -- lastBriefing: the latest briefing
    SELECT created_at, body
    FROM briefings
    ORDER BY id DESC
    LIMIT 1;

    With the demo data you expect: 2 active alerts, 2 overdue invoices totalling 570.50 EUR, 3 devices online out of 4, and 310.00 EUR revenue today. The numbers depend on the hour at which you loaded the data — if something does not show, run the query with Run and look at the response.

  10. Lay out the screen

    Grab the widgets from the left panel and drop them on the canvas. Each connects to a query through a binding in curly braces {{ }}.

    SectionDataRefreshWidget
    Active alertsqAlerts30 sStats Box → {{qAlerts.data[0].active_alerts}}
    Unpaid invoicesqUnpaid60 sStats Box → {{qUnpaid.data[0].total_owed}} EUR
    Overdue — listqUnpaidList60 sTable → {{qUnpaidList.data}}
    Devices onlineqDevices30 sStats Box → {{qDevices.data[0].online}} / {{qDevices.data[0].total}}
    Revenue todayqToday60 sStats Box → {{qToday.data[0].today_revenue}} EUR
    Revenue, 7 daysqWeek60 sChart → {{qWeek.data}}
    Morning briefinglastBriefingon a buttonText → {{lastBriefing.data[0].body}}

    The intervals in the table are the ones from the startRefresh function in step 12 — if you change one, change the other.

    If a Stats Box needs an amount with two decimals: {{Number(qToday.data[0].today_revenue).toFixed(2)}}. Postgres numeric values arrive as strings, so it is good to convert them with Number().

  11. The model: pull it and connect it through the REST API

    Models are downloaded inside the Ollama container and stay in the ollama_models volume.

    bash
    docker compose exec ollama ollama pull llama3.1
    docker compose exec ollama ollama list

    According to ollama.com, llama3.1 (8B) is about 4.9 GB. Memory is shared with the CPU — do not run several large models at once. ⚠️ We have not measured answer speed on your machine.

    In Appsmith: Datasources → REST API, URL http://ollama:11434, save. Then a new query on it, named ollamaChat:

    SettingValue
    Method and pathPOST · /api/chat
    HeaderContent-Type: application/json
    BodyJSON, see below
    Run behaviorManual (otherwise the model runs every time the page opens)
    Query timeout60000 ms (the default is 10000; the documentation gives 60000 as the maximum). On a self-hosted instance the server-level limit can be raised above 60 seconds with the APPSMITH_SERVER_TIMEOUT variable (in seconds) in Appsmith's environment — needed for a bigger model. ⚠️ We have not tried it.
    json · body of the ollamaChat query
    {
      "model": "llama3.1",
      "stream": false,
      "keep_alive": "10m",
      "options": { "temperature": 0.2 },
      "messages": [
        {
          "role": "system",
          "content": "You are an assistant to the manager. Write in English, 3 to 5 short sentences, using only the numbers given. Do not invent facts."
        },
        {
          "role": "user",
          "content": {{ Briefing.buildPrompt() }}
        }
      ]
    }
    💡
    Why stream: false
    By default Ollama returns the answer in pieces (a stream of JSON lines), while Appsmith expects a single response. With false you get the whole message at once and the text is in message.content. That is why we use /api/chat with messages and roles (system and user) rather than /api/generate with a single prompt.
    ⚠️
    The address is the service's, not the network's
    http://ollama:11434 works because Appsmith and Ollama are in one compose project. Do not write localhost (that is Appsmith's own container) and do not open Ollama to 0.0.0.0 — that makes the model reachable from the whole network.
  12. A JS Object: a briefing from a button, and live figures

    A new JS Object (JS Objects → New) named Briefing. It gathers the figures into a short text, calls the model, stores the result and refreshes the text on screen. The saveBriefing query is an ordinary SQL query (Run behavior: Manual) on the same database:

    sql · saveBriefing
    INSERT INTO briefings (model, body)
    VALUES ('llama3.1', {{ this.params.text }});
    javascript · the Briefing JS Object
    export default {
      buildPrompt() {
        const a = qAlerts.data[0];
        const u = qUnpaid.data[0];
        const d = qDevices.data[0];
        const t = qToday.data[0];
        return "Data for the day:\n"
          + "- Active alerts: " + a.active_alerts + "\n"
          + "- Overdue invoices: " + u.unpaid + " totalling " + u.total_owed + " EUR\n"
          + "- Devices online: " + d.online + " of " + d.total + "\n"
          + "- Revenue today: " + t.today_revenue + " EUR\n"
          + "Write a short morning report and suggest one priority.";
      },
    
      async generate() {
        await ollamaChat.run();
        const text = ollamaChat.data.message.content;
        await saveBriefing.run({ text: text });
        await lastBriefing.run();
        showAlert("Briefing saved", "success");
      },
    
      startRefresh() {
        setInterval(() => { qAlerts.run(); qDevices.run(); }, 30000, "fast");
        setInterval(() => { qUnpaid.run(); qUnpaidList.run(); qToday.run(); qWeek.run(); }, 60000, "slow");
      },
    
      stopRefresh() {
        clearInterval("fast");
        clearInterval("slow");
      }
    }

    Attach: a "New briefing" button → onClick → Execute a JS function → Briefing.generate. For the live figures: Page → On page load → Briefing.startRefresh (or a button, if you want to control it). setInterval is an Appsmith function with the signature setInterval(function, milliseconds, id); the id is used to stop it with clearInterval.

    ✅
    Refresh the queries, not the model
    The interval calls only the SQL queries — they are cheap. The model is called only from the button: every call takes up the GPU and the shared memory.
    ✅
    A human reads and decides
    The briefing is a recommendation, not a decision. If the dashboard ever starts sending messages or changing data, put a human approval in front — the model makes mistakes and makes things up.
  13. Security — the minimum

    • .env has permissions 600, is not in Git, and is sent to nobody.
    • Only 127.0.0.1:8080 is published; Postgres and Ollama have no published ports.
    • The dashboard logs in as dash_app (reads, and writes only to briefings), never as the owner.
    • Do not put 0.0.0.0 in front of Ollama, and do not open Appsmith to the internet without HTTPS and protection (Set up custom domain and SSL — see the documentation).
    • The Appsmith administrator's password is long and unique.
  14. Backups, updating and monitoring

    bash · from ~/dashboard-gx10
    mkdir -p backups
    docker compose exec -T postgres sh -c 'pg_dump -U "$POSTGRES_USER" "$POSTGRES_DB"' > backups/dashboard-db-$(date +%Y%m%d).sql
    docker compose exec appsmith appsmithctl backup

    The first command copies the data. The second (appsmithctl backup) copies the Appsmith application itself — the screens, queries and settings. According to the documentation: run in a terminal, it asks for a password with which it encrypts the backup (keep it — without it the backup cannot be restored), and the file lands in ./stacks/data/backup/. Keep backups off the machine too.

    Updating. Change the number in .env (APPSMITH_VERSION, OLLAMA_VERSION) according to the current releases on Appsmith's Docker Hub and Ollama's, and run (take a backup first):

    bash
    docker compose pull
    docker compose up -d --remove-orphans
    docker compose logs -f appsmith --tail=50

    Do not change the major Postgres version just by changing the tag — that requires a separate procedure (see the Postgres documentation). Before jumping Appsmith between major versions, read the upgrade instructions in its documentation.

    Monitoring. docker compose ps shows the state, docker stats --no-stream shows CPU and memory of the containers.

04Check

Quiz

1. Which Postgres address do you enter in Appsmith in this stack?

2. Why does the dashboard log in with the dash_app role rather than the database owner?

3. Why does the body sent to /api/chat contain "stream": false?

4. Which query should NOT be run by setInterval every 30 seconds?

05What's next

06Sources

  1. Appsmith: install using Docker — image, ports, /appsmith-stacks, 8 GB memory, cs.appsmith.com, Community or Commercial.
  2. Appsmith: licence (Apache 2.0) · appsmith-ce on Docker Hub — version v2.4.3 and architectures (arm64).
  3. Appsmith: PostgreSQL · connecting to a database in Docker — connection fields, container name as the host.
  4. Appsmith: query settings — Run behavior, timeout 10 s up to 60 s.
  5. Appsmith: setInterval() · passing parameters to queries · telemetry · appsmithctl.
  6. Ollama: the /api/chat API 🔒 local — messages, stream, keep_alive, options.
  7. Postgres on Docker Hub · Ollama on Docker Hub — tags and architectures (arm64).
  8. Docker Compose: GPU support · llama3.1 🔒 local — model size.