For users who need to run Morphik on their own infrastructure, we provide two installation options: Direct Installation and Docker.

Direct Installation

1

Prerequisites

2

Cloning the Repository

To get started with Morphik, we need to first setup the server. This involves cloning the repository, installing the dependencies, and the running the server. You are just a few steps away from accurate, agentic RAG over your multi-modal data!First, let’s clone the repository from GitHub.
git clone https://github.com/morphik-org/morphik-core.git
After cloning the repository, navigate into the morphik-core folder.
cd morphik-core
3

Setting Up the Environment

Installing Python Dependencies

While it is not required, we highly recommend using a virtual environment to ensure dependencies from other projects do not conflict with Morphik. You may use managers like uv or poetry, but for this guide, we will use the built-in venv module.Morphik currently supports Python 3.12 as the latest version. We recommend using Python 3.12 for optimal compatibility.
You don’t need to create a virtual-env or run uv sync yourself—the installer script will handle everything, including installing uv if it’s missing. If you prefer a manual setup at some point, install uv globally (pip install --upgrade uv) and run uv sync to recreate the environment, but this is entirely optional.uv reads the pyproject.toml / uv.lock files, so all dependencies (including optional ones like unstructured) are declared in one place.
If you need additional NLTK data you can still download it afterwards:
python -m nltk.downloader averaged_perceptron_tagger punkt

4

Run the Installer Script

From the project root, run the one-liner below – it auto-detects your platform (macOS or Linux), sets any required build flags, installs dependencies, and starts the server:
# Make the script executable
chmod +x install_and_start.sh

# Run the installer
./install_and_start.sh
The script will:
  1. Create & activate a .venv with uv
  2. Ask about GPU availability for multimodal embeddings
  3. Install colpali-engine (for multimodal document understanding)
  4. Build llama-cpp-python (Metal acceleration on Apple Silicon)
  5. Launch the server via uv run start_server.py
You only need to run ./install_and_start.sh the first time to set up the environment. For future sessions, activate your project directory and simply start the server with:
uv run start_server.py
5

Setting up the Server Parameters

At this point, you may want to customize the server - such as use a different model, enable or disable certain features, etc. - you can do so by editing the morphik.toml file.Morphik now uses a registered models approach, which allows you to define hundreds of different models in one place and reference them throughout your configuration. This makes it easy to mix and match models based on your needs (e.g., smaller models for simpler tasks). You can find more details about configuration here.The installer copies .env.example to .env automatically if it’s missing. After the script finishes, open .env to add any API keys (e.g. OPENAI_API_KEY) or secrets you need. You can tweak morphik.toml anytime to switch completion/embedding models, adjust chunking, or enable advanced features.
6

Launching the Server

You are now ready to launch the Morphik server! Just run the following command to start the server.
uv run start_server.py
You should see the following output:
INFO:     Started server process [15169]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://localhost:8000 (Press CTRL+C to quit)
This means that the server is running on http://localhost:8000. You can now interact with the server using the API or the Python SDK.