들어가며
빠르게 시작하고 싶은 사용자를 위해 OpenClaw는 원클릭 배포 스크립트를 제공합니다. 단 하나의 명령어로 환경 감지부터 서비스 시작까지 전체 프로세스를 완료할 수 있습니다. 본 문서에서는 원클릭 배포 스크립트의 사용 방법, 커스터마이징 옵션, 그리고 VPS에서 cloud-init을 통해 완전 자동 배포를 구현하는 방법을 소개합니다.
원클릭 설치 명령어
터미널에서 다음 명령어를 실행하면 설치가 시작됩니다.
curl -fsSL https://get.openclaw.com | bash
또는 wget을 사용할 수도 있습니다.
wget -qO- https://get.openclaw.com | bash
설치 스크립트는 다음 단계를 자동으로 수행합니다.
- 운영 체제 및 아키텍처 감지
- Node.js 22 확인 및 설치 (미설치 시)
- npm을 통해 OpenClaw 전역 설치
openclaw onboard실행으로 초기 구성- OpenClaw 서비스 시작
스크립트 지원 운영 체제
| 운영 체제 | 아키텍처 | 지원 상태 |
|---|---|---|
| Ubuntu 20.04+ | x86_64, arm64 | 완전 지원 |
| Debian 11+ | x86_64, arm64 | 완전 지원 |
| CentOS 8+ / RHEL 8+ | x86_64, arm64 | 완전 지원 |
| Fedora 38+ | x86_64, arm64 | 완전 지원 |
| macOS 13+ | x86_64, arm64 | 완전 지원 |
| Alpine 3.18+ | x86_64, arm64 | 기본 지원 |
| Arch Linux | x86_64 | 기본 지원 |
설치 옵션 커스터마이징
설치 스크립트는 환경 변수를 통해 동작을 커스터마이징할 수 있습니다.
버전 지정
curl -fsSL https://get.openclaw.com | OPENCLAW_VERSION=2.5.0 bash
설치 디렉토리 지정
curl -fsSL https://get.openclaw.com | OPENCLAW_PREFIX=/opt/openclaw bash
Node.js 설치 건너뛰기
이미 Node.js 22+가 설치되어 있는 경우:
curl -fsSL https://get.openclaw.com | SKIP_NODE_INSTALL=1 bash
초기화 마법사 건너뛰기
설치 후 openclaw onboard를 실행하지 않음:
curl -fsSL https://get.openclaw.com | SKIP_ONBOARD=1 bash
Docker 방식으로 설치
curl -fsSL https://get.openclaw.com | INSTALL_METHOD=docker bash
여러 옵션 조합
curl -fsSL https://get.openclaw.com | \
OPENCLAW_VERSION=latest \
SKIP_ONBOARD=1 \
INSTALL_METHOD=npm \
bash
전체 설치 옵션 목록
| 환경 변수 | 기본값 | 설명 |
|---|---|---|
OPENCLAW_VERSION |
latest |
설치 버전 지정 |
OPENCLAW_PREFIX |
시스템 기본값 | 커스텀 설치 접두사 경로 |
INSTALL_METHOD |
npm |
설치 방식: npm 또는 docker |
SKIP_NODE_INSTALL |
0 |
1로 설정 시 Node.js 설치 건너뛰기 |
SKIP_ONBOARD |
0 |
1로 설정 시 초기화 마법사 건너뛰기 |
GATEWAY_PORT |
18789 |
커스텀 게이트웨이 포트 |
AUTO_START |
1 |
0으로 설정 시 자동 시작 비활성화 |
SETUP_SYSTEMD |
1 |
0으로 설정 시 systemd 구성 비활성화 |
NPM_REGISTRY |
공식 소스 | 커스텀 npm 미러 소스 |
무인 설치
무인 설치는 대량 배포가 필요한 시나리오에 적합하며, 모든 매개변수를 사전에 설정하여 대화형 입력을 피합니다.
구성 파일 준비
로컬에서 openclaw.json5 구성 파일을 미리 작성합니다.
{
gateway: {
port: 18789,
host: "0.0.0.0",
},
models: {
default: "claude",
providers: {
claude: {
apiKey: "sk-ant-your-api-key-here",
model: "claude-sonnet-4-20250514",
},
},
},
channels: {
telegram: {
enabled: true,
token: "your-telegram-bot-token",
},
},
logging: {
level: "info",
},
}
한 줄 명령어로 무인 설치 완료
# OpenClaw 다운로드 및 설치, 마법사 건너뛰기
curl -fsSL https://get.openclaw.com | SKIP_ONBOARD=1 bash
# 사전 설정된 구성 파일 복사
mkdir -p ~/.config/openclaw
curl -fsSL https://your-server.com/openclaw.json5 > ~/.config/openclaw/openclaw.json5
# 시작
openclaw up
또는 하나의 스크립트로 통합:
curl -fsSL https://get.openclaw.com | SKIP_ONBOARD=1 AUTO_START=0 bash && \
mkdir -p ~/.config/openclaw && \
curl -fsSL https://your-server.com/openclaw.json5 > ~/.config/openclaw/openclaw.json5 && \
openclaw up
VPS 배포: cloud-init 사용
cloud-init는 주요 클라우드 서비스 제공업체가 모두 지원하는 자동화 초기화 도구입니다. VPS 생성 시 cloud-init 설정을 통해 자동으로 OpenClaw를 배포할 수 있습니다.
기본 cloud-init 설정
VPS 인스턴스 생성 시 "사용자 데이터" 또는 "cloud-init" 필드에 다음 내용을 입력합니다.
#cloud-config
package_update: true
package_upgrade: true
packages:
- curl
- git
runcmd:
# OpenClaw 설치
- curl -fsSL https://get.openclaw.com | SKIP_ONBOARD=1 SETUP_SYSTEMD=1 bash
# 구성 파일 배포
- mkdir -p /root/.config/openclaw
- |
cat > /root/.config/openclaw/openclaw.json5 << 'CONF'
{
gateway: {
port: 18789,
host: "0.0.0.0",
},
models: {
default: "claude",
providers: {
claude: {
apiKey: "sk-ant-your-api-key-here",
model: "claude-sonnet-4-20250514",
},
},
},
logging: {
level: "info",
},
}
CONF
# 서비스 시작
- systemctl start openclaw
- systemctl enable openclaw
# 방화벽 설정
- ufw allow 18789/tcp
- ufw --force enable
final_message: "OpenClaw 배포 완료! http://$_IP:18789/dashboard 에서 접속하세요"
각 클라우드 플랫폼에서 cloud-init 사용 방법
알리바바 클라우드 ECS:
- 인스턴스 생성 시 "고급 옵션"에서 "인스턴스 사용자 데이터"를 찾습니다
- 위의 cloud-init 설정을 붙여넣습니다
텐센트 클라우드 CVM:
- 인스턴스 생성 시 "고급 설정"에서 "사용자 데이터"를 찾습니다
- cloud-init 설정을 붙여넣습니다
AWS EC2:
- 인스턴스 생성 시 "고급 세부 정보"를 펼칩니다
- "사용자 데이터"에 설정을 붙여넣습니다
DigitalOcean:
- Droplet 생성 시 "Advanced Options"를 펼칩니다
- "Add user data"를 선택합니다
- 설정을 붙여넣습니다
향상된 cloud-init (보안 강화 포함)
다음은 프로덕션 환경에 권장되는 완전한 cloud-init 설정입니다.
#cloud-config
package_update: true
package_upgrade: true
# 전용 사용자 생성
users:
- name: openclaw
shell: /bin/bash
groups: [sudo]
sudo: ['ALL=(ALL) NOPASSWD:ALL']
ssh_authorized_keys:
- ssh-rsa YOUR_PUBLIC_KEY_HERE
packages:
- curl
- git
- fail2ban
- ufw
write_files:
- path: /home/openclaw/.config/openclaw/openclaw.json5
owner: openclaw:openclaw
permissions: '0600'
content: |
{
gateway: {
port: 18789,
host: "0.0.0.0",
},
models: {
default: "claude",
providers: {
claude: {
apiKey: "sk-ant-your-api-key-here",
model: "claude-sonnet-4-20250514",
},
},
},
logging: {
level: "warn",
},
}
runcmd:
# openclaw 사용자로 설치
- su - openclaw -c 'curl -fsSL https://get.openclaw.com | SKIP_ONBOARD=1 AUTO_START=0 bash'
# systemd 서비스 구성
- |
cat > /etc/systemd/system/openclaw.service << 'SVC'
[Unit]
Description=OpenClaw AI Assistant
After=network-online.target
[Service]
Type=simple
User=openclaw
ExecStart=/home/openclaw/.npm-global/bin/openclaw up
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
SVC
- systemctl daemon-reload
- systemctl enable openclaw
- systemctl start openclaw
# 방화벽 설정
- ufw default deny incoming
- ufw default allow outgoing
- ufw allow ssh
- ufw allow 18789/tcp
- ufw --force enable
# fail2ban 시작
- systemctl enable fail2ban
- systemctl start fail2ban
설치 스크립트 동작 원리 설명
원클릭 배포 스크립트의 작업 흐름은 다음과 같습니다.
시작
├─ 운영 체제 및 아키텍처 감지
├─ 패키지 관리자 감지 (apt/yum/brew)
├─ Node.js 버전 확인
│ ├─ 미설치 → Node.js 22 설치
│ ├─ 버전 낮음 → Node.js 업그레이드
│ └─ 버전 충족 → 건너뛰기
├─ 설치 방식 선택
│ ├─ npm → npm install -g openclaw
│ └─ docker → docker pull openclaw/openclaw
├─ openclaw onboard 실행 (건너뛰기 가능)
├─ systemd/launchd 자동 시작 구성 (건너뛰기 가능)
└─ OpenClaw 시작
오프라인 설치
네트워크가 없는 환경에서는 설치 패키지를 사전에 준비할 수 있습니다.
네트워크가 있는 머신에서 패키징
# OpenClaw 및 의존성 다운로드
mkdir openclaw-offline
cd openclaw-offline
npm pack openclaw@latest
npm cache ls openclaw 2>/dev/null
# Node.js 바이너리 패키징
curl -O https://nodejs.org/dist/v22.x.x/node-v22.x.x-linux-x64.tar.xz
대상 머신에서 설치
# Node.js 압축 해제
tar -xJf node-v22.x.x-linux-x64.tar.xz -C /usr/local --strip-components=1
# OpenClaw 설치
npm install -g openclaw-*.tgz
문제 해결
| 문제 | 해결 방법 |
|---|---|
| curl 명령어 사용 불가 | apt install curl 또는 yum install curl |
| 권한 부족 | sudo를 사용하거나 root 사용자로 실행 |
| Node.js 설치 실패 | Node.js 22를 수동 설치 후 SKIP_NODE_INSTALL=1 사용 |
| 네트워크 시간 초과 | NPM_REGISTRY를 국내 미러로 설정 |
| cloud-init 미실행 | /var/log/cloud-init-output.log 확인 |
마무리
원클릭 배포 스크립트는 OpenClaw의 설치 진입 장벽을 크게 낮추어, 개인의 빠른 체험이든 기업의 대량 배포이든 모두 대응할 수 있습니다. 프로덕션 환경에서는 cloud-init과 보안 강화 설정을 결합하여 처음부터 완전 자동 배포를 구현하는 것을 권장합니다. 설치가 완료되면 openclaw doctor를 실행하여 모든 구성 요소가 정상적으로 작동하는지 확인하는 것을 잊지 마십시오.