AnythingLLM¶
AnythingLLM is an all-in-one AI application that lets you build a private, fully-featured ChatGPT. Connect your favorite local or cloud LLM, ingest your documents, and start chatting in minutes. Out of the box, you get built-in agents, multi-user support, vector databases, and document pipelines with no extra configuration required.
Install AnythingLLM¶
- Follow the AnythingLLM installation guide.
- Install AnythingLLM using either the
Dockerorscriptmethod. - Start the AnythingLLM service.
- Access AnythingLLM on port
3001.
- Follow the AnythingLLM installation guide to set up the self-hosted AnythingLLM requirements, including the
.envfile. -
Add the following external
ls-netnetwork to the AnythingLLM project’sdocker-compose.ymlfile:name: anythingllm services: anything-llm: container_name: anythingllm build: context: ../. dockerfile: ./docker/Dockerfile args: ARG_UID: ${UID:-1000} ARG_GID: ${GID:-1000} cap_add: - SYS_ADMIN volumes: - "./.env:/app/server/.env" - "../server/storage:/app/server/storage" - "../collector/hotdir/:/app/collector/hotdir" - "../collector/outputs/:/app/collector/outputs" user: "${UID:-1000}:${GID:-1000}" ports: - "3001:3001" env_file: - .env networks: - anything-llm - ls-net extra_hosts: - "host.docker.internal:host-gateway" networks: anything-llm: driver: bridge ls-net: external: true
Set up OpenLiteSpeed proxy with AutoSSL¶
The easiest way to install OpenLiteSpeed, configure it as a reverse proxy, and enable AutoSSL is to use the ols1clk script.
Before continuing, ensure that your domain points to the server.
Replace www.example.com with your domain name, and run the following command:
bash <(curl -fsSL https://raw.githubusercontent.com/litespeedtech/ols1clk/master/ols1clk.sh) --proxy-c --proxy-port 3001 --autocert --sitedomain www.example.com
This command automatically:
- Installs OpenLiteSpeed.
- Configures the Example virtual host as a reverse proxy.
- Applies your domain to the listener virtual host mapping.
- Requests and installs SSL certificates using ACME.
-
Download the ols-proxy-docker-env repository:
git clone https://github.com/litespeedtech/ols-proxy-docker-env cd ols-proxy-docker-env -
Copy the example environment file:
cp .env.example .env -
Edit
.envwith your configuration values:OLS_IMAGE=litespeedtech/openlitespeed:latest BACKEND_IP=anythingllm BACKEND_PORT=3001 DOMAIN=www.example.com PROXY_METHOD=context PROXY_SOCKET=false ACME_EMAIL=admin@example.com -
Start the proxy:
docker compose up -d
Verify the proxy configuration¶
Open https://www.example.com in a browser. The application interface should load through OpenLiteSpeed over HTTPS.
Warning
After verifying the configuration, restrict public access to port 3001 with your firewall.
Optional settings¶
You can further enhance your site's security by enabling features such as:
- OWASP protection
- reCAPTCHA
- Per-client throttling
- Realm protection
- IP Allow/Deny
See the OpenLiteSpeed Security Guide for more information.