This guide provides a full Ansible playbook to deploy Coze Studio with Docker Compose on Debian 10+, Ubuntu LTS, and RHEL 9+ compatible hosts. Coze Studio is ByteDance’s open-source AI agent development platform with visual workflow builder.
- name: Deploy Coze Studio
hosts: coze-studio
become: true
vars:
app_root: /opt/coze-studio
app_port: 8888
coze_repo_url: https://github.com/coze-dev/coze-studio.git
tasks:
- name: Install Docker on Debian/Ubuntu
apt:
name:
- docker.io
- docker-compose-plugin
state: present
update_cache: true
when: ansible_os_family == "Debian"
- name: Install Docker on RHEL family
dnf:
name:
- docker
- docker-compose-plugin
state: present
when: ansible_os_family == "RedHat"
- name: Enable and start Docker
service:
name: docker
state: started
enabled: true
- name: Install Git
package:
name: git
state: present
- name: Clone Coze Studio repository
git:
repo: "{{ coze_repo_url }}"
dest: "{{ app_root }}"
depth: 1
version: main
- name: Copy environment configuration (Linux/macOS)
copy:
src: "{{ app_root }}/docker/.env.example"
dest: "{{ app_root }}/docker/.env"
remote_src: true
force: false
when: ansible_system in ["Linux"]
- name: Start Coze Studio with Docker Compose
command: >
docker compose -f ./docker/docker-compose.yml up -d
args:
chdir: "{{ app_root }}"
- name: Wait for Coze Studio to be ready
wait_for:
port: "{{ app_port }}"
delay: 5
timeout: 300
Run the playbook:
ansible-playbook -i inventory.ini deploy-coze-studio.yml
Access Coze Studio at http://your-server-ip:{{ app_port }}
Register an account: Navigate to http://your-server-ip:{{ app_port }}/sign
Configure model providers: Navigate to http://your-server-ip:{{ app_port }}/admin/#model-management
Review security settings: See Coze Studio Security
app_port variable to change the default port 8888.To upgrade to the latest version, re-run the playbook or use these commands:
cd /opt/coze-studio
git pull
docker compose -f ./docker/docker-compose.yml up -d --build --pull always
| Variable | Description | Default |
|---|---|---|
app_root |
Installation directory | /opt/coze-studio |
app_port |
HTTP port for Coze Studio | 8888 |
coze_repo_url |
Coze Studio GitHub repository URL | https://github.com/coze-dev/coze-studio.git |
For public network deployments, review these security measures:
0.0.0.0 unless necessarySee Coze Studio Security for detailed guidance.
Any questions?
Feel free to contact us. Find all contact information on our contact page.