Help with installing n8n on a raspberry pi

Hey, I’m having a problem with deploying my n8n on a raspberry pi. The purpose is to have this running on my rpi 4 and use port forwarding to access it from outside my network.

These are some errors I’m getting:

ARNING: The SSL_EMAIL variable is not set. Defaulting to a blank string.
WARNING: The DOMAIN_NAME variable is not set. Defaulting to a blank string.
WARNING: The N8N_PATH variable is not set. Defaulting to a blank string.
WARNING: The GENERIC_TIMEZONE variable is not set. Defaulting to a blank string.
Removing docker_n8n_1
changedetection is up-to-date
docker_browser-chrome_1 is up-to-date
Recreating 029055b3c614_docker_n8n_1 ... 
Recreating docker_traefik_1          ... 

Recreating docker_traefik_1          ... done

ERROR: for n8n  a bytes-like object is required, not 'str'

And this is my docker-compose.yml:

version: '2'
services:

    traefik:
      image: "traefik"
      restart: always
      command:
        - "--api=true"
        - "--api.insecure=true"
        - "--providers.docker=true"
        - "--providers.docker.exposedbydefault=false"
        - "--entrypoints.web.address=:80"
        - "--entrypoints.web.http.redirections.entryPoint.to=websecure"
        - "--entrypoints.web.http.redirections.entrypoint.scheme=https"
        - "--entrypoints.websecure.address=:443"
        - "--certificatesresolvers.mytlschallenge.acme.tlschallenge=true"
        - "--certificatesresolvers.mytlschallenge.acme.email=${SSL_EMAIL}"
        - "--certificatesresolvers.mytlschallenge.acme.storage=/letsencrypt/acme.json"
      ports:
        - "80:80"
        - "443:443"
      volumes:
        - ${DATA_FOLDER}/letsencrypt:/letsencrypt
        - /var/run/docker.sock:/var/run/docker.sock:ro

    n8n:
      image: n8nio/n8n:latest
      restart: always
      ports:
        - "192.0.0.1:5678:5678"
      labels:
        - traefik.enable=true
        - traefik.http.routers.n8n.rule=Host(`xxx.xxx.com`)
        - traefik.http.routers.n8n.tls=true
        - traefik.http.routers.n8n.entrypoints=web,websecure
        - traefik.http.routers.n8n.tls.certresolver=mytlschallenge
        - traefik.http.middlewares.n8n.headers.SSLRedirect=true
        - traefik.http.middlewares.n8n.headers.STSSeconds=315360000
        - traefik.http.middlewares.n8n.headers.browserXSSFilter=true
        - traefik.http.middlewares.n8n.headers.contentTypeNosniff=true
        - traefik.http.middlewares.n8n.headers.forceSTSHeader=true
        - traefik.http.middlewares.n8n.headers.SSLHost=${DOMAIN_NAME}
        - traefik.http.middlewares.n8n.headers.STSIncludeSubdomains=true
        - traefik.http.middlewares.n8n.headers.STSPreload=true
      environment:
        - N8N_BASIC_AUTH_ACTIVE=true
        - N8N_BASIC_AUTH_USER
        - N8N_BASIC_AUTH_PASSWORD
        - N8N_HOST=localhost
        - N8N_PORT=5678
        - N8N_PROTOCOL=https
        - NODE_ENV=production
        - WEBHOOK_URL=https://${DOMAIN_NAME}${N8N_PATH}
        - GENERIC_TIMEZONE=${GENERIC_TIMEZONE}
        - N8N_EMAIL_MODE=smtp
        - N8N_SMTP_HOST=smtppro.zoho.eu
        - N8N_SMTP_PORT=465
        - N8N_SMTP_USER=XXX@XXX
        - N8N_USE_DEPRECATED_REQUEST_LIB=true
        - N8N_SMTP_SSL=true
      volumes:
        - ${DATA_FOLDER}/.n8n:/home/node/.n8n
        - /local-files:/files

volumes:

I’m not exactly sure what I’m doing wrong. Can anyone help?

Thanks,
P

Hey @pepeday,

Did you remember to create the .env file in the same directory as the compose file? It looks like that is the missing piece.

Sorry for not getting back on time. Is there a link to follow with instructions for an rpi?

Hey @pepeday,

We don’t have any instructions on that one but when I did it on one of mine I installed Docker then followed the docker run instructions. I can’t remember which version of Raspbian I was using but it worked surprisingly well.