SSD Nodes Learn Hosting plans →
Guides Matt ConnorBy Matt Connor

Self-host LiveContext, an n8n alternative

LiveContext CE is a seven container Docker stack with a Java backend that wants 8 GB. Size it, pin the version, put Traefik in front, and back up both stores.

What LiveContext is, and what it costs to run

To self-host LiveContext you need a VPS with about 8 GB of RAM. LiveContext CE is a source-available automation platform that runs AI agents inside the automation itself, and it ships as a Docker Compose stack of seven containers built around a Java backend, one of them a one shot job that exits after setup. The vendor's self-hosting docs ask for 4 GB minimum and 8 GB recommended, the README of its npm launcher now says 6 GB minimum, and the compose file shows where that memory goes.

The project was published as livecontext-ai/livecontext-ce on GitHub under AGPL-3.0, but CE is no longer AGPL. The licence shipped with the current release is the LiveContext Sustainable Use License 1.1, a source-available licence that lets you run and modify CE, including in production inside your own business, but forbids offering it to third parties on a hosted or embedded basis to compete with LiveContext's paid versions. The vendor's npm launcher shows the switch: livecontext@0.2.11 declared AGPL-3.0-only, while livecontext@0.3.8 points to that licence file. As of 13 October 2026 the GitHub repository and the livecontext-ai organisation both return 404, although the vendor docs still tell you to clone it, so this guide takes the release files from the npm package instead. The current release is v0.3.8, published on 9 October 2026. Every LiveContext image is built for linux/amd64 only, which rules out the cheap Arm plans. This guide pins that tag, puts the stack behind a reverse proxy, and turns the upstream backup advice into commands.

Size the VPS before you self-host LiveContext

Most services in the shipped compose file carry an explicit memory limit, so you can size the box before you rent it. Two do not: the one shot minio-init job and the frontend. These are the limits written into the v0.3.8 compose file, not measured usage.

ChartMemory limits in the LiveContext CE v0.3.8 compose file, MB
The data behind this chart
[
  {
    "label": "livecontext (backend)",
    "memory_limit_mb": 2048
  },
  {
    "label": "bridge",
    "memory_limit_mb": 512
  },
  {
    "label": "postgres",
    "memory_limit_mb": 512
  },
  {
    "label": "redis",
    "memory_limit_mb": 384
  },
  {
    "label": "minio",
    "memory_limit_mb": 256
  },
  {
    "label": "websearch (optional)",
    "memory_limit_mb": 2048
  },
  {
    "label": "searxng (optional)",
    "memory_limit_mb": 512
  },
  {
    "label": "renderer (optional)",
    "memory_limit_mb": 1024
  }
]

The backend alone is capped at 2048 MB. That cap sits over a Java 21 process whose heap is set to 1 GiB (-Xmx1024m with ZGC), and the compose file's own comment says the heap grows to that full GiB, with the JVM's own overhead on top. The five base services with limits add up to about 3.6 GB, and the frontend carries no limit at all, so it takes what Node asks for. On a 4 GB VPS those limits alone leave a few hundred MB for the frontend, the kernel and the page cache, which is why the launcher's README now puts the minimum at 6 GB even though the self-hosting docs still say 4 GB.

The optional profiles are what push the box to 8 GB. The browser agent profile adds a Chromium container capped at 2048 MB next to a SearXNG search instance, and the renderer profile adds another 1024 MB for screenshots and PDFs. Neither starts unless you enable its profile, so leave both off until you need them. The Chromium container is built locally from a websearch-service directory that the npm package does not ship, so with the GitHub repository unreachable the browser agent profile cannot be built from the published files as of 13 October 2026. The renderer uses a published image and is unaffected. That SearXNG container exists to be the agent's search backend, so the pages it returns arrive in your prompts as untrusted text, which is the trust boundary that giving an AI agent SearXNG web search works through in detail.

If you already run n8n, plan to replace it rather than to add to it. The stack in our guide to running n8n on a VPS with Docker and HTTPS is one Node process next to Postgres, and it is comfortable on a small box. LiveContext reserves more for its backend alone than that whole stack uses. Two automation platforms on one 8 GB VPS will fit right up until both run a job at the same minute. If you do share a host, put explicit limits on everything else too, using the method in our post on setting memory limits in Docker Compose, so one runaway workflow cannot take the machine down with it.

Install LiveContext with Docker Compose, pinned to a tag

Start from a clean Ubuntu 24.04 VPS with Docker Engine 24 or newer and Compose v2. If Docker is not installed yet, follow our Docker Compose basics for a VPS first, then come back.

The launcher README offers npx livecontext@latest as a one line start. That is fine on a laptop, but the launcher recopies its compose file on every run and the images it names are tagged latest. On a server you want the compose file sitting in a directory you control, pinned to one release, so an upgrade is a file you can diff. The vendor docs still describe a git clone of the GitHub repository for this, but that repository returns 404 as of 13 October 2026, so take the same two files, the compose file and the example env file, from the npm package of the release you want.

sudo apt update && sudo apt install -y npm
npm view livecontext version
mkdir -p ~/livecontext-ce/docker ~/livecontext-ce/catalog-seeds
cd ~/livecontext-ce
npm pack livecontext@0.3.8
tar xzf livecontext-0.3.8.tgz
cp package/assets/docker-compose.yml .
cp package/assets/.env.example docker/.env.ce
chmod 600 docker/.env.ce

The compose file bind-mounts ./catalog-seeds into the backend, which is why the directory is created above. The npm launcher fills it with a model catalog bundle it downloads at start, and the stack starts with it empty.

The compose file in the npm package names every LiveContext image with the latest tag, for example ghcr.io/livecontext-ai/livecontext-ce:latest, even though its own header comment says the tag is pinned to the release. Pin it yourself before the first start. The vendor publishes the same release tags on Docker Hub under the livecontext namespace, where v0.3.8 was listed for the backend, frontend, bridge and renderer images on 13 October 2026, so point the four images there:

sed -i -E 's#ghcr\.io/livecontext-ai/(livecontext-ce[a-z-]*):latest#livecontext/\1:v0.3.8#' docker-compose.yml
grep -n 'image:' docker-compose.yml

Taking the compose file from the same release as the images is what keeps the two in step, because the compose file for v0.3.8 was written against those images. Do not leave the tags on latest. A latest tag moves under you, and the backend runs its database migrations on every start, so an accidental pull can move your schema forward at 3 a.m. with no way back except a restore.

Edit docker/.env.ce before the first start (the next section lists what to change), then bring the stack up.

docker compose --env-file docker/.env.ce up -d
docker compose --env-file docker/.env.ce ps

Use the same --env-file flag on every compose command in this guide. Compose reads that file fresh on each invocation, so a command without the flag falls back to the defaults baked into the compose file and can publish different ports than the ones you configured.

The backend healthcheck has a start_period of 120s and polls /actuator/health, so docker compose ps reports the livecontext service as health: starting for roughly the first two minutes while the schema migrations and the tool registration run. That is normal. A quick check from the server:

curl -s localhost:8080/actuator/health

This should print {"status":"UP"}. When it does, open the web UI on port 3000. The first account you create becomes the admin, and public registration closes after that unless an admin reopens it, so create yours before the port is reachable by anyone else. This is the single most important reason not to publish port 3000 to the internet on day one.

The env values you must change

The example file ships working defaults so the stack starts on a laptop. Several of them are unsafe on a public server.

DB_PASSWORD=<random>
MINIO_ROOT_USER=<not minioadmin>
MINIO_ROOT_PASSWORD=<random>
CREDENTIAL_ENCRYPTION_PASSWORD=<random>
CREDENTIAL_ENCRYPTION_SALT=<random>
ANTHROPIC_API_KEY=sk-ant-...
FRONTEND_PORT=3000
BACKEND_PORT=8080
PUBLIC_BASE_URL=https://lc.example.com
GATEWAY_PUBLIC_URL=https://lc-api.example.com

Generate each random value with openssl rand -base64 32. Notes on the ones that bite:

  • DB_PASSWORD and MINIO_ROOT_PASSWORD ship as postgres and minioadmin. The compose file passes DB_PASSWORD to Postgres as its POSTGRES_PASSWORD. Neither database port is published to the host, so they are not exposed directly, but any container you later attach to the same network can reach both with the documented default.
  • CREDENTIAL_ENCRYPTION_PASSWORD and CREDENTIAL_ENCRYPTION_SALT ship commented out and are auto-generated on first boot when left empty. Set them yourself instead. The credentials your workflows store are encrypted with that pair, so a database dump restored on a new box without the same password and salt gives you credential rows nothing can read. Set them once, then treat docker/.env.ce as part of the backup.
  • FRONTEND_PORT and BACKEND_PORT are substituted into the port mappings as ${FRONTEND_PORT:-3000}:3000 and ${BACKEND_PORT:-8080}:8080. The example env file ships both commented out, as # FRONTEND_PORT=3000 and # BACKEND_PORT=8080, so the defaults 3000 and 8080 apply until you uncomment a line to override it.
  • PUBLIC_BASE_URL is the browser-facing address of the web UI, and the example file asks server installs to set it alongside GATEWAY_PUBLIC_URL. Write both without a trailing slash, because the example file warns that one breaks OAuth callbacks.
  • GATEWAY_PUBLIC_URL is the browser-facing origin of the backend. It matters as soon as a reverse proxy is involved. See the next section.
  • The model keys (ANTHROPIC_API_KEY, OPENAI_API_KEY, GOOGLE_API_KEY, and optionally MISTRAL_API_KEY or DEEPSEEK_API_KEY) live here in plain text. Fill in only the provider you actually use.

What the seven containers do

  • postgres runs pgvector/pgvector:pg16 as container livecontext-db, holding the database named livecontext. The pgvector extension is there for embedding search, so a plain postgres:16 image will not do.
  • redis runs redis:7-alpine with appendonly yes and --maxmemory-policy noeviction. That policy is deliberate: Redis carries queue and run state here, so when it hits its memory ceiling it returns an error to the writer instead of silently dropping keys. An error you can see beats work that vanishes.
  • minio is the S3-compatible object store for files that move through workflows.
  • minio-init is a one shot container that runs mc mb myminio/workflow-files --ignore-existing at startup, creates the bucket, and exits. Seeing minio-init as exited (0) in docker compose ps is the healthy state.
  • bridge holds the CLI adapters and the MCP (model context protocol) tools. It listens on 8093 inside the Docker network and is not published to the host.
  • livecontext is the backend, one Java 21 monolith on port 8080. It runs the workflow engine, the schedulers and the agents.
  • frontend is the Next.js web UI on port 3000. Only these last two are published to the host.

State lives in seven named volumes: livecontext_data for Postgres, livecontext_redis, livecontext_minio, livecontext_keys, livecontext_bridge_secret, livecontext_cli_home, and livecontext_logs. Compose prefixes them with the project name, which the compose file sets to livecontext-ce, so the real volume on disk is called something like livecontext-ce_livecontext_minio. The npm launcher overrides that name with -p livecontext, so a box that once ran npx livecontext carries a second set prefixed livecontext_. Run docker volume ls and copy the exact names before you write any backup script against them.

docker compose down -v deletes all seven volumes. The vendor docs say never to run it, because it is the fastest way to lose every workflow you built. The -v is the whole difference.

Put it behind Traefik instead of publishing port 3000

Publishing ports 3000 and 8080 on a public VPS exposes the app with no TLS (transport layer security) and no gate in front of admin registration. A ufw rule is not enough on its own, because Docker inserts its own iptables rules for published ports ahead of the chain ufw manages, so a port published to 0.0.0.0 stays reachable even when ufw says the port is denied.

The clean fix is to publish nothing and let the proxy reach the containers over a shared Docker network. Create docker-compose.override.yml next to docker-compose.yml:

services:
  frontend:
    ports: !override []
    networks:
      - default
      - proxy
  livecontext:
    ports: !override []
    networks:
      - default
      - proxy

networks:
  proxy:
    external: true

Two details decide whether this works. !override replaces the ports list instead of merging with it, which needs Compose v2.24 or newer: check with docker compose version, because on an older Compose the two lists merge and the ports stay published. And default has to stay in each networks list, because naming any network replaces the default one, so leaving it out cuts the backend off from Postgres and Redis and the frontend off from the backend. Confirm the merged result before starting anything:

docker compose --env-file docker/.env.ce config

The routers, the certificate resolver and the HTTP to HTTPS redirect are the same as for any other app, so follow our Traefik reverse proxy guide for running multiple apps on one VPS rather than writing new TLS config here. Route one hostname to frontend on port 3000 and a second to livecontext on port 8080.

The second hostname is not optional. The web UI calls the backend from the browser, so the backend needs its own origin that a browser can reach. Set GATEWAY_PUBLIC_URL in docker/.env.ce to that backend URL, for example https://lc-api.example.com, and PUBLIC_BASE_URL to the frontend URL. Skip it and the page loads normally while every action fails, because the UI resolved the backend origin from the address you opened it with and is calling a port your proxy never published.

Since the sign-up page is open to whoever reaches it first, it is worth putting forward auth on the frontend router so nobody sees that page without authenticating at the proxy, which is what running Authentik as your own SSO layer adds on top of the same Traefik setup.

Where the model key goes, and why an idle instance still costs money

Agents run inside the automation here, which changes the economics compared with a plain workflow tool. The provider key sits in docker/.env.ce as ANTHROPIC_API_KEY or OPENAI_API_KEY, is read by the backend and the bridge at startup, and applies to the whole instance. It is not scoped per user. Anyone who holds an account on your instance and can build an agent is spending that key, and the first person to register is an admin. If what you need is per-person agents and spend you can actually attribute to a colleague, self-hosting OneCLI as a one agent per person harness answers the same key problem from the other side by putting every model key behind a gateway that knows who is calling.

Three habits keep the bill predictable. Create a separate provider key for this VPS so you can revoke it without touching anything else. Set a hard spend cap in the provider console, because that limit is the only one outside the machine you are securing. Then use the per-agent credit budgets and per-agent metrics that LiveContext exposes, so a single loop cannot drain the key before you notice.

Idle cost is not zero once an agent sits on a schedule. A schedule trigger fires whether or not anyone is watching, and every firing sends tokens. A five minute schedule is 288 runs a day, and an agent that reads a page and decides to do nothing still pays for reading the page. Put your first agents on a webhook or a chat trigger, watch the real spend for a week, and move to a schedule after you know the per-run cost.

Back up Postgres and the object store

There are two data stores plus two places that hold secrets, the env file and the livecontext_keys volume, which the vendor docs list among the volumes to back up. Losing any of them loses your instance. Take the database and the bucket in the same window, with the backend stopped, so a file cannot be written after its database row was dumped.

cd ~/livecontext-ce
mkdir -p ~/backups
docker compose --env-file docker/.env.ce stop livecontext frontend
docker compose --env-file docker/.env.ce exec -T postgres \
  pg_dump -U postgres -d livecontext --clean --if-exists \
  | gzip > ~/backups/livecontext-db-$(date +%F).sql.gz

Use whatever you set as DB_USERNAME in place of postgres if you changed it. Then copy the object store and keys volumes, using the prefixed names that docker volume ls printed:

docker run --rm \
  -v livecontext-ce_livecontext_minio:/data \
  -v ~/backups:/backup \
  alpine tar czf /backup/livecontext-minio-$(date +%F).tgz -C /data .
docker run --rm \
  -v livecontext-ce_livecontext_keys:/data \
  -v ~/backups:/backup \
  alpine tar czf /backup/livecontext-keys-$(date +%F).tgz -C /data .
docker compose --env-file docker/.env.ce start livecontext frontend
cp docker/.env.ce ~/backups/env.ce.$(date +%F)

Check the dump is not empty before you trust it: gunzip -c ~/backups/livecontext-db-*.sql.gz | head -20 should show CREATE TABLE and DROP TABLE statements, not a one line error. Then copy all four files off the server, along with docker-compose.yml and your override file. A backup that lives only on the machine it protects is not a backup.

To restore onto a fresh box, install the same tag, put the saved docker/.env.ce back so the credential encryption password and salt match, start the stack once so the volumes exist, stop the backend, unpack the keys archive into the keys volume the same way it was taken, then load the dump:

gunzip -c livecontext-db-2026-08-10.sql.gz \
  | docker compose --env-file docker/.env.ce exec -T postgres psql -U postgres -d livecontext

Upgrades, and getting back when one goes wrong

Take a dump first, every time. The backend applies its schema migrations on startup and migrations only move forward, so going back to the older tag after a bad upgrade leaves old code running against a newer schema. Rollback means restoring the dump, which is why the dump comes first.

cd ~/livecontext-ce
npm view livecontext version
TAG=0.3.8
npm pack "livecontext@$TAG"
rm -rf package && tar xzf "livecontext-$TAG.tgz"
cp docker-compose.yml docker-compose.yml.prev
cp package/assets/docker-compose.yml .
sed -i -E "s#ghcr\.io/livecontext-ai/(livecontext-ce[a-z-]*):latest#livecontext/\1:v$TAG#" docker-compose.yml
diff docker-compose.yml.prev docker-compose.yml
docker compose --env-file docker/.env.ce pull
docker compose --env-file docker/.env.ce up -d
docker compose --env-file docker/.env.ce logs -f livecontext

Set TAG to the version that the second command printed. Watch the backend log until the health endpoint answers again. Your docker-compose.override.yml is not part of the package, so copying in the new compose file leaves it in place, but read the diff the diff command prints, because a new service or a renamed one can make your override stale without any error message. Compare docker/.env.ce with package/assets/.env.example too, since new settings arrive there.

Failure modes, with the strings you will see

A container keeps restarting and docker compose ps shows exited (137). That is the kernel out-of-memory killer, and docker inspect livecontext-app confirms it with "OOMKilled": true in the state block. The backend hit its 2048M limit, or the host ran out of memory first. Check free -m before raising any limit, because raising a container limit on a host with nothing spare just moves the kill to a different container.

The pull fails with no matching manifest for linux/arm64/v8 in the manifest list entries. The images are published for linux/amd64 only. An Arm VPS cannot run this stack from the published images, and emulation through QEMU is far too slow for a JVM plus Chromium. Move to an x86 plan.

Bind for 0.0.0.0:3000 failed: port is already allocated. Something else on the host already holds that port. Set FRONTEND_PORT in docker/.env.ce, or apply the override above and publish nothing at all.

The UI is up but the login request fails after you add the proxy. The browser is calling the backend on an origin your proxy does not serve. Open the browser network tab and look at the failing request host. Set GATEWAY_PUBLIC_URL to the public backend URL and recreate the frontend container, because that value is read at startup.

Everything is healthy but files uploaded in a workflow vanish. Check that minio-init shows exited (0) rather than a non-zero code. If the bucket workflow-files was never created, the backend has nowhere to put objects.

Choose LiveContext or n8n

Pick LiveContext when the agent is the point: you want the model to build and run the automation, and you accept an 8 GB box and a Java service as the price. Pick n8n when you want deterministic workflows, a large node library and a footprint that shares a VPS with other services. The licences no longer separate the two. LiveContext CE moved from AGPL-3.0 to the LiveContext Sustainable Use License 1.1, a source-available licence from the same fair-code family as n8n's Sustainable Use License, so read the hosting restriction before you offer either one to anyone outside your company. Self-hosted n8n also holds a handful of features back for paying customers, so check which parts of n8n are free and which need a licence key before you build a team workflow around one of them. The version numbers here are young, v0.3.8 as of 13 October 2026, and the 0.3 line shipped nine releases between 22 September and 9 October 2026, so pin your version and read what changed before every upgrade. For the wider field, including the tools that sit between these two positions, see our roundup of self-hosted n8n alternatives rather than reading a comparison of only these two.

FAQ

How much RAM does a self-hosted LiveContext need?

Plan for 8 GB. The vendor's self-hosting docs list 4 GB as the minimum and 8 GB as the recommendation, the launcher's README now says 6 GB minimum, and the shipped compose file explains why: the backend alone is capped at 2048 MB, and the five base services with limits together come to about 3.6 GB before the unlimited frontend container. Enabling the browser agent profile adds another 2048 MB for Chromium plus a SearXNG container, so 8 GB stops being optional at that point.

Can I run LiveContext on an Arm VPS?

No. Every published LiveContext image for v0.3.8 is built for linux/amd64, so docker compose up on an Arm plan fails at the pull with no matching manifest for linux/arm64/v8 in the manifest list entries. Running it under QEMU emulation is possible in theory and unusable in practice for a JVM workload. Choose an x86 plan.

Where do I put my model API key?

In docker/.env.ce, as ANTHROPIC_API_KEY, OPENAI_API_KEY or GOOGLE_API_KEY, before the first start. The backend and the bridge read it at startup, and it applies to the whole instance rather than to one user. Keep the file at mode 600, use a key created only for this server so you can revoke it on its own, and set a spend cap in the provider console, because that cap is the only limit that lives outside the machine.

How do I back up LiveContext?

Four things: a pg_dump of the livecontext database, a copy of the MinIO volume, a copy of the livecontext_keys volume, and the docker/.env.ce file. Stop the livecontext and frontend services while you take the dump and the volume copies so the database and the object store agree with each other. The env file matters because the credentials stored in your workflows are encrypted with CREDENTIAL_ENCRYPTION_PASSWORD and CREDENTIAL_ENCRYPTION_SALT, so a restore without those values leaves credential rows that nothing on the new box can read.

Why does the backend sit at health: starting for minutes after boot?

The compose healthcheck sets start_period: 120s and polls /actuator/health, so Docker reports the service as starting while the schema migrations and the tool registration run. Two to three minutes on first boot is expected. If it never turns healthy, read docker compose logs -f livecontext. A stack that stops at the migration step is usually pointed at a database volume from a newer release.

Was this article useful?