AI

ARTEX AI Penetration Testing: Self-Hosted Install Guide

ARTEX is a self-hosted AI penetration testing platform. You give it a goal and a scoped target, and an LLM-driven engine plans the work, runs the tools, and writes up what it actually proved. It is open source under AGPL-3.0, and it runs as a Docker Compose stack with PostgreSQL behind it. This guide installs it from the source checkout, points it at a local model instead of a paid API, and drives one scoped run end to end.

Original content from computingforgeeks.com - post 197976

Treat the authorization line as non-negotiable. Point ARTEX only at systems you own or you’re explicitly contracted to test. Everything in our walkthrough targets a local OWASP Juice Shop container on an isolated lab network, nothing public, ever. Every command below was run on a 16-core Ubuntu 24.04 lab VM in November 2026, against ARTEX v0.7.0 driven by a local qwen2.5:7b model, pointed at that single training target. On that CPU-only 7B model the run enumerated Juice Shop under the scope gate but reached no proven finding; the closing section explains why.

How an ARTEX run actually works

ARTEX isn’t one agent spinning in a chat loop. It splits the work between a planner and a pool of workers that coordinate through the database, not through a conversation. That is what lets it keep state across a long run and bind evidence to a claim instead of narrating one.

The planner reads the current situation for a task and dispatches intents, small units of work like enumerate this endpoint or test this parameter. A worker claims the next open intent, runs tools to carry it out, and writes the result back as facts, assets and findings. Each write to the graph wakes the planner, which picks the next move. The loop runs until the planner can prove the goal or hits a budget.

Two graphs hold the state. A shared asset graph is everything ARTEX knows about the target across tasks: hosts, endpoints, parameters, discovered credentials. A per-task exploration graph records how this one run reasoned from the goal down to the intents it dispatched. Every tool call that reaches the target also passes a recording proxy, so the raw request and response are stored and can be bound to a finding later.

This is the piece that separates it from a scanner. A scanner reports a signature match; ARTEX is built around proving a finding with the exchange that demonstrates it. If you want the wider map of where that sits, the difference between DAST, SAST and the rest is a useful frame. The diagram below is the whole loop on one page.

How ARTEX runs a task: the ARTEX engine sends tool calls through the scope and approval gate before they reach the OWASP Juice Shop target, with write-back and graph reads to PostgreSQL and reasoning from a local Ollama

Notice where the controls sit. Nothing reaches the target without crossing the scope and approval gate first, and the write-back path is what turns a worker’s action into stored evidence. Keep that shape in mind as you install it, because most of what you configure later is about those two choke points.

What you need before you start

ARTEX itself is light. The engine and PostgreSQL run comfortably in a couple of gigabytes; what costs you is the model behind it. If you drive it with a hosted API the host needs almost nothing, but running a local model on CPU is where the RAM and cores go. Here’s what the lab host needs.

  • A Linux host with Docker Engine and the Compose v2 plugin
  • git, to clone the repository (the image is built from the checkout)
  • About 4 GB free for ARTEX and PostgreSQL, plus whatever your model needs
  • An isolated lab network with a target you are allowed to test

The model is the part that actually sizes the box. The engine and PostgreSQL sit in a couple of gigabytes, but the LLM behind the workers dominates. Our lab host was 16 cores and 62 GB because a 7B model served from Ollama on CPU wants roughly 6 to 8 GB resident and leans on the cores for every token, and an autonomous run makes a lot of calls. A 7B on CPU is enough to plan and enumerate but slow and shallow for the reasoning that closes an exploit, so a serious run belongs on a GPU or a larger model. If you offload the model to a hosted endpoint instead, the ARTEX host drops back to that 4 GB floor because the heavy lifting happens elsewhere.

