Installing on docker issue

Hello,

i have followed a youtube manual to install home assistance on ubuntu/docker and it seems to stuck when trying to finish the instalation of home assistant (obuntu, docker, compose and portainer are already installed)

after adding the home assistant part in sudo nano docker-compose.yaml, and writing - docker compose up -d, it answers: (root) Additional property homeassistant is not allowed - can anyone assist solving thi sissue?

bellow is the text of the containers:
version: ‘3.0’

services:
portainer:
container_name: portainer
image: portainer/portainer-ce
restart: always
ports:
- “9000:9000/tcp”
environment:
- TZ=Europe/London
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /opt/portainer:/data
homeassistant:
container_name: homeassistant
image: “ghcr.io/home-assistant/home-assistant:stable
volumes:
- /opt/homeassistant/config:/config
- /etc/localtime:/etc/localtime:ro
restart: unless-stopped
privileged: true
network_mode: host

It’s hard to tell without formatting. Should look more like this (note portainer and homeassistant are indented from services):

services:
  portainer:
    container_name: Portainer
    image: portainer/portainer-ce:latest
    restart: unless-stopped
    ports:
      - "9000:9000"
    environment:
      - TZ=Europe/London
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - ./portainer:/data
  homeassistant:
    container_name: homeassistant
    image: ghcr.io/home-assistant/home-assistant:stable
    volumes:
      - ./homeassistant:/config
      - /etc/localtime:/etc/localtime:ro
    environment:
      - TZ=Europe/London
    network_mode: host               
    privileged: true
    restart: unless-stopped

edited for clarity

1 Like

Hi, Thank you for your reply, i have tried that, basically its the same no? the one i run is under opt file, maybee i missed something…

Actually, after running - docker-compose up -d, it should download all the containers and dependencies needed to run Home Assistant, i have tried without the quotes in the image, but it still writing - (root) Additional property homeassistant is not allowed

maybee any permision in portainer is blocking?

It doesn’t look the same to me. Note the indent of homeassistant: to services:

services:
  homeassistant:
    ...

…but I don’t know about opt