This example runs Ajenti in a container.
See Docker installation: Docker
docker run --rm -it ajenti:latest --help
For production deployments, it’s recommended to use Docker Compose for easier management of the container and its dependencies.
version: '3.8'
services:
ajenti:
image: ajenti/ajenti:latest
container_name: ajenti
restart: unless-stopped
ports:
- "8000:8000" # Main Ajenti panel
- "8001:8001" # SSL port (if enabled)
volumes:
- ./config:/etc/ajenti # Configuration files
- /var/log:/var/log # System logs
- /etc/passwd:/etc/passwd:ro # User accounts
- /etc/group:/etc/group:ro # Groups
environment:
- TZ=UTC # Set timezone
privileged: true # Required for some system operations
For a more robust setup, you can include additional services like a reverse proxy and automatic updates:
version: '3.8'
services:
ajenti:
image: ajenti/ajenti:latest
container_name: ajenti
restart: unless-stopped
ports:
- "8000:8000" # Main Ajenti panel
- "8001:8001" # SSL port (if enabled)
volumes:
- ./config:/etc/ajenti # Configuration files
- /var/log:/var/log # System logs
- /etc/passwd:/etc/passwd:ro # User accounts
- /etc/group:/etc/group:ro # Groups
- /var/run/docker.sock:/var/run/docker.sock:ro # Docker integration (optional)
environment:
- AJENTI_PORT=8000
- AJENTI_SSLPORT=8001
- AJENTI_HOST=0.0.0.0
- TZ=UTC # Set timezone
networks:
- ajenti-network
privileged: true # Required for some system operations
labels:
- "com.centurylinklabs.watchtower.enable=true" # For auto-updates with Watchtower
# Optional: Reverse proxy for HTTPS termination
nginx-proxy:
image: nginx:alpine
container_name: ajenti-nginx-proxy
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx/conf.d:/etc/nginx/conf.d # Custom nginx configs
- ./certs:/etc/nginx/certs # SSL certificates
- /var/run/docker.sock:/tmp/docker.sock:ro
depends_on:
- ajenti
networks:
- ajenti-network
# Optional: Watchtower for automatic updates
watchtower:
image: containrrr/watchtower
container_name: ajenti-watchtower
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command: --interval 30 --cleanup
networks:
- ajenti-network
networks:
ajenti-network:
driver: bridge
volumes:
ajenti-config:
ajenti-logs:
To deploy Ajenti using Docker Compose:
Create a directory for your Ajenti setup:
mkdir ajenti-docker && cd ajenti-docker
Create the docker-compose.yml file with the content above.
Create the necessary directories:
mkdir -p config nginx/conf.d certs
Start the services:
docker-compose up -d
Access Ajenti at http://your-server-ip:8000
The default credentials are usually:
rootadminChange the password immediately after first login.
| Variable | Description | Default |
|---|---|---|
AJENTI_PORT |
Port for Ajenti web interface | 8000 |
AJENTI_SSLPORT |
SSL port for Ajenti | 8001 |
AJENTI_HOST |
Host binding | 0.0.0.0 |
TZ |
Timezone | UTC |
/etc/ajenti - Stores Ajenti configuration files/var/log - Access to system logs/etc/passwd - Read-only access to user accounts/etc/group - Read-only access to groups/var/run/docker.sock - Docker socket for container management (optional)8000 - Main Ajenti panel8001 - SSL port (if enabled)Running containers in production? We help with:
Need help? office@linux-server-admin.com or Contact Us