Remote script. The deploy script runs against a server you specify, so review infra/self-host/deploy-app.sh before passing it your server IP and passwords.
Credentials. The command takes a database password and a model API key on the command line, so keep them out of shell history and shared logs.
Who it is forA platform or compliance-minded team that must keep code, prompts and agent output on infrastructure it controls.
The problemHosted coding agents send code and run history to a vendor's cloud, which fails internal data residency or compliance review.
The outcomeA UseAgent instance on your own server, with Postgres holding the run log and sandboxes on hardware you choose.
What you need first
- A hosted UseAgent account, or a Linux host or laptop for self-hosting or running from source
- bun and Postgres 16+ with pgvector (for running from source)
- A sandbox provider key and a model key (the README says a real agent task needs both)
- Optional: a ChatGPT account to run Codex on your own plan
Steps
- Read the self-hosting guide at infra/self-host/README.md, and choose a sandbox plugin: Daytona, CubeSandbox or Box.
- Provision any Linux host on AWS, Google Cloud, Azure or bare metal, or use the reference Terraform host in infra/self-host/.
- Clone the repository:
git clone https://github.com/useagenthq/useagent.git && cd useagent - Run the provider-agnostic deploy script:
SERVER_IP=<ip> PG_PASSWORD=<password> OPENROUTER_API_KEY=<key> infra/self-host/deploy-app.sh /path/to/this/repo(inferred, check the README) - Open the deployed app, run one small test thread, and confirm the run appears in the event log.
Prompt for your agent
In the useagent repository, read infra/self-host/README.md, then deploy UseAgent to the server at <server-ip> using infra/self-host/deploy-app.sh. Expected output: a running UseAgent app on that server plus a short note of the sandbox plugin chosen. Verify that a test thread completes and its steps are stored in Postgres.
Caveat. The README calls UseAgent alpha software whose APIs and schemas can change between releases, so pin a tag if you need stability.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for useagenthq/useagent and "Self-host the agent workspace on your own Linux server"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer