0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

UbuntuでのDifyセットアップ手順

0
Last updated at Posted at 2026-04-25

Ubuntu で Dify をセットアップする

このガイドでは、オープンソースのワークフロー自動化ツール Dify を Ubuntu 上で Docker を使ってセットアップする方法を説明します。


1. Docker と Docker Compose のインストール

Ubuntu に Docker と Docker Compose がインストールされていることを確認します。

パッケージリストの更新と前提パッケージのインストール

sudo apt-get update
sudo apt-get install -y ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

Docker リポジトリの追加

echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo \"${UBUNTU_CODENAME:-$VERSION_CODENAME}\") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update

Docker と関連パッケージのインストール

sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

2. Dify リポジトリのクローン

GitHub から Dify のソースコードを取得します。

git clone https://github.com/langgenius/dify.git
cd dify/docker

3. 環境変数の設定

.env.example をコピーして .env を作成します。

cp .env.example .env

必要に応じて .env を編集し、設定をカスタマイズできます。


4. Docker Compose を使って Dify を起動

以下のコマンドで Dify を起動します。

sudo docker compose up -d

コンテナが起動したら、ブラウザで以下にアクセスします。

http://<your-server-ip>/install

5. Dify の更新(任意)

最新バージョンを利用する場合は、起動前に更新します。

cd dify/docker
git pull origin main
docker compose down
docker compose pull
docker compose up -d

💡 Tips

  • 推奨環境:Ubuntu 24.04 LTS
  • Docker の権限エラーが出る場合:
sudo usermod -aG docker $USER
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?