{"slug": "deploying-jina-serve-open-source-neural-search-and-ai-serving-framework-on-24-04", "title": "Deploying Jina Serve Open-Source Neural Search and AI Serving Framework on Ubuntu 24.04", "summary": "A developer deployed Jina Serve, an open-source framework for neural search and multimodal AI, on Ubuntu 24.04 using Docker Compose and Traefik for automatic HTTPS. The setup includes a custom text executor that processes documents via /index and /search endpoints, with the entire stack containerized and secured behind a reverse proxy.", "body_md": "Jina Serve is an open-source framework for building neural search and multimodal AI applications, with a cloud-native runtime that handles dynamic batching, async streaming, and microservice orchestration. This guide deploys a Jina Flow with a custom text executor using Docker Compose, with Traefik handling automatic HTTPS in front of the gateway. By the end, you'll have a Jina Flow serving an `/index`\n\nand `/search`\n\nAPI securely at your domain.\n\n**1. Create the project directory structure:**\n\n``` bash\n$ mkdir -p ~/jina-serve/executor\n$ cd ~/jina-serve\n```\n\n**2. Create the executor module:**\n\n``` bash\n$ nano executor/executor.py\npython\nfrom jina import Executor, requests\nfrom docarray import BaseDoc, DocList\n\nclass TextDoc(BaseDoc):\n    text: str = \"\"\n\nclass TextProcessor(Executor):\n    @requests(on=\"/index\")\n    def index(self, docs: DocList[TextDoc], **kwargs) -> DocList[TextDoc]:\n        for doc in docs:\n            if doc.text:\n                doc.text = doc.text.upper()\n        return docs\n\n    @requests(on=\"/search\")\n    def search(self, docs: DocList[TextDoc], **kwargs) -> DocList[TextDoc]:\n        return docs\n```\n\n**3. Pin the executor's Python dependencies:**\n\n``` bash\n$ nano executor/requirements.txt\njina==3.34.0\ndocarray>=0.40.0\n```\n\n**4. Wire the executor into Jina's loader:**\n\n``` bash\n$ nano executor/config.yml\njtype: TextProcessor\npy_modules:\n  - executor.py\n```\n\n**5. Define the Flow:**\n\n``` bash\n$ nano flow.yml\njtype: Flow\nwith:\n  protocol: http\n  port: 8080\n\nexecutors:\n  - name: textprocessor\n    uses: executor/config.yml\n```\n\n**6. Build the container image with the Flow baked in:**\n\n``` bash\n$ nano Dockerfile\nFROM jinaai/jina:3.34.0-py39-standard\n\nWORKDIR /app\n\nCOPY executor/requirements.txt /app/executor/requirements.txt\nRUN pip install --no-cache-dir -r /app/executor/requirements.txt\n\nCOPY executor /app/executor\nCOPY flow.yml /app/flow.yml\n\nENTRYPOINT [\"jina\", \"flow\", \"--uses\", \"flow.yml\"]\n```\n\n**7. Create the environment file:**\n\n``` bash\n$ nano .env\nDOMAIN=jina.example.com\nLETSENCRYPT_EMAIL=admin@example.com\nJINA_LOG_LEVEL=INFO\n```\n\n**1. Create the Compose manifest:**\n\n``` bash\n$ nano docker-compose.yml\nservices:\n  traefik:\n    image: traefik:v3.6\n    container_name: traefik\n    command:\n      - \"--providers.docker=true\"\n      - \"--providers.docker.exposedbydefault=false\"\n      - \"--entrypoints.web.address=:80\"\n      - \"--entrypoints.websecure.address=:443\"\n      - \"--entrypoints.web.http.redirections.entrypoint.to=websecure\"\n      - \"--entrypoints.web.http.redirections.entrypoint.scheme=https\"\n      - \"--certificatesresolvers.letsencrypt.acme.httpchallenge=true\"\n      - \"--certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=web\"\n      - \"--certificatesresolvers.letsencrypt.acme.email=${LETSENCRYPT_EMAIL}\"\n      - \"--certificatesresolvers.letsencrypt.acme.storage=/letsencrypt/acme.json\"\n    ports:\n      - \"80:80\"\n      - \"443:443\"\n    volumes:\n      - \"/var/run/docker.sock:/var/run/docker.sock:ro\"\n      - \"./letsencrypt:/letsencrypt\"\n    restart: unless-stopped\n\n  jina:\n    build:\n      context: .\n      dockerfile: Dockerfile\n    container_name: jina-flow\n    environment:\n      - JINA_LOG_LEVEL=${JINA_LOG_LEVEL}\n    expose:\n      - \"8080\"\n    labels:\n      - \"traefik.enable=true\"\n      - \"traefik.http.routers.jina.rule=Host(`${DOMAIN}`)\"\n      - \"traefik.http.routers.jina.entrypoints=websecure\"\n      - \"traefik.http.routers.jina.tls.certresolver=letsencrypt\"\n      - \"traefik.http.services.jina.loadbalancer.server.port=8080\"\n    restart: unless-stopped\n```\n\n**2. Build and start the stack:**\n\n``` bash\n$ docker compose up -d --build\n```\n\n**3. Verify the services and tail logs:**\n\n``` bash\n$ docker compose ps\n$ docker compose logs\n```\n\n**1. Check the status endpoint:**\n\n``` bash\n$ curl https://jina.example.com/status\n{\"jina\":{\"jina\":\"3.34.0\",\"docarray\":\"0.40.1\"...\n```\n\n**2. POST a document to /index:**\n\n``` bash\n$ curl -X POST https://jina.example.com/index \\\n    -H \"Content-Type: application/json\" \\\n    -d '{\"data\": [{\"text\": \"hello world\"}]}'\n{\"data\":[{\"id\":null,\"text\":\"HELLO WORLD\"}],...}\n```\n\n**3. POST to /search to see the passthrough endpoint:**\n\n``` bash\n$ curl -X POST https://jina.example.com/search \\\n    -H \"Content-Type: application/json\" \\\n    -d '{\"data\": [{\"text\": \"test message\"}]}'\n```\n\n**4. Submit a batch of documents:**\n\n``` bash\n$ curl -X POST https://jina.example.com/index \\\n    -H \"Content-Type: application/json\" \\\n    -d '{\"data\": [{\"text\": \"first\"}, {\"text\": \"second\"}, {\"text\": \"third\"}]}'\n```\n\nJina Serve is running and serving requests over HTTPS. From here you can:\n\nFor the full guide with additional tips, visit the original article on ** Vultr Docs**.", "url": "https://wpnews.pro/news/deploying-jina-serve-open-source-neural-search-and-ai-serving-framework-on-24-04", "canonical_source": "https://dev.to/vultr/deploying-jina-serve-open-source-neural-search-and-ai-serving-framework-on-ubuntu-2404-1m8g", "published_at": "2026-06-16 20:55:00+00:00", "updated_at": "2026-06-16 21:17:16.519965+00:00", "lang": "en", "topics": ["developer-tools", "ai-infrastructure", "neural-networks", "natural-language-processing"], "entities": ["Jina Serve", "Docker Compose", "Traefik", "Ubuntu 24.04", "Jina", "DocArray", "LetsEncrypt"], "alternates": {"html": "https://wpnews.pro/news/deploying-jina-serve-open-source-neural-search-and-ai-serving-framework-on-24-04", "markdown": "https://wpnews.pro/news/deploying-jina-serve-open-source-neural-search-and-ai-serving-framework-on-24-04.md", "text": "https://wpnews.pro/news/deploying-jina-serve-open-source-neural-search-and-ai-serving-framework-on-24-04.txt", "jsonld": "https://wpnews.pro/news/deploying-jina-serve-open-source-neural-search-and-ai-serving-framework-on-24-04.jsonld"}}