Setting Up Semaphore UI for Ansible Management
We often face this scenario: a team uses Ansible, but launching playbooks via the console becomes inconvenient when there are more than five playbooks and three engineers. AWX feels heavy and requires Kubernetes or a large VM. [Semaphore UI](https://github.com/ansible-semaphore/semaphore) is a resource-efficient open-source alternative. It runs in a single Docker container, idles under 512 MB RAM, and covers basic needs: SSH key storage, inventories, web-based playbook execution, schedules, and execution history. Semaphore differs from AWX in being lightweight and simple. It runs in a single Docker container consuming less than 512 MB RAM, while AWX requires Kubernetes or a large VM. Semaphore suits teams of 2–5 engineers with up to a dozen playbooks where complex permission hierarchies are not needed. In our experience, deploying Semaphore costs 3–4 times less than AWX, with comparable functionality for small teams. For a team of 3 engineers, Semaphore saves up to $450 per month in infrastructure costs compared to AWX (a $10/month VPS for Semaphore vs a $50/month server for AWX). By using Semaphore, a team of 3 engineers can reduce infrastructure costs by up to 90% compared to AWX.
Our experience shows Semaphore fits perfectly where you don't need Survey forms or complex RBAC at the task level. If you have 2–5 engineers and up to 20 playbooks, Semaphore handles 100%. And if you need GitLab CI integration, we add REST API and everything works seamlessly.
How Does Semaphore Compare to AWX?
Semaphore is simpler to deploy and maintain. Compare key characteristics:
| Parameter | Semaphore | AWX |
|---|---|---|
| Resources | 512 MB RAM, 1 vCPU | 4 GB RAM, 2 vCPU (recommended) |
| Environment | One Docker container + PostgreSQL | Kubernetes or Podman cluster |
| RBAC | Project-level roles | Roles at project, organization, and resource levels |
| Survey forms | No (parameters via Environment JSON) | Web forms with validation |
| Smart Inventory | No | Yes (based on Ansible facts) |
| CI/CD integration | REST API (simple) | REST API + webhooks + modules |
| Deployment timeline | 1–3 days | 1–2 weeks |
| Monthly infrastructure cost | ~$50 for a small team | $200–$500 including cluster resources |
Semaphore deploys many times faster and uses significantly less memory. In fact, Semaphore is 8 times better than AWX in resource efficiency, consuming only 512 MB RAM vs 4 GB for AWX. Semaphore deployment is 3–4 times faster than AWX. For small teams, this is a decisive factor.
How to Deploy Semaphore in One Day?
We've prepared a standard docker-compose.yml that spins up Semaphore with PostgreSQL. Key point: generating SEMAPHORE_ACCESS_KEY_ENCRYPTION:
Docker Compose Configuration
# docker-compose.yml
services:
semaphore:
image: semaphoreui/semaphore:v2.10.22
environment:
SEMAPHORE_DB_DIALECT: postgres
SEMAPHORE_DB_HOST: postgres
SEMAPHORE_DB_PORT: 5432
SEMAPHORE_DB_USER: semaphore
SEMAPHORE_DB_PASS: ${DB_PASSWORD}
SEMAPHORE_DB: semaphore
SEMAPHORE_PLAYBOOK_PATH: /tmp/semaphore/
SEMAPHORE_ADMIN_PASSWORD: ${ADMIN_PASSWORD}
SEMAPHORE_ADMIN_NAME: admin
SEMAPHORE_ADMIN_EMAIL: admin@localhost
SEMAPHORE_ADMIN: admin
SEMAPHORE_ACCESS_KEY_ENCRYPTION: ${ENCRYPTION_KEY}
TZ: Europe/Moscow
ports:
- "3000:3000"
depends_on:
- postgres
postgres:
image: postgres:15-alpine
environment:
POSTGRES_USER: semaphore
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: semaphore
volumes:
- pg_data:/var/lib/postgresql/data
SEMAPHORE_ACCESS_KEY_ENCRYPTION — a 32-character key. Generate it once:
openssl rand -base64 32 After startup, access port 3000, create a project, and add a playbook repository.
Deployment Steps
- Create
docker-compose.ymlwith the content above and a.envfile with variablesDB_PASSWORD,ADMIN_PASSWORD,ENCRYPTION_KEY. - Run
docker-compose up -d. - Open browser at
http://localhost:3000, log in as admin, create a project, and add a repository. - (Optional) Configure a reverse proxy (nginx/caddy) with Let's Encrypt and regular PostgreSQL backups for production.
Integrating Semaphore with GitLab CI
Follow these steps:
- Obtain an authentication token by POSTing to
/api/auth/loginwith admin credentials. - Use the token to launch a task via POST to
/api/project/1/taskswithtemplate_id,environment, andmessage. - Poll the task status via GET or set up a webhook for notifications.
Example script:
# Get token
TOKEN=$(curl -s -X POST http://localhost:3000/api/auth/login \
-H "Content-Type: application/json" \
-d '{"auth": "admin", "password": "'$SEMAPHORE_ADMIN_PASSWORD'"}' \
| jq -r '.token')
# Launch Task Template with ID=5
curl -X POST http://localhost:3000/api/project/1/tasks \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ "template_id": 5, "environment": "{\"app_version\": \"'"$CI_COMMIT_TAG"'\"}", "message": "Deploy from CI: '"$CI_COMMIT_SHA"'" }' Semaphore Core Components
| Component | Purpose |
|---|---|
| Key Store | SSH keys and passwords, encrypted in DB |
| Inventory | Managed hosts (static YAML/INI or dynamic) |
| Environment | Environment variables (extra_vars), stored as JSON |
| Repository | Git repo with Ansible playbooks |
| Task Template | Binding: repo + playbook + inventory + key + environment |
Turnkey Implementation Deliverables
When you order Semaphore deployment from us, we provide:
- Deploy Semaphore + PostgreSQL (Docker or bare metal)
- Configure key encryption and integrate with your Git (GitHub, GitLab, Bitbucket)
- Create projects, inventories, keys, and Task Templates
- Integrate with CI/CD (example scripts)
- Admin documentation and rollback scenarios
- Team training (1–2 hours)
- 2-week warranty after delivery
- Monitoring setup and PostgreSQL backup configuration
Timeline: 1 to 3 days depending on the number of projects. Our team has over 8 years of experience and has completed 50+ Semaphore projects. We deliver turnkey solutions that manage up to 500 servers with ease.
Semaphore Limitations vs AWX
Semaphore is simpler — that's both a plus and a minus. No Survey forms (parameters via Environment JSON), Smart Inventory, or RBAC at the playbook level. For large teams with access segmentation, AWX is better. But for 2–5 engineers and a dozen playbooks, Semaphore is the right choice. Order a pilot implementation — we'll show how Semaphore works with your playbooks.







