Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

I Followed the n8n AWS Docs and It Broke at the First Command

说明与用途

安装缺失的 Docker Compose 插件后,n8n 在 Amazon Linux 2023 上与 PostgreSQL 一起运行。

问题

Running docker compose up -d on Amazon Linux 2023 fails because Docker Compose is not installed by default.

结果

After installing the missing Compose plugin, Docker Compose commands work and n8n runs on Postgres on an Amazon Linux 2023 EC2 instance.

工作流

  • SSH into a fresh EC2 instance
  • Install Docker engine with sudo dnf install -y docker
  • Create plugin directory sudo mkdir -p /usr/local/lib/docker/cli-plugins
  • Download Compose binary sudo curl -fsSL https://github.com/docker/compose/releases/download/v2.29.7/docker-compose-linux-x86_64 -o /usr/local/lib/docker/cli-plugins/docker-compose
  • Make it executable sudo chmod +x /usr/local/lib/docker/cli-plugins/docker-compose
  • Enable and start Docker sudo systemctl enable --now docker
  • Verify Docker and Compose versions sudo docker --version and sudo docker compose version
  • Clone the repo with the compose file git clone https://github.com/simplynadaf/self-host-n8n-on-ec2.git
  • Edit passwords and encryption key in the compose file
  • Run sudo docker compose up -d
  • Check container status sudo docker compose ps
  • Verify n8n is reachable with curl -s -o /dev/null -w 'n8n -> HTTP %{http_code}\n' http://localhost:5678
  • Open the n8n UI in a browser and complete the first‑time setup

证据

docker: 'compose' is not a docker command.

来源

On Amazon Linux 2023: sudo dnf install -y docker installs the Docker engine. It does not install the Compose v2 plugin.

来源

sudo docker compose version

Docker Compose version v2.29.7

来源

curl -s -o /dev/null -w 'n8n -> HTTP %{http_code}\n' http://localhost:5678

n8n -> HTTP 200

来源

  • 记录日期: 2026-10-15T09:10:56.549Z