Install Morphik on your own infrastructure
Prerequisites
Python
PostgreSQL
Additional Dependencies
Docker (required for background services)
Optional: Running Local Models with Ollama
Cloning the Repository
morphik-core
folder.Setting Up the Environment
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.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.Run the Installer Script
.venv
with uvcolpali-engine
(for multimodal document understanding)llama-cpp-python
(Metal acceleration on Apple Silicon)uv run start_server.py
./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:Setting up the Server Parameters
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.Launching the Server