This repository provides a highly secure, client-server system for hosting large language models (like HauhauCS/Qwen3.5-35B-A3B-Uncensored-HauhauCS-Aggressive).
The system guarantees that user data is protected against interception and that the remote server itself does not persist or leak user prompts or responses.
llama-cpp-python on your GPU, and returns AES-encrypted responses./v1/chat/completions API to your local applications. It handles context truncation locally, encrypts your prompt, securely communicates with the remote server, and decrypts the response.Before you begin, ensure you have the following installed on both your server and client machines:
curl -LsSf https://astral.sh/uv/install.sh | sh
The server needs to be compiled with CUDA support so the model runs on your GPU. The server code is already configured to offload 100% of the model layers to the GPU (n_gpu_layers=-1).
Clone the repository and enter the server directory:
cd server
Install dependencies with GPU (CUDA) support:
By default, llama-cpp-python installs for CPU. To force it to compile for your NVIDIA GPU, run the following commands:
# Initialize the environment
uv sync
# Force reinstall llama-cpp-python with CUDA enabled
CMAKE_ARGS="-DGGML_CUDA=on" uv pip install llama-cpp-python --force-reinstall --no-binary llama-cpp-python --no-cache
Run the Server:
The server defaults to automatically downloading and using the HauhauCS/Qwen3.5-35B-A3B-Uncensored-HauhauCS-Aggressive-Q8_0.gguf model.
# Start the server (binds to 0.0.0.0 so external clients can reach it)
uv run uvicorn main:app --host 0.0.0.0 --port 8000
Optional Configuration:
export MODEL_PATH="/path/to/model.gguf"export MOCK_MODE="True"The client runs locally on your computer and acts as a bridge between your chat apps (like Jan or SillyTavern) and the encrypted server.
Enter the client directory:
cd client
Install dependencies:
uv sync
Configure and Run the Client:
You must tell the client the IP address of your remote server. Replace <remote_server_ip> with your actual server IP.
export SERVER_URL="http://<remote_server_ip>:8000"
# Start the local proxy (binds to 127.0.0.1 for security)
uv run uvicorn main:app --host 127.0.0.1 --port 8080
Now that the local client proxy is running, you can configure your local LLM application (e.g., SillyTavern, Chatbox, Jan, or any OpenAI-compatible app) to use it!
OpenAIhttp://127.0.0.1:8080/v1sk-1234 (Can be anything, it is ignored)Example cURL test from your local PC:
curl http://127.0.0.1:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"messages": [
{"role": "user", "content": "Hello, are you running securely?"}
]
}'
2 commits
Python
100.0%
This repository provides a highly secure, client-server system for hosting large language models (like HauhauCS/Qwen3.5-35B-A3B-Uncensored-HauhauCS-Aggressive).
The system guarantees that user data is protected against interception and that the remote server itself does not persist or leak user prompts or responses.
llama-cpp-python on your GPU, and returns AES-encrypted responses./v1/chat/completions API to your local applications. It handles context truncation locally, encrypts your prompt, securely communicates with the remote server, and decrypts the response.Before you begin, ensure you have the following installed on both your server and client machines:
curl -LsSf https://astral.sh/uv/install.sh | sh
The server needs to be compiled with CUDA support so the model runs on your GPU. The server code is already configured to offload 100% of the model layers to the GPU (n_gpu_layers=-1).
Clone the repository and enter the server directory:
cd server
Install dependencies with GPU (CUDA) support:
By default, llama-cpp-python installs for CPU. To force it to compile for your NVIDIA GPU, run the following commands:
# Initialize the environment
uv sync
# Force reinstall llama-cpp-python with CUDA enabled
CMAKE_ARGS="-DGGML_CUDA=on" uv pip install llama-cpp-python --force-reinstall --no-binary llama-cpp-python --no-cache
Run the Server:
The server defaults to automatically downloading and using the HauhauCS/Qwen3.5-35B-A3B-Uncensored-HauhauCS-Aggressive-Q8_0.gguf model.
# Start the server (binds to 0.0.0.0 so external clients can reach it)
uv run uvicorn main:app --host 0.0.0.0 --port 8000
Optional Configuration:
export MODEL_PATH="/path/to/model.gguf"export MOCK_MODE="True"The client runs locally on your computer and acts as a bridge between your chat apps (like Jan or SillyTavern) and the encrypted server.
Enter the client directory:
cd client
Install dependencies:
uv sync
Configure and Run the Client:
You must tell the client the IP address of your remote server. Replace <remote_server_ip> with your actual server IP.
export SERVER_URL="http://<remote_server_ip>:8000"
# Start the local proxy (binds to 127.0.0.1 for security)
uv run uvicorn main:app --host 127.0.0.1 --port 8080
Now that the local client proxy is running, you can configure your local LLM application (e.g., SillyTavern, Chatbox, Jan, or any OpenAI-compatible app) to use it!
OpenAIhttp://127.0.0.1:8080/v1sk-1234 (Can be anything, it is ignored)Example cURL test from your local PC:
curl http://127.0.0.1:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"messages": [
{"role": "user", "content": "Hello, are you running securely?"}
]
}'
2 commits
Python
100.0%