IP and Host for a VPS Server with Domain and Reverse Proxy -- 8003 -- Logo not showing

Hello, I bought now a VPS and set up a Domain.

I use SmarTTY to connect via SSH and have a File Browser.

Domain and Subdomain are connectet via DNS to my VPS IP 87. XX.XX.XX
The Subdomain is used for the InvoiceNinja


so i installed Nginx Proxy Manager

To find my ip adress of the other container i used

docker ps
docker inspect ContainerID of my NPM

“Gateway”: “172.18.0.1”,
“IPAddress”: “172.18.0.3”,


so for the ENV im using AppURL = https://rechnung.mydomain.at:8003/

for the docker-compose file there are 3 lines with

extra_hosts:
- "in5.localhost:192.168.0.124 " #host and ip

What should i input there?

  • "rechnung.mydomain.at:172.18.0.4 " #host and ip ?

must i activate the 443 Port there?

  • “8003:80”
  • “4430:443”

Thank you, Nico.

Hi,

Sorry, I’m not sure.

Note: you may need to add TRUSTED_PROXIES=* to the .env file.

1 Like

Thank you and thx for the link

This is working so far

IN application vars

APP_URL=https://rechnung.domain.at (no 8003 here)
APP_KEY=base64:Z…
APP_DEBUG=false
REQUIRE_HTTPS=true
PHANTOMJS_PDF_GENERATION=false (Must be off)
PDF_GENERATOR=snappdf
TRUSTED_PROXIES=‘*’ (error if something is in)

QUEUE_CONNECTION=database

DB connection

DB_HOST=db
DB_PORT=3306
DB_DATABASE=ninja
DB_USERNAME=
DB_PASSWORD=

Create initial user

Default to these values if empty

IN_USER_EMAIL=admin@example.com

IN_PASSWORD=changeme!

IN_USER_EMAIL=
IN_PASSWORD=

Mail options

MAIL_MAILER=smtp
MAIL_HOST=smtp.ionos.de
MAIL_PORT=587
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_ENCRYPTION=starttls
MAIL_FROM_ADDRESS=
MAIL_FROM_NAME=

MySQL

MYSQL_ROOT_PASSWORD=
MYSQL_USER=
MYSQL_PASSWORD=
MYSQL_DATABASE=ninja

V4 env vars

DB_STRICT=false

APP_CIPHER=AES-256-CBC

Without in5.localhost everything is crashing

version: ‘3.7’

services:
server:
image: nginx
restart: always
env_file: env
volumes:
# Vhost configuration
#- ./config/caddy/Caddyfile:/etc/caddy/Caddyfiledocker-com
- ./config/nginx/in-vhost.conf:/etc/nginx/conf.d/in-vhost.conf:ro
- ./docker/app/public:/var/www/app/public:ro
depends_on:
- app
# Run webserver nginx on port 80
# Feel free to modify depending what port is already occupied
ports:
- “8003:80”
#- “4430:443”
networks:
- invoiceninja
extra_hosts:
- "in5.localhost:172.19.0.1 " #host and ip

app:
image: invoiceninja/invoiceninja:5
env_file: env
restart: always
volumes:
- ./config/hosts:/etc/hosts:ro
- ./docker/app/public:/var/www/app/public:rw,delegated
- ./docker/app/storage:/var/www/app/storage:rw,delegated
- ./config/php/php.ini:/usr/local/etc/php/php.ini
- ./config/php/php-cli.ini:/usr/local/etc/php/php-cli.ini

depends_on:
  - db
networks:
  - invoiceninja
extra_hosts:
  - "in5.localhost:172.19.0.1 " #host and ip

db:
image: mysql:8

When running on ARM64 use MariaDB instead of MySQL

image: mariadb:10.4

For auto DB backups comment out image and use the build block below

build:

context: ./config/mysql

ports:
  - "3305:3306"
restart: always
env_file: env
volumes:
  - ./docker/mysql/data:/var/lib/mysql:rw,delegated

  # remove comments for next 4 lines if you want auto sql backups
  #- ./docker/mysql/bak:/backups:rw
  #- ./config/mysql/backup-script:/etc/cron.daily/daily:ro
  #- ./config/mysql/backup-script:/etc/cron.weekly/weekly:ro
  #- ./config/mysql/backup-script:/etc/cron.monthly/monthly:ro
networks:
  - invoiceninja
extra_hosts:
  - "in5.localhost:172.19.0.1 " #host and ip 

THIS IS ONLY A VALID CONFIGURATION FOR IN 4. DO NOT USE FOR IN 5.

cron:

image: invoiceninja/invoiceninja:alpine-4

volumes:

  # - ./docker/app/public:/var/www/app/public:rw,delegated
  # - ./docker/app/storage:/var/www/app/storage:rw,delegated
  # - ./docker/app/public/logo:/var/www/app/public/logo:rw,delegated

entrypoint: |

/bin/sh -c 'sh -s <<EOF

trap “break;exit” SIGHUP SIGINT SIGTERM

sleep 300s

while /bin/true; do

./artisan ninja:send-invoices

./artisan ninja:send-reminders

sleep 1d

done

EOF’

networks:

- invoiceninja

networks:
invoiceninja:

image
This domain is working

but if i send a Invoice via Mail the customer gets a link with :8003 in it

image

then it wont connect to invoice ninja

Nginx Proxy Manager

https://rechnung.domain.at/settings/client_portal

remove the :8003

solved

Glad to hear it, thanks for sharing the solution!

1 Like

I had removed the :8003 from the env file

image

How could i stop this happen? You must reupload the Logo

image

Solved (Logo not Showing)