PostgreSQL isn’t a separate install. It ships in the Compose file as a pinned postgres:16-alpine service, so you don’t provision a database by hand. For the model, a local runtime keeps every request inside the lab and costs nothing per token, which matters when an autonomous run can burn a lot of them. ARTEX ships from the source checkout rather than a published image, so Docker does the work of building and running it; if containers on Linux servers are new to you, our guide to installing Docker and Docker Compose on Ubuntu gets Docker Engine and the Compose plugin in place first.

Install ARTEX with Docker Compose

Confirm the Docker and Compose versions first. ARTEX wants Compose v2, and the build uses BuildKit, which modern Docker ships by default.

docker version --format '{{.Server.Version}}'
docker compose version

On our lab host these reported a current engine and Compose plugin:

Docker version 29.10.1, build c48360f
Docker Compose version v5.8.1

Clone the repository and move into it. The Compose file builds a local image named artex:local from this checkout on purpose: v0.7.0 publishes no image, and the README says ghcr.io/baarai/artex arrives with the next tagged release, so check the releases page before building.

git clone https://github.com/BaaRai/ARTEX.git
cd ARTEX

The Postgres password is mandatory. Compose refuses to start without it, so create a .env file in the project root and set one. Nothing else is needed to boot.

echo "POSTGRES_PASSWORD=change-this-to-a-strong-value" > .env

Now build the image and bring the stack up. The first build compiles the Go backend and the embedded Next.js console, so it takes a few minutes; later starts reuse the image.

docker compose up -d --build

Compose brings PostgreSQL up first, waits for its health check, then starts ARTEX against it.

Building ARTEX from the checkout with docker compose up and verifying the containers are running

Check that both containers are healthy before you open the console:

docker compose ps

ARTEX binds only to localhost by default, and Postgres is healthy:

NAME               IMAGE                COMMAND                  SERVICE    STATUS                    PORTS
artex-artex-1      artex:local          "/app/start.sh -addr…"   artex      Up 26 minutes             127.0.0.1:8787-8788->8787-8788/tcp
artex-postgres-1   postgres:16-alpine   "docker-entrypoint.s…"   postgres   Up 26 minutes (healthy)   5432/tcp

That 127.0.0.1:8787 bind is deliberate. The console isn’t exposed to the network until you put a reverse proxy in front of it, which is the last section of this guide. Port 8788 is the recording proxy, bound to localhost for the same reason.

Create the admin account with the setup token

On first run ARTEX has no account. Instead of a default password, it prints a one-time setup token to its own log, and the first visit to the console asks for it. That stops a freshly exposed instance from being claimed by whoever reaches it first. Pull the token from the container log:

docker compose logs artex | grep -i "setup token"

Open the console at http://127.0.0.1:8787, paste the token into the setup screen, set your admin password, and click Set password and sign in. That’s the only time the token is used.

ARTEX first-run setup screen asking for the one-time setup token printed in the server log
  1. 1Setup token
  2. 2Set password and sign in

After you sign in, the session survives container rebuilds because the JWT signing key lives in the mounted keys/ directory, not inside the image. You won’t repeat the token dance after an upgrade.

Point ARTEX at a local LLM with Ollama

ARTEX speaks the OpenAI-compatible API, and it treats Ollama as a first-class, keyless provider. Running the model locally keeps every prompt and every captured response inside the lab, and it removes the per-token cost of a long autonomous run. Start Ollama as a sibling container on the Docker network Compose already created for ARTEX (the project name is artex, so the network is artex_default), so the engine can reach it by name.

docker run -d --name ollama --network artex_default --restart unless-stopped -v ollama:/root/.ollama ollama/ollama

With the container running, pull a model into it. We used a 7B here to keep the footprint small.

docker exec ollama ollama pull qwen2.5:7b

In the console, open System then LLM and add a profile. Pick the Ollama format, the one labelled Ollama (local, no key needed), and set the model to the tag you pulled. Then set the base URL to the Ollama endpoint, and here is the catch that trips people up: the base URL needs /v1, because the OpenAI-compatible routes live under that path.

ARTEX LLM profile pointed at a local Ollama server, keyless, with the required /v1 base URL
  1. 1Ollama format
  2. 2Base URL needs /v1

It’s worth proving the gotcha rather than taking it on faith. From inside the ARTEX container, the Ollama server answers the model list on /v1/models:

Reaching the local Ollama API from the ARTEX container: the /v1/models path returns the qwen2.5:7b model list

Drop the /v1 and ask the very same server for /models, and it refuses the route:

docker exec artex-artex-1 wget -S -qO- http://ollama:11434/models

The response header comes back as a plain not found, which is exactly what ARTEX hits when the base URL is missing the suffix:

HTTP/1.1 404 Not Found

One more setting matters when Ollama is on a private address, which it is here. The base URL for the sibling container is http://ollama:11434/v1. The model-list fetch only reaches private endpoints you allow, through ARTEX_LLM_PRIVATE_ENDPOINTS. It is a Compose variable, so add it to the same .env you created for the database password, set it to the host and port ARTEX may probe (ollama:11434 for a sibling container, or host.docker.internal:11434 for Ollama on the host), then run docker compose up -d again so the engine picks it up. Without it, the private fetch is refused by design. On Linux, host.docker.internal only resolves inside the container if the service maps it with extra_hosts: ["host.docker.internal:host-gateway"], which the stock Compose file does not add, so the sibling container path is the simpler one.

Ollama is not the only option. Anything OpenAI-compatible works, so LocalAI slots in the same way, and if you already run a local stack, the pattern is the same one we used when wiring Ollama into a self-hosted chat UI. Pick whichever serves the model; ARTEX only cares about the API shape.

Run a scoped task against OWASP Juice Shop

The target is OWASP Juice Shop, a deliberately vulnerable web app built for exactly this kind of training. Run it on the same Docker network as ARTEX so the engine can reach it by name, and bind it to localhost so it is never exposed off the host.

docker run -d --name juice-shop --network artex_default -p 127.0.0.1:3000:3000 bkimminich/juice-shop

Confirm ARTEX can see it. From the ARTEX container, the Juice Shop homepage answers on its service name:

docker exec artex-artex-1 wget -qO- http://juice-shop:3000/ | head -c 200

The response is the Juice Shop Angular shell, which confirms the network path works:

<!--
  ~ Copyright (c) 2014-2026 Bjoern Kimminich & the OWASP Juice Shop contributors.
  ~ SPDX-License-Identifier: MIT
  -->

<!doctype html>
<html lang="en" data-beasties-container>

Now create the task in the console. Give it a plain-language goal, bind the LLM profile you just added, and, this is the part that keeps you honest, set a scope rule. Add an Allow rule scoped to juice-shop only, matching that one asset. The scope gate is an allow-list, so once a rule exists any asset it doesn’t match is off limits. Note the flip side: with zero allow rules configured the gate is inert and nothing is fenced, which is exactly why you add the rule before the run.

ARTEX task scope gate with an Allow rule that limits the whole run to the juice-shop asset
  1. 1Allow rule
  2. 2juice-shop only

There is one non-obvious switch before the workers can do anything useful. In System Settings, Traffic capture is off by default. With it off, an agent gets no proxy configuration and no HTTP tool, so a web worker falls back to a generic fetch that returns the empty Angular shell and little else. Turn Traffic capture on and the workers get an HTTP tool routed through the recording proxy on 127.0.0.1:8788, and every exchange is stored for evidence. That one setting is the difference between a run that spins and a run that explores.

Start the task. Our detail view shows the planner and the live worker sessions, and the exploration graph fills in as intents are dispatched and claimed.

An ARTEX task running, showing the planner and a live worker session in the task detail view

Watch the Traffic tab while it runs. With capture on, every request a worker makes against Juice Shop lands there in full, which is the raw material a finding is later bound to. If that tab stays empty, the run has no evidence to work from, and you are back to the controls that decide how far it can go.

The controls that keep a run in bounds

An autonomous agent with a shell is a liability unless it’s fenced in. ARTEX stacks several fences, and the first one runs before any tool executes. The interception rules match each command against a priority-ordered list, and the first match wins: Block stops it, Ask holds it for a human, and an unmatched command can fall through to a model judge.

ARTEX command interception rules with built-in block policies matched before any tool runs

The built-in rules are the ones you’d hope an agent never runs: a recursive force delete, deleting critical system directories, mkfs, overwriting a disk with dd, a fork bomb, shutdown or reboot, killing every process, flushing the firewall. These apply to the planner and the main agent too, not just user workers, so the model can’t talk its way past them. The rest of the controls are layered on top.

  • Scope gate: the per-task allow-list you set above, enforced on every action
  • Target gate: an opt-in approval that pins host, port and resolved IPs on every redirect hop, off by default
  • Run budgets: ARTEX_TASK_BUDGET_TOKENS, ARTEX_TASK_BUDGET_TURNS and their per-intent equivalents, so a run cannot spend forever
  • Noise governor: ARTEX_NOISE_PROFILE set to off, quiet, balanced or aggressive to pace requests at the target
  • Untrusted-output boundary: on by default, wrapping tool output so the model treats it as data, not instructions

The budgets and the noise profile are plain Compose variables, so you set them in the same .env as the database password and recreate the stack. A conservative starting point caps each task and paces the requests so a run cannot hammer the target or spend without limit.

ARTEX_TASK_BUDGET_TOKENS=200000
ARTEX_TASK_BUDGET_TURNS=40
ARTEX_NOISE_PROFILE=quiet

Run docker compose up -d again after editing .env so the engine reads the new limits. The noise profile accepts off, quiet, balanced or aggressive; quiet keeps the request rate low, which is what you want against anything but a throwaway lab target.

The container itself is hardened in the Compose file. The agent processes run as an unprivileged executor with no-new-privileges set, and PostgreSQL requires SCRAM auth on every TCP connection, so the agent can’t reach the database without the password even though it shares a network with it. Defense in depth, applied to the thing you’re deliberately letting loose.

What ARTEX counts as a verified finding

A finding is verified only when it carries proof, not when the model just asserts it. Reading the verification code at the v0.7.0 tag, the bar is specific and enforced in the engine, not left to the model’s judgement: a finding needs a bound proof or verification response, a declared proof-of-exploitability level of three or more, and every evidence quote of eight characters or more must be found verbatim in a bound response body. Anything short of that stays unverified. That is a much higher standard than a scanner’s confidence score.

ARTEX per-task exploration graph linking the task goal to the dispatched intents

The mechanics around that bar all hang off the recording proxy. Because capture stores the real exchanges, ARTEX binds a verified finding to the exact request and response in the database, exposes a retest path that re-runs the bound request and can upgrade or clear the finding on the new evidence, and lets you export the captured traffic as HAR for a report. The proof is the exchange itself, not a paraphrase, which is the whole reason the proxy sits in the request path. The retest path, the HAR export and the interception approval records are described here from reading the v0.7.0 source; this lab run did not reach the proven finding that would exercise them. Whether a given run actually reaches that bar depends almost entirely on the model you put behind the workers.

One honest note from the lab on what drives all of this. The engine is only as capable as the model behind it. A 7B model on CPU plans well enough and enumerates the target, but it’s slow and it doesn’t reliably close and prove an exploit on its own. If you want ARTEX to actually land verified findings rather than just map the attack surface, give the workers a capable model, which in practice means a larger model or a GPU. The same lesson shows up whenever you run a small model locally on CPU: it is fine for structure, thin for hard reasoning. Treat the model choice as a capability decision, not a cost afterthought.

Put the console behind HTTPS

ARTEX binds to localhost, so to use it from anywhere but the host you need a reverse proxy, and that proxy must terminate TLS. A console that drives penetration tests and stores captured credentials has no business speaking plain HTTP. Install nginx and certbot first.

sudo apt-get install -y nginx certbot python3-certbot-nginx

The certbot nginx plugin edits an existing server block whose server_name matches your domain; it will not invent one. So write a plain port 80 vhost for the domain first, with the proxy to ARTEX and the WebSocket upgrade headers the live task view needs. Create /etc/nginx/sites-available/artex:

server {
    listen 80;
    server_name artex.example.com;
    location / {
        proxy_pass http://127.0.0.1:8787;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_read_timeout 300s;
    }
}

Enable the vhost, test the syntax, and reload nginx so the port 80 block is live for certbot to find.

sudo ln -s /etc/nginx/sites-available/artex /etc/nginx/sites-enabled/artex
sudo nginx -t
sudo systemctl reload nginx

Now run certbot against that vhost. It copies your HTTP block into a TLS version, obtains the certificate over the ACME HTTP-01 challenge, and with --redirect adds the HTTP to HTTPS redirect. Your proxy and upgrade headers carry over untouched.

sudo certbot --nginx -d artex.example.com --redirect

After certbot finishes, the file holds two server blocks: the original one now listening on 443 with the certificate lines certbot inserted, and a small port 80 block that redirects everything to HTTPS. In this lab the proxy, the redirect and the TLS termination were validated against a private ACME test CA (Pebble), using the documentation name artex.example.com because the lab host had no public DNS. For a certificate a browser trusts, point the same command at a domain you own that resolves publicly, so certbot can complete the Let’s Encrypt HTTP-01 challenge against the real CA.

server {
    server_name artex.example.com;
    location / {
        proxy_pass http://127.0.0.1:8787;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_read_timeout 300s;
    }

    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/artex.example.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/artex.example.com/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}

server {
    if ($host = artex.example.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot
    listen 80;
    server_name artex.example.com;
    return 404; # managed by Certbot
}

Confirm from a client that plain HTTP redirects and the UI serves over TLS.

ARTEX behind an nginx reverse proxy: plain HTTP redirects to HTTPS and the console serves over TLS

TLS is the baseline, not the whole story. Keep the proxy reachable only from trusted IPs with a firewall rule, because exposing an AI pentest console to the open internet turns your own tool into someone else’s. If you also run detection, the inverse problem of how to spot and block AI pentest traffic on the networks you defend is worth reading next.

Tear down the lab

When you’re done, stop everything and remove the data. The -v flag drops the Postgres volume, so the graphs, findings and captured traffic go with it, which is what you want for a throwaway lab.

docker rm -f juice-shop
docker compose down -v

That’s the whole workflow: we build ARTEX from the checkout, give it a local model and a strict scope, and let it run against Juice Shop through the recording proxy. On a CPU-only 7B model that run mapped the target under the scope gate without reaching a proven finding; ARTEX binds the proving exchange to a finding only once a capable model closes the exploit. The engine does the planning, but the scope rule, the interception gate and the model you pick are what decide whether a run stays a controlled test. Keep those tight and ARTEX is a genuinely useful way to see what an AI-driven attacker finds on a target you are allowed to break.

Keep reading

Java4Shell (CVE-2026-114938): Find and Patch Vulnerable JVMs Security Java4Shell (CVE-2026-114938): Find and Patch Vulnerable JVMs UFW Firewall Commands with Examples on Ubuntu 26.04 / 24.04 Security UFW Firewall Commands with Examples on Ubuntu 26.04 / 24.04 Run Amazon Ergo Locally: Hardware Requirements and vLLM Setup AI Run Amazon Ergo Locally: Hardware Requirements and vLLM Setup Join Fedora 45 / 44 to FreeIPA: ipa-client-install, SSSD, sudo Fedora Join Fedora 45 / 44 to FreeIPA: ipa-client-install, SSSD, sudo Find P-256 Keys on Linux and Replace Them: SSH, GPG and TLS Security Find P-256 Keys on Linux and Replace Them: SSH, GPG and TLS How To Reset oVirt or RHEV admin user password oVirt How To Reset oVirt or RHEV admin user password

Leave a Comment

Press ESC to close