Nginx welcome page instead of invoice ninja

Good morning everyone,

Until today, I’ve never spent so much time trying to install something…
I’ve installed Invoice Ninja on my Synology NAS using Docker (via Portainer), but I’m facing an issue. Instead of seeing the Invoice Ninja interface, I’m constantly redirected to the Nginx welcome page.

The Nginx logs don’t show any errors or anything that indicates what might be wrong.
Could you please take a look at my configuration and help me resolve this issue?

My NAS IP: 192.168.178.10
Portainer: 192.168.178.10:9000

Thank you in advance!

Best regards,
Kamil

in-vhost.conf:

server {
listen 9010;
server_name 192.168.178.10;

# listen 80 default_server;

# server_name _;

location / {
    proxy_pass http://192.168.178.10:9010; # Verknüpfe mit dem richtigen Upstream-Service (z. B. Docker-Container)
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    try_files $uri $uri/ /index.php?$query_string;
}

root /var/www/app/public;
index index.php index.html index.htm;

client_max_body_size 100M;

# location / {

# try_files $uri $uri/ /index.php?$query_string;

# }

location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt  { access_log off; log_not_found off; }

location ~ \.php$ {
    include fastcgi_params;
    fastcgi_pass invoiceninja:9000;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param PATH_INFO $fastcgi_path_info;
    fastcgi_buffers 16 16k;
    fastcgi_buffer_size 32k;
}

location ~ /\.ht {
    deny all;
}

location /.well-known/acme-challenge/ {
    allow all;
}

}

Stack:

services:
redis:
image: redis
command:
- /bin/sh
- -c
- redis-server --requirepass redispass
container_name: InvoiceNinja-REDIS
hostname: invoiceninja-redis
mem_limit: 256m
mem_reservation: 50m
cpu_shares: 768
security_opt:
- no-new-privileges:true
read_only: true
user: 1026:100
healthcheck:
test: [“CMD-SHELL”, “redis-cli ping || exit 1”]
volumes:
- /volume1/docker/invoiceninja/redis:/data:rw
environment:
TZ: Europe/Berlin
restart: on-failure:5

db:
image: mariadb:11.4-noble #LTS Long Time Support Until May 29, 2029.
container_name: InvoiceNinja-DB
hostname: invoiceninja-db
mem_limit: 1g
cpu_shares: 768
security_opt:
- no-new-privileges:false
- seccomp:unconfined
- apparmor:unconfined
volumes:
- /volume1/docker/invoiceninja/db:/var/lib/mysql:rw
environment:
TZ: Europe/Berlin
MYSQL_ROOT_PASSWORD: ninjauser
MYSQL_DATABASE: invoiceninja
MYSQL_USER: ninjauser
MYSQL_PASSWORD: ninjauser
restart: on-failure:5

invoiceninja:
image: invoiceninja/invoiceninja:latest
container_name: InvoiceNinja
hostname: invoiceninja
mem_limit: 4g
cpu_shares: 768
security_opt:
- no-new-privileges:true
healthcheck:
test: stat /etc/passwd || exit 1
volumes:
- /volume1/docker/invoiceninja/public:/var/www/app/public:rw
- /volume1/docker/invoiceninja/storage:/var/www/app/storage:rw
environment:
APP_NAME: Invoice Ninja
APP_ENV: production
APP_KEY: generated_key # or generate self: Portainer-invoiceninja-console-bin/sh → php artisan key:generate --show
APP_DEBUG: false
APP_URL: http://192.168.178.10:9010
IN_USER_EMAIL: my_email
IN_PASSWORD: my_password
REQUIRE_HTTPS: true
TRUSTED_PROXIES: “*”
IS_DOCKER: true
QUEUE_CONNECTION: database
DB_HOST: invoiceninja-db
DB_DATABASE: invoiceninja
DB_USERNAME: ninjauser
DB_PASSWORD: ninjauser
CACHE_DRIVER: redis
SESSION_DRIVER: redis
REDIS_HOST: invoiceninja-redis
REDIS_PASSWORD: redispass

# PHANTOMJS_KEY=‘a-demo-key-with-low-quota-per-ip-address’

# PHANTOMJS_SECRET=password

  PHANTOMJS_PDF_GENERATION: false
  PDF_GENERATOR: snappdf
  MAIL_MAILER: smtp
  MAIL_HOST: my_smtp_server
  MAIL_PORT: 587
  MAIL_USERNAME: my_email
  MAIL_PASSWORD: my_password
  MAIL_ENCRYPTION: STARTTLS
  MAIL_FROM_ADDRESS: my_email
  MAIL_FROM_NAME: Invoice Ninja
  #ERROR_EMAIL: [email protected] # Error emails are sent to this email
restart: on-failure:5
depends_on:
  redis:
    condition: service_healthy
  db:
    condition: service_started

nginx:
image: nginx:latest
container_name: InvoiceNinja-NGINX
hostname: invoiceninja-nginx
mem_limit: 512m
cpu_shares: 768
security_opt:
- no-new-privileges:true
healthcheck:
test: curl -f http://localhost:80/ || exit 1
ports:
- 9010:80
volumes:
- /volume1/docker/invoiceninja/in-vhost.conf:/etc/nginx/conf.d/in-vhost.conf:ro
- /volume1/docker/invoiceninja/public:/var/www/app/public:ro
restart: on-failure:5
depends_on:
invoiceninja:
condition: service_started

Hi,

Maybe the info here will help:

Thank you, @hillel, for your quick response. I’ve already found the topic, but I don’t quite understand how it could help me. The “base64” is there, and the solution with the cron seems to apply only to version 4.

I’m not sure if it’s relevant, but my Portainer IP is 192.168.178.10:9000. Here’s a screenshot of the IPs for Invoice Ninja and the other services.