Self-hosted
Install DevOps Agent on your own server
Run the self-hosted edition on an EC2 instance or VPS — server size, ports, install, domain and SSL, licence, settings, updates and backups.
The self-hosted edition is the same app as devops-agent.io, running on one server you own: the app and its MySQL database, each in a Docker container. Your servers, credentials and chats stay on that server. It talks to devops-agent.io only to check the licence.
This page takes about 20 minutes, start to finish. Questions at any step: support@devops-agent.io.
1. What you need
A licence key from us, like DCP-XXXXX-XXXXX-XXXXX-XXXXX. Email
support@devops-agent.io if you don't have one yet.
A Linux server, an EC2 instance or any VPS:
| Minimum | Example | |
|---|---|---|
| CPU | 2 vCPU, 64-bit (x86_64 or arm64) | EC2 t3a.medium, or a 2 vCPU VPS |
| Memory | 4 GB | A 2 GB server works for a trial with 2 GB of swap |
| Disk | 30 GB | |
| OS | Ubuntu 24.04 LTS (recommended), Ubuntu 22.04, Debian 12 | Amazon Linux 2023 and RHEL 8–9 work too, with Docker installed by hand (section 3) |
A user with sudo on that server, and SSH access to it.
2. Ports and network
Pick one of two ways to reach the panel:
| Recommended: your own domain | Quick trial: the server's IP | |
|---|---|---|
| Address | https://devops.your-company.com | http://<server-ip>:3000 |
| Inbound ports to open | 80 and 443 (nginx). Not 3000 | 3000, for your own IP only (x.x.x.x/32) |
| Encryption | HTTPS (Let's Encrypt or your certificate) | None: passwords travel in plain text |
| Use for | Production | A first look; switch to a domain before real use |
Docker opens port 3000 ahead of the server's own firewall (ufw), so the
security group (or your provider's firewall) is what limits access to it.
Outbound, the server needs:
- 443 to devops-agent.io: install script, licence activation and the daily licence check.
- 443 to Docker Hub: downloading the app image.
- 443 to your AI provider (OpenAI, Amazon Bedrock…) and to AWS, if you connect AWS.
- 22 to the servers you'll manage, over SSH.
The server's IP doesn't need to be fixed: the licence is tied to the install, not the IP.
3. Host software: Docker
The install needs Docker 24+, the Docker Compose plugin 2.20+
(docker compose, not the old docker-compose) and openssl.
- Ubuntu and Debian: nothing to do. The installer adds whatever is missing.
- Amazon Linux 2023:
sudo dnf install -y docker openssl sudo systemctl enable --now docker sudo mkdir -p /usr/local/lib/docker/cli-plugins sudo curl -fSL "https://github.com/docker/compose/releases/latest/download/docker-compose-linux-$(uname -m)" \ -o /usr/local/lib/docker/cli-plugins/docker-compose sudo chmod +x /usr/local/lib/docker/cli-plugins/docker-compose - RHEL / Rocky / Alma 8–9: install
docker-ceanddocker-compose-pluginfrom Docker's repository, thensudo systemctl enable --now docker.
To check a server before installing anything:
curl -fsSL https://devops-agent.io/install.sh | sudo bash -s -- --check
4. Install
SSH into the server and run one command:
# With a domain and nginx (recommended): the app listens on 127.0.0.1:3000 only
curl -fsSL https://devops-agent.io/install.sh | sudo bash
# Quick trial on http://<server-ip>:3000 instead
curl -fsSL https://devops-agent.io/install.sh | sudo bash -s -- --bind 0.0.0.0
It:
- Puts everything in
/opt/devops-agent:deploy.sh,docker-compose.ymland.env. - Installs Docker if it's missing (Ubuntu / Debian).
- Creates
.envwith newly generated secrets. - Downloads the newest app image and MySQL 8.4 from Docker Hub, and starts both.
- Waits until the app is healthy and prints the next steps.
Check it's up:
cd /opt/devops-agent
sudo docker compose ps # mysql and app: running (healthy)
curl -s http://127.0.0.1:3000/api/health # {"ok":true}
Back up /opt/devops-agent/.env now, for example into your password
manager. It holds the key that encrypts every stored credential and the
database passwords. It can't be recreated: without it, a backup is useless.
5. Your domain, with nginx and SSL
Skip this for a quick trial on port 3000.
- Point a DNS record, such as
devops.your-company.com, at the server's IP. - Install nginx and certbot (Ubuntu / Debian):
sudo apt install -y nginx certbot python3-certbot-nginx - Add the site. Replace
devops.your-company.comwith your domain, then paste the whole block:
On Amazon Linux or RHEL, write the file tosudo tee /etc/nginx/sites-available/devops.conf > /dev/null <<'EOF' server { listen 80; server_name devops.your-company.com; client_max_body_size 100M; location / { proxy_pass http://127.0.0.1:3000; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_buffering off; proxy_read_timeout 3600s; proxy_send_timeout 3600s; } } EOF sudo ln -s /etc/nginx/sites-available/devops.conf /etc/nginx/sites-enabled/ sudo nginx -t && sudo systemctl reload nginx/etc/nginx/conf.d/devops.confinstead and skip thelnline. - Add SSL:
sudo certbot --nginx -d devops.your-company.com. It renews by itself.
The long timeouts and proxy_buffering off keep the AI assistant's streamed
replies and the web terminal working; don't drop them.
The panel needs nothing else: it learns its address the first time the Owner signs in through the domain.
6. First sign-in and licence
- Open your domain (or
http://<server-ip>:3000). - Sign in as admin / admin, then choose a new password. Keep it in a password manager: it can't be reset by email yet.
- On the licence screen, keep the licence server
https://devops-agent.io/check-license, paste your key and press Activate.
Then set up, in this order:
- Settings → AI model: the model the AI assistant uses. A self-hosted install has no built-in model: add your own key, or Amazon Bedrock with the server's IAM role.
- Settings → Team: your colleagues and their roles.
- Projects and servers: see Add a server.
7. Settings in .env
All settings live in /opt/devops-agent/.env. To change one:
cd /opt/devops-agent
sudo nano .env # edit
sudo ./deploy.sh # apply: recreates the app with the new settings
docker compose restart is not enough: it keeps the old settings.
| Setting | Default | What it does |
|---|---|---|
APP_BIND | 127.0.0.1 | 127.0.0.1 = only nginx on this server can reach the app. 0.0.0.0 = anyone who can reach the server's IP |
APP_PORT | 3000 | The port on the server, if 3000 is taken (also change nginx's proxy_pass) |
APP_URL | not set | Pins the address used in email links. Usually leave it unset |
SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASSWORD, SMTP_FROM | not set | Email for alerts, reports and team invites |
INITIAL_ADMIN_PASSWORD | admin | The first admin password. Only read before the very first start |
Never change MYSQL_ROOT_PASSWORD, MYSQL_PASSWORD, ENCRYPTION_KEY or
JWT_SECRET: the database would stop accepting the app, or every stored
credential would become unreadable.
Logo, name and colours aren't in .env: the Owner sets them in
Settings → Branding.
8. Updating to a new version
Run the same command as the install. It does nothing when you're already on the newest version:
curl -fsSL https://devops-agent.io/install.sh | sudo bash
Or, on the server:
cd /opt/devops-agent
sudo ./deploy.sh latest # newest version
sudo ./deploy.sh 0.1.9 # an exact version, or back to an older one
Every update backs up the database first, keeps .env and your data, and
restarts only the app. If the new version doesn't start, it prints the command
to go back. Each run is logged in logs/deploy-<date-time>.log.
9. Everyday commands
cd /opt/devops-agent
sudo docker compose ps # status
sudo docker compose logs app --tail 100 # recent app logs
sudo docker compose restart app # restart the app (same settings)
sudo ./deploy.sh # apply .env changes
Never run docker compose down -v: the -v deletes the database.
docker compose down without it is safe.
10. Backups
- Automatic: before every update, into
/opt/devops-agent/backups/(newest 10). - Nightly (recommended), in root's crontab (
sudo crontab -e):0 2 * * * cd /opt/devops-agent && docker compose exec -T mysql sh -c 'exec mysqldump -uroot -p"$MYSQL_ROOT_PASSWORD" --single-transaction --routines --triggers devops' 2>/dev/null | gzip > backups/nightly-$(date +\%u).sql.gz - Copy
backups/and.envoff the server now and then (S3, another machine).
11. Getting help
Email support@devops-agent.io with:
- Your version: the
DEVOPS_AGENT_IMAGE=line in.env. - What happened, and when.
- The app's recent logs:
sudo docker compose logs app --tail 200. - For a failed update: the newest file in
/opt/devops-agent/logs/.
Never send .env itself: it holds your secrets.
