Octopus is an AI code review service for pull requests on GitHub, GitLab, Bitbucket and Forgejo. It indexes your whole repository, so each review has context beyond the diff. Findings are posted as inline comments with a severity rating. You can run it on your own infrastructure with Docker Compose. Octopus is source-available under a Modified MIT licence.
When you self-host, every stage of a review runs on your infrastructure, from the webhook to the posted comments. Self-hosted Octopus stores everything, including the code index, in your own PostgreSQL, Qdrant and object storage.
The model calls go to the AI services you configure. For each review, Octopus sends the diff and the relevant parts of your repository to that provider, using your own API key. The default setup also sends code to OpenAI to create the index embeddings.
Self-hosting on its own does not keep code inside your network. If code must stay there, run the review model and embeddings on your own hardware with the optional Ollama setup, which needs no cloud API keys.
Octopus also calls your git host's API to read code and post comments. The security overview lists the outbound calls.
The recommended setup is the prebuilt Docker image. It needs no build step and starts the app, PostgreSQL and Qdrant together. You also need a checkout of the repository, because the database migrations run from it.
Unless you run Ollama, you need an OpenAI key for embeddings and a key for the model that writes the reviews. The docs name Anthropic Claude or OpenAI for reviews, with Google Gemini, xAI Grok, Alibaba Cloud Qwen and OpenRouter as optional settings.
For production, add a reverse proxy with TLS, because OAuth callbacks require HTTPS. GitHub repositories also need your own GitHub App.
Octopus charges nothing for self-hosting. There are no credits and no platform fees. You pay your AI provider directly for the tokens you use, and you run the servers yourself.
The review stages are the same in both. Octopus Cloud runs them on managed infrastructure and bills AI usage at 2x the provider's list price, with no other fees. You can also bring your own API keys to Cloud and pay the provider instead. When you self-host, you run the service and control retention and backups. Self-hosted Octopus can also connect directly to Forgejo on a private LAN or VPN.
.env file with the generator in the docs, then add your API keys.docker compose -f docker-compose.selfhost.yml up -d.http://localhost:43300, create the first account and connect a repository.The self-hosting docs cover each step, plus upgrades and rollbacks.
When you self-host, you apply upgrades and migrations, secure Qdrant, manage backups and keep HTTPS working.
If you plan to use an external AI provider anyway, that provider receives your code in both setups. In that case Cloud saves you the operations work. Cloud starts with free credits and no subscription, and the GitHub App reviews every pull request automatically.
The trade is that Octopus Cloud processes your code on our infrastructure. Diffs are discarded when the review completes. The index is kept while the repository is connected and deleted within 24 hours of disconnecting.