Journal indexDockup / field note
Note / self-host-anythingllm

How to Self-Host AnythingLLM in 2026: Documents, Embeddings and Persistence

Self-host AnythingLLM with correct ports, persistent storage, HTTPS, secrets, backups and upgrade checks. Learn how to fix when the storage mount is missing.

An AnythingLLM container can be green while the job users care about is broken. For AnythingLLM, that hidden failure is usually that the storage mount is missing or the embedding model changed after indexing. This guide treats “ingest a document, wait for embedding, ask a question whose answer depends on that document and verify the cited source chunk” as the acceptance test and builds the deployment backward from that result.

AnythingLLM has a specific role in the stack: document chat and retrieval without a hand-built pipeline. The production question is therefore not whether port 3001 answers once, but whether state, dependencies and the public address continue to agree after a restart, update and restore.

Ports, processes and private services

A useful AnythingLLM diagram shows the public route, private port 3001, state boundary and every supporting requirement. Mark which arrows carry credentials and which are ordinary user traffic. The network contract for AnythingLLM is an embedding provider, LLM provider and enough storage for documents. Keep private endpoints on internal DNS, permit only required outbound calls and give AnythingLLM a scoped service credential.

Prove the diagram with one real action: ingest a document, wait for embedding, ask a question whose answer depends on that document and verify the cited source chunk. The likely pressure comes from document parsing, embedding throughput, vector-store size and the context sent to the selected model; monitor that path rather than treating all HTTP requests as equal.

Make AnythingLLM recovery measurable

Inventory every durable artifact: documents, vector indexes, workspaces and application settings. Mount /app/server/storage before bootstrap, write harmless sample data and replace the container to prove that path is actually persistent. Include configuration that changes how stored data is interpreted, not only the largest directory.

Set retention, copy backups off-host and run a clean-room restore. The AnythingLLM drill is complete when documents, embeddings, workspace membership and provider settings restore together and answer the same evidence-based question. If snapshots are part of the plan, use PITR versus snapshot guidance to document what each mechanism can recover.

Choose the AnythingLLM trust boundary

After first login, review what an anonymous visitor, ordinary user and administrator can each do. The AnythingLLM failure to avoid is treating the workspace login as a substitute for isolating provider keys. The intended policy is to scope members to workspaces and keep LLM, embedding and vector-database credentials on the server.

Generate JWT_SECRET as a long random value; rotating it normally invalidates sessions or tokens, so plan the user impact rather than calling it an encryption migration. Keep dependency accounts separate from human accounts, deny unused egress where practical and cap work influenced by document parsing, embedding throughput, vector-store size and the context sent to the selected model.

What must pass before real AnythingLLM data arrives

The release record for AnythingLLM needs facts, not “looks good.” Store the selected image digest, configuration checksum, public hostname and a timestamped result for: ingest a document, wait for embedding, ask a question whose answer depends on that document and verify the cited source chunk. Use non-production sample data so the check can run after every deployment.

Prove two lifecycle events separately. A container replacement must preserve normal operation; a clean recovery must show that documents, embeddings, workspace membership and provider settings restore together and answer the same evidence-based question. While the checks run, measure document parsing, embedding throughput, vector-store size and the context sent to the selected model and retain the result as the expected envelope for this version.

Test a denied or invalid condition as well: temporarily deny the test identity access to an embedding provider, LLM provider and enough storage for documents. AnythingLLM should fail in a diagnosable way and should not overwrite healthy state. Return the valid condition, rerun the sample and attach the relevant redacted logs. Those artifacts give a future rollback decision concrete evidence.

Build a replaceable AnythingLLM container

A minimal command is useful when it reveals what the platform will later manage.

docker run -d \
  --name anythingllm \
  --restart unless-stopped \
  -p 127.0.0.1:3001:3001 \
  -v anythingllm-data:/app/server/storage \
  -e JWT_SECRET=replace-with-a-long-random-value \
  mintplexlabs/anythingllm:latest

Here port 3001 remains host-private and every required path is explicit. Add the reviewed connection settings for an embedding provider, LLM provider and enough storage for documents; use private names for private services. Verify startup with both logs and the application-specific proof: ingest a document, wait for embedding, ask a question whose answer depends on that document and verify the cited source chunk. Once verified, lock the image version so a routine replacement does not silently change behavior.

Test AnythingLLM from outside the server

Avoid temporary and permanent public origins for AnythingLLM. Instead, use the external HTTPS origin for browser and API access, point the chosen DNS name at the platform route and proxy only to port 3001.

Exercise this action from outside the host: ingest a document, wait for embedding, ask a question whose answer depends on that document and verify the cited source chunk. If ingress fails, the 502 troubleshooting guide covers port and listener mistakes. If AnythingLLM receives the request but the storage mount is missing or the embedding model changed after indexing, the evidence now points beyond the proxy.

Failure drills for AnythingLLM

Build dashboards around document parsing, embedding throughput, vector-store size and the context sent to the selected model. A CPU graph without that workload context cannot explain why AnythingLLM is slow. Add a synthetic or scheduled check that tries to ingest a document, wait for embedding, ask a question whose answer depends on that document and verify the cited source chunk using harmless test data.

Before upgrading, account for this application-specific hazard: changing an embedding model may require re-indexing, while application releases can migrate workspace and vector metadata. Restore a recent backup into an isolated deployment, run migrations there and compare behavior. If the storage mount is missing or the embedding model changed after indexing, inspect the boundary involved — public origin, storage or dependency — before touching unrelated settings.

What Dockup should automate for AnythingLLM

For AnythingLLM, Dockup can create the route and TLS certificate, preserve mounts, deliver secrets and place an embedding provider, LLM provider and enough storage for documents on private networking while deploying to either Dockup or attached servers.

The release gate is still the concrete AnythingLLM transaction: ingest a document, wait for embedding, ask a question whose answer depends on that document and verify the cited source chunk. Also verify the restore condition — documents, embeddings, workspace membership and provider settings restore together and answer the same evidence-based question. Those two checks show whether the deployment works and whether it can be recovered.

Frequently asked questions

What does AnythingLLM need for a production deployment?

Route the AnythingLLM container on port 3001 through one HTTPS origin. The supporting network requirement is an embedding provider, LLM provider and enough storage for documents. Do not call AnythingLLM ready until you can ingest a document, wait for embedding, ask a question whose answer depends on that document and verify the cited source chunk.

Which AnythingLLM data belongs in a backup?

Persist /app/server/storage and include documents, vector indexes, workspaces and application settings in the same recovery manifest. A clean AnythingLLM restore passes only when documents, embeddings, workspace membership and provider settings restore together and answer the same evidence-based question.

Does AnythingLLM require HTTPS behind a reverse proxy?

Use HTTPS for the public AnythingLLM origin and keep port 3001 on the internal route. Apply the AnythingLLM setting correctly: use the external HTTPS origin for browser and API access. For AnythingLLM, HTTPS protects credentials or user content in transit and keeps origin-sensitive client behavior consistent.

How should an AnythingLLM upgrade be tested?

Restore current AnythingLLM state into an isolated deployment, apply the candidate version and repeat its acceptance transaction. Pay particular attention because changing an embedding model may require re-indexing, while application releases can migrate workspace and vector metadata. Keep the previous AnythingLLM image until its data-migration and rollback boundary are understood.