π Deploying flux0 to Koyeb
Koyeb is a great platform for hosting Flux0 in the cloud with minimal setup.
it is a great choice for hosting production-ready flux0
agents with zero infrastructure overhead.
This guide walks you through deploying Flux0 via GitHub as a Koyeb service.
π Why Koyeb?β
Koyeb is a great match for flux0
agents. Here's why:
-
Git-powered deploys Push your agents to GitHub and Koyeb deploys it automatically β no CI/CD needed.
-
Built-in secret management Store API keys like
OPENAI_API_KEY
securely as environment variables. -
Zero infrastructure No servers, no containers β just your agents code running in the cloud.
-
Global performance Agents run behind a CDN and auto-scale with traffic, out of the box.
-
HTTPS & custom domains Every agent is live on HTTPS by default, with custom domain support.
Koyeb handles the deploys, flux0 handles the rest β from multi-agent logic to session state and LLM calls. You focus on agent behavior, hit git push, and itβs live.
π§Ύ What Youβll Needβ
- A GitHub repository with your
flux0
app - A Koyeb account
- Python 3.13+ compatibility
- LLM (e.g, OpenAI) API key
π Deployment Stepsβ
π Step1: Create a Secretβ
To securely store sensitive values as the API key:
- Go to your Koyeb Dashboard.
- Navigate to Secrets in the sidebar.
- Click "Create Secret".
- Name your secret (e.g.,
openai-api-key
) and paste the value. - Save it.
π§ Step2: Agent Logicβ
Your agent logic should live inside a folder under modules
, for example modules/my_agent.
Step 3: Push to GitHubβ
Make sure your flux0
app is in a public or private GitHub repository.
You can fork https://github.com/flux0-ai/flux0-docker-example with your agent code or use this repo directly in Koyeb for demonstration.
Step4: Create a Koyeb App (Service)β
- Go to app.koyeb.com
- Click Create Service
- Choose:
- GitHub as your source
- The correct repository and branch (e.g., https://github.com/flux0-ai/flux0-docker-example)
Choose a repoβ
Connect your private repo or choose a public one and click import.
Configure serviceβ
Select a CPU of your choice and click Next (CPU Eco should be sufficient for demonstration purposes)
Builderβ
Define Builder to Dockerfile and leave all settings as default.
Environment variablesβ
Key | Example Value |
---|---|
OPENAI_API_KEY | {{ secret.openai-api-key }} |
FLUX0_MODULES | my_agent |
Exposed Portsβ
Change port to 8080
β Step5: Verify Your Deploymentβ
- Click Deploy
- Wait for the service to be deployed.
- Click the Public URL, you should see the chat interaface.
π§Ύ Step 6: Register the Agentβ
Once your runner is defined and your module is registered, you can create the agent entry in the database:
- Cick manage your service.
- Click Console and press Enter
flux0 agents create --name "Translation Agent" --type langchain_simple
π¬ Step 7: Talk to Your Agentβ
Start chatting with your agent at the service URL.