-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEAT]: Self-Signed SSL Certificate Support for Local Docker Hosting #2892
Comments
Is this something of value to the community? |
I loaded the documentation and codebase into an AnythingLLM workspace and asked it this question. This is what is says: Key Points from Documentation:
Review of the Provided YAML Configuration:Docker Compose Configuration: version: "3.8"
services:
anythingllm:
image: mintplexlabs/anythingllm:latest
container_name: anythingllm
ports:
- "443:3001" # Map host port 443 to container port 3001
environment:
- STORAGE_DIR=/app/server/storage
- EMBEDDING_ENGINE=native
- VECTOR_DB=lancedb
- LLM_PROVIDER=google_vertex_ai
- LLM_MODEL_NAME=gemini-2.0-flash-exp
- GOOGLE_API_KEY=${GOOGLE_API_KEY}
- ENABLE_HTTPS=true # Enabling HTTPS
- HTTPS_CERT_PATH=/etc/ssl/certs/cert.pem # Correct SSL certificate path
- HTTPS_KEY_PATH=/etc/ssl/private/key.pem # Correct SSL key path
volumes:
- anythingllm_data:/app/server/storage
- ./sslcert:/etc/ssl # Mount the sslcert directory into the container
restart: always
networks:
- app-network
volumes:
anythingllm_data:
driver: local
networks:
app-network:
driver: bridge Validating Each Section:
Conclusion:Based on your information and the typical configuration practices, the provided
Important Recommendations:
If everything aligns with your expectations and setup, you're good to go! If there are specific areas of uncertainty, please share them, and I can help clarify those points. |
What would you like to see?
This feature request proposes adding the capability for AnythingLLM to automatically generate and use a self-signed SSL certificate when running locally via Docker. This would enable secure HTTPS connections for local development and testing without requiring manual certificate generation or configuration.
Motivation:
Currently, when running AnythingLLM locally via Docker, the default is to serve the application over HTTP. While sufficient for basic local testing, there are several benefits to enabling HTTPS even in a development environment:
Proposed Solution:
The core idea is to have AnythingLLM automatically generate a self-signed certificate and configure its internal web server to use it when the application runs within a Docker environment with the potential to control settings via an environment variable).
Implementation Considerations:
Here are some potential ways to implement this, considering the AnythingLLM codebase:
Dockerfile Modification:
openssl
. This script could run during the Docker image build process or, ideally, at container startup to ensure the certificate is fresh (though storing it in the image is simpler)./etc/ssl/certs/anythingllm.crt
and/etc/ssl/private/anythingllm.key
).Backend Application Logic (Node.js):
server.js
or equivalent) to conditionally enable HTTPS. This could be based on:ENABLE_LOCAL_HTTPS=true
.https.createServer()
in Node.js).Docker Compose Configuration (If applicable):
anythingllm
service to control this feature.The text was updated successfully, but these errors were encountered: