Skip to content

[DEPLOYMENT] Issues deploying on Synology DSM #1005

Closed

Description

@simonseres

Describe the issue
Thank you for this amazing app! 🚀
The docker-setup.sh script respectively the Docker stack executes successfully on both

  • a Mac locally (Docker version 29.1.3),
  • and on a Synology NAS (Docker version 24.0.2).

On Mac I am redirected to http://localhost /setup at first login as expected.
This however does not happen on Synology.

Deployment Environment

  • OpnForm Version: v1.12.1
  • Hosting Platform: Synology NAS / Docker version 24.0.2
  • OS: DSM 7.2.1 (likely a Debian derivate)

Deployment Method

  • Docker
  • Manual installation
  • Other (please specify)

Steps Taken
Describe the steps you've taken to deploy the application:

  1. ssh into NAS / DSM
  2. cloning repo git clone https://github.com/OpnForm/OpnForm.git
  3. changing the port from 80:80 to 8800:80 in docker-compose.yml - everything else remains default for testing purpose
  4. make docker-setup.sh executable and run it using sudo (I suppose this is not recommended anyways?)
  5. open the frontend - no /setup page appears. Instead I can register on the page, but I get an error. Image

Error Messages
If applicable, provide any error messages or logs related to the issue. If it's only a generic error message (e.g. "Server Error") please set APP_DEBUG=true in api/.env, try again and provide use the error message.

Configuration Files
Everything standard as generated through the docker-setup.sh script.

Logs
When I hid the "Create Account" button:

opnform-ingress        | 2026/01/08 22:41:14 [error] 41#41: *672 connect() failed (111: Connection refused) while connecting to upstream, client: 172.27.0.1, server: opnform, request: "POST /api/register HTTP/1.1", upstream: "fastcgi://172.27.0.6:9000", host: "geist.tech:8800", referrer: "http://geist.tech:8800/register"
opnform-ingress        | 172.27.0.1 - - [08/Jan/2026:22:41:14 +0000] "POST /api/register HTTP/1.1" 502 559 "http://geist.tech:8800/register" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36"
opnform-db             | 2026-01-08 22:41:14.862 UTC [4500] DETAIL:  Role "forge" does not exist.
opnform-db             | 	Connection matched file "/var/lib/postgresql/data/pg_hba.conf" line 128: "host all all all scram-sha-256"
opnform-db             | 2026-01-08 22:41:15.381 UTC [4501] FATAL:  password authentication failed for user "forge"
opnform-db             | 2026-01-08 22:41:15.381 UTC [4501] DETAIL:  Role "forge" does not exist.
opnform-db             | 2026-01-08 22:41:15.872 UTC [4502] FATAL:  password authentication failed for user "forge"
opnform-db             | 2026-01-08 22:41:15.872 UTC [4502] DETAIL:  Role "forge" does not exist.
opnform-db             | 	Connection matched file "/var/lib/postgresql/data/pg_hba.conf" line 128: "host all all all scram-sha-256"
opnform-ingress        | 172.27.0.1 - - [08/Jan/2026:22:41:15 +0000] "POST /api/register HTTP/1.1" 502 559 "http://geist.tech:8800/register" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36"
opnform-ingress        | 2026/01/08 22:41:15 [error] 41#41: *672 connect() failed (111: Connection refused) while connecting to upstream, client: 172.27.0.1, server: opnform, request: "POST /api/register HTTP/1.1", upstream: "fastcgi://172.27.0.6:9000", host: "geist.tech:8800", referrer: "http://geist.tech:8800/register"

Probably the most relevant logs:

opnform-db             | 2026-01-08 22:43:28.863 UTC [4807] DETAIL:  Role "forge" does not exist.
opnform-db             | 	Connection matched file "/var/lib/postgresql/data/pg_hba.conf" line 128: "host all all all scram-sha-256"
opnform-ingress        | 2026/01/08 22:43:29 [error] 35#35: *717 connect() failed (111: Connection refused) while connecting to upstream, client: 172.27.0.7, server: opnform, request: "GET /api/content/feature-flags HTTP/1.1", upstream: "fastcgi://172.27.0.6:9000", host: "ingress"
opnform-ingress        | 172.27.0.7 - - [08/Jan/2026:22:43:29 +0000] "GET /api/content/feature-flags HTTP/1.1" 502 157 "-" "node"
opnform-client         | Request error 502
opnform-ingress        | 2026/01/08 22:43:29 [error] 41#41: *719 connect() failed (111: Connection refused) while connecting to upstream, client: 172.27.0.7, server: opnform, request: "GET /api/content/feature-flags HTTP/1.1", upstream: "fastcgi://172.27.0.6:9000", host: "ingress"
opnform-client         | Request error 502
opnform-ingress        | 172.27.0.7 - - [08/Jan/2026:22:43:29 +0000] "GET /api/content/feature-flags HTTP/1.1" 502 157 "-" "node"
opnform-client         | Failed to load feature flags on server: FetchError: [GET] "http://ingress/api/content/feature-flags": 502 Bad Gateway
opnform-client         |     at process.processTicksAndRejections (node:internal/process/task_queues:103:5)
opnform-client         |     ... 8 lines matching cause stack trace ...
opnform-client         |   cause: FetchError: [GET] "http://ingress/api/content/feature-flags": 502 Bad Gateway
opnform-client         |       at process.processTicksAndRejections (node:internal/process/task_queues:103:5)
opnform-client         |       at async $fetchRaw2 (file:///app/server/chunks/nitro/nitro.mjs:3961:14)
opnform-ingress        | 2026/01/08 22:43:29 [error] 35#35: *717 connect() failed (111: Connection refused) while connecting to upstream, client: 172.27.0.7, server: opnform, request: "GET /api/templates HTTP/1.1", upstream: "fastcgi://172.27.0.6:9000", host: "ingress"
opnform-ingress        | 172.27.0.7 - - [08/Jan/2026:22:43:29 +0000] "GET /api/templates HTTP/1.1" 502 157 "-" "node"
opnform-client         | Request error 502
opnform-ingress        | 2026/01/08 22:43:29 [error] 41#41: *719 connect() failed (111: Connection refused) while connecting to upstream, client: 172.27.0.7, server: opnform, request: "GET /api/templates HTTP/1.1", upstream: "fastcgi://172.27.0.6:9000", host: "ingress"
opnform-ingress        | 172.27.0.7 - - [08/Jan/2026:22:43:29 +0000] "GET /api/templates HTTP/1.1" 502 157 "-" "node"
opnform-ingress        | 127.0.0.1 - - [08/Jan/2026:22:43:29 +0000] "GET / HTTP/1.1" 200 292139 "-" "curl/8.14.1"
opnform-client         | Request error 502
opnform-db             | 2026-01-08 22:43:29.330 UTC [4808] FATAL:  password authentication failed for user "forge"
opnform-db             | 2026-01-08 22:43:29.330 UTC [4808] DETAIL:  Role "forge" does not exist.
opnform-db             | 	Connection matched file "/var/lib/postgresql/data/pg_hba.conf" line 128: "host all all all scram-sha-256"
opnform-db             | 2026-01-08 22:43:29.706 UTC [4809] FATAL:  password authentication failed for user "forge"
opnform-db             | 2026-01-08 22:43:29.706 UTC [4809] DETAIL:  Role "forge" does not exist.

I guess that's an easy one. Thank you for helping out!

Activity

  1. JhumanJ commented on Jan 12, 2026

    @JhumanJ
    Collaborator

    Seems like you're missing .env files or they're not being properly loaded.
    Is this resolved? I saw some messages on Discord

  2. simonseres commented on Jan 13, 2026

    @simonseres
    Author

    No I haven't been on Discord.
    Well, I was thinking that .env files might not be loaded correctly, but to verify I changed the docker-compose.yaml and simply copied the environment variables from api/.env and client/.env to the docker-compose.yaml:

    ---
    services:
      api: &api-environment
        image: jhumanj/opnform-api:latest
        container_name: opnform-api
        volumes: &api-environment-volumes
          - /volume1/docker/opnform/opnform_storage:/usr/share/nginx/html/storage:rw
        environment: &api-env
          # Database settings
          DB_HOST: db
          REDIS_HOST: redis
          DB_DATABASE: ${DB_DATABASE:-forge}
          DB_USERNAME: ${DB_USERNAME:-forge}
          DB_PASSWORD: ${DB_PASSWORD:-forge}
          DB_CONNECTION: ${DB_CONNECTION:-pgsql}
          # PHP Configuration
          PHP_MEMORY_LIMIT: "1G"
          PHP_MAX_EXECUTION_TIME: "600"
          PHP_UPLOAD_MAX_FILESIZE: "64M"
          PHP_POST_MAX_SIZE: "64M"
          # copied from original env file
          APP_NAME: "OpnForm"
          APP_ENV: production
          APP_KEY: base64:MYKEY
          APP_DEBUG: false
          APP_URL: "https://myurl"
    
          LOG_CHANNEL: errorlog
          LOG_LEVEL: debug
    
          FILESYSTEM_DRIVER: local
          LOCAL_FILESYSTEM_VISIBILITY: public
    
          CACHE_DRIVER: redis
    
          QUEUE_CONNECTION: redis
          SESSION_DRIVER: redis
    
          JWT_TTL: 1440
          JWT_SECRET: MYSECRET
          JWT_SKIP_IP_UA_VALIDATION: true
    
          SHOW_OFFICIAL_TEMPLATES: false
          FRONT_API_SECRET: MYSECRET
    
        depends_on:
          db:
            condition: service_healthy
          redis:
            condition: service_healthy # Depend on redis being healthy too
        healthcheck:
          test: ["CMD-SHELL", "php /usr/share/nginx/html/artisan about || exit 1"]
          interval: 30s
          timeout: 15s
          retries: 3
          start_period: 60s
    
      api-worker:
        <<: *api-environment
        container_name: opnform-api-worker
        command: ["php", "artisan", "queue:work"]
        environment:
          <<: *api-env
        healthcheck:
          test:
            ["CMD-SHELL", "pgrep -f 'php artisan queue:work' > /dev/null || exit 1"]
          interval: 60s
          timeout: 10s
          retries: 3
          start_period: 30s
    
      api-scheduler:
        <<: *api-environment
        container_name: opnform-api-scheduler
        command: ["php", "artisan", "schedule:work"]
        environment:
          <<: *api-env
        healthcheck:
          test:
            [
              "CMD-SHELL",
              "php /usr/share/nginx/html/artisan app:scheduler-status --mode=check --max-minutes=3 || exit 1",
            ]
          interval: 60s
          timeout: 30s
          retries: 3
          start_period: 70s # Allow time for first scheduled run and cache write
    
      ui:
        image: jhumanj/opnform-client:latest
        container_name: opnform-client
        environment:
          # copied from original env file
          NUXT_PUBLIC_APP_URL: "https://myurl"
          NUXT_PUBLIC_API_BASE: /api
          NUXT_PRIVATE_API_BASE: http://ingress/api
          NUXT_PUBLIC_ENV: dev
          NUXT_PUBLIC_H_CAPTCHA_SITE_KEY:
          NUXT_PUBLIC_RE_CAPTCHA_SITE_KEY:
          NUXT_API_SECRET: MYSECRET
          NUXT_PUBLIC_ROOT_REDIRECT_URL: "https://myurl"
        depends_on:
          api:
            condition: service_healthy
        healthcheck:
          test:
            ["CMD-SHELL", "wget --spider -q http://localhost:3000/login || exit 1"]
          interval: 30s
          timeout: 10s
          retries: 3
          start_period: 45s
    
      redis:
        image: redis:7
        container_name: opnform-redis
        volumes:
          - /volume1/docker/opnform/redis-data:/data
        healthcheck:
          test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
          interval: 30s
          timeout: 5s
    
      db:
        image: postgres:16
        container_name: opnform-db
        environment:
          POSTGRES_DB: ${DB_DATABASE:-forge}
          POSTGRES_USER: ${DB_USERNAME:-forge}
          POSTGRES_PASSWORD: ${DB_PASSWORD:-forge}
        healthcheck:
          test: ["CMD-SHELL", "pg_isready -U ${DB_USERNAME:-forge}"]
          interval: 30s
          timeout: 5s
        volumes:
          - /volume1/docker/opnform/postgres-data:/var/lib/postgresql/data
    
      ingress:
        image: nginx:1
        container_name: opnform-ingress
        volumes:
          - /volume1/docker/opnform/nginx:/etc/nginx/templates/default.conf.template
        ports:
          - 8800:80
        environment:
          - NGINX_MAX_BODY_SIZE=64m
        depends_on:
          api:
            condition: service_started
          ui:
            condition: service_started
        healthcheck:
          test: ["CMD-SHELL", "nginx -t && curl -f http://localhost/ || exit 1"]
          interval: 30s
          timeout: 5s
          retries: 3
          start_period: 10s
    
    volumes:
      postgres-data:
      opnform_storage:
      redis-data:
      nginx:
    

    When I start this stack through docker compose / portainer on Synology, all containers start and run correctly.

    But with this, I get nginx' front page:

    Image

    Some Logs that seem to be important:

    
    opnform-client         | Failed to load feature flags on server: FetchError: [GET] "http://ingress/api/content/feature-flags": 404 Not Found
    
    opnform-ingress        | 2026/01/13 21:16:23 [error] 39#39: *77 open() "/usr/share/nginx/html/api/content/feature-flags" failed (2: No such file or directory), client: 172.27.0.7, server: localhost, request: "GET /api/content/feature-flags HTTP/1.1", host: "ingress"
    
    

    I still think the Docker version on Synology is too old (Docker version 24.0.2) - would you agree?

  3. simonseres commented on Jan 13, 2026

    @simonseres
    Author

    Edit: Just saw, that I misconfigured NUXT_PUBLIC_API_BASE that was causing the 404 errors above.

    But still I have issues on Synology. Installed everything on a Raspberry - everything works flawlessly in minutes. Just Synology has someting special to it... 😅

    You can close the issue - it has definitely nothing to do with your App - which is absolutely fantastic by the way!
    If I have an update for the Synology community I will still post it in this thread.

  4. simonseres commented on Aug 10, 2026

    @simonseres
    Author

    Update for those who need it:
    I finally managed to run OpnForm on Synology. Once you do it right, it runs butter smooth. ;)

    Below is my docker-compose.yaml that I simply use in Synology's Container Manager:

    You have to make sure that the nginx configuration file is mapped correctly out of its volume. In my case /volume1/docker/opnform/nginx/nginx.conf.

    Also the environment files (api.env and client.env) need to be in the same folder as the docker-compose.yaml.
    In my case /volume1/docker/opnform/api.env

    ---
    services:
      api: &api-environment
        image: jhumanj/opnform-api:latest
        container_name: opnform-api
        volumes: &api-environment-volumes
          - /volume1/docker/opnform/storage:/usr/share/nginx/html/storage:rw
        environment: &api-env
          APP_ENV: production
          # Database settings
          DB_HOST: db
          REDIS_HOST: redis
          DB_DATABASE: ${DB_DATABASE:-forge}
          DB_USERNAME: ${DB_USERNAME:-forge}
          DB_PASSWORD: ${DB_PASSWORD:-forge}
          DB_CONNECTION: ${DB_CONNECTION:-pgsql}
          # PHP Configuration
          PHP_MEMORY_LIMIT: "1G"
          PHP_MAX_EXECUTION_TIME: "600"
          PHP_UPLOAD_MAX_FILESIZE: "64M"
          PHP_POST_MAX_SIZE: "64M"
        env_file:
          - /volume1/docker/opnform/api.env
        depends_on:
          db:
            condition: service_healthy
          redis:
            condition: service_healthy # Depend on redis being healthy too
        healthcheck:
          test: ["CMD-SHELL", "php /usr/share/nginx/html/artisan about || exit 1"]
          interval: 30s
          timeout: 15s
          retries: 3
          start_period: 60s
    
      api-worker:
        <<: *api-environment
        container_name: opnform-api-worker
        command: ["php", "artisan", "queue:work"]
        environment:
          <<: *api-env
          APP_ENV: production
        healthcheck:
          test:
            ["CMD-SHELL", "pgrep -f 'php artisan queue:work' > /dev/null || exit 1"]
          interval: 60s
          timeout: 10s
          retries: 3
          start_period: 30s
    
      api-scheduler:
        <<: *api-environment
        container_name: opnform-api-scheduler
        command: ["php", "artisan", "schedule:work"]
        environment:
          <<: *api-env
          APP_ENV: production
        healthcheck:
          test:
            [
              "CMD-SHELL",
              "php /usr/share/nginx/html/artisan app:scheduler-status --mode=check --max-minutes=3 || exit 1",
            ]
          interval: 60s
          timeout: 30s
          retries: 3
          start_period: 70s # Allow time for first scheduled run and cache write
    
      ui:
        image: jhumanj/opnform-client:latest
        container_name: opnform-client
        env_file:
          - /volume1/docker/opnform/client.env
        depends_on:
          api:
            condition: service_healthy
        healthcheck:
          test:
            ["CMD-SHELL", "wget --spider -q http://localhost:3000/login || exit 1"]
          interval: 30s
          timeout: 10s
          retries: 3
          start_period: 45s
    
      redis:
        image: redis:7
        container_name: opnform-redis
        volumes:
          - /volume1/docker/opnform/redis:/data
        healthcheck:
          test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
          interval: 30s
          timeout: 5s
    
      db:
        image: postgres:16
        container_name: opnform-db
        environment:
          POSTGRES_DB: ${DB_DATABASE:-forge}
          POSTGRES_USER: ${DB_USERNAME:-forge}
          POSTGRES_PASSWORD: ${DB_PASSWORD:-forge}
        healthcheck:
          test: ["CMD-SHELL", "pg_isready -U ${DB_USERNAME:-forge}"]
          interval: 30s
          timeout: 5s
        volumes:
          - /volume1/docker/opnform/postgres:/var/lib/postgresql/data
    
      ingress:
        image: nginx:1
        container_name: opnform-ingress
        volumes:
          - /volume1/docker/opnform/nginx/nginx.conf:/etc/nginx/templates/default.conf.template
        ports:
          - 8800:80
        environment:
          - NGINX_MAX_BODY_SIZE=64m
        depends_on:
          api:
            condition: service_started
          ui:
            condition: service_started
        healthcheck:
          test: ["CMD-SHELL", "nginx -t && curl -f http://localhost/ || exit 1"]
          interval: 30s
          timeout: 5s
          retries: 3
          start_period: 10s
    
    volumes:
      postgres-data:
      opnform_storage:
      redis-data:
    
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions