# Installing Cyborg API via WSGI

Cyborg-api service can be run either as a Python command that runs a web serve or As a WSGI application hosted by uwsgi. This document is a guide to deploy cyborg-api using uwsgi. In devstack, uwsgi is used by default for development.

## WSGI Application

The function `cyborg.api.wsgi_app.init_application` will setup a WSGI application to run behind uwsgi.

## Cyborg API behind uwsgi

Create a `cyborg-api-uwsgi` file with content below:

    [uwsgi]
    chmod-socket = 666
    socket = /var/run/uwsgi/cyborg-wsgi-api.socket
    lazy-apps = true
    add-header = Connection: close
    buffer-size = 65535
    hook-master-start = unix_signal:15 gracefully_kill_them_all
    thunder-lock = true
    plugins = python
    enable-threads = true
    worker-reload-mercy = 90
    exit-on-reload = false
    die-on-term = true
    master = true
    processes = 2
    wsgi-file = /usr/local/bin/cyborg-wsgi-api

Start cyborg-api:

    # uwsgi --ini /etc/cyborg/cyborg-api-uwsgi.ini

this page last updated: 2026-06-04 00:46:15

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.

found an error? report a bug