How to Install InvoiceShelf on Your Synology NAS

How to Install InvoiceShelf on Your Synology NAS

InvoiceShelf is an open-source web & mobile app that helps you track expenses, payments & create professional invoices & estimates. In this step by step guide I will show you how to install InvoiceShelf on your Synology NAS using Docker & Portainer.

💡Note: This guide works perfectly with the latest InvoiceShelf v2.0.0 release.

  • STEP 1

Please Support My work by Making a Donation.

  • STEP 2

Install Portainer using my step by step guide. If you already have Portainer installed on your Synology NAS, skip this STEP. Attention: Make sure you have installed the latest Portainer version.

  • STEP 3

Make sure you have a synology.me Wildcard Certificate. Follow my guide to get a Wildcard Certificate. If you already have a synology.me Wildcard certificate, skip this STEP.

  • STEP 4

Go to Control Panel / Login Portal / Advanced Tab / click Reverse Proxy. Follow the instructions in the image below.

InvoiceShelf Synology NAS Set up 1

  • STEP 5

Now click the “Create” button. Follow the instructions in the image below.

InvoiceShelf Synology NAS Set up 2

  • STEP 6

After you click the Create button, the window below will open. Follow the instructions in the image below.

On the General area, set the Reverse Proxy Name description: type in InvoiceShelf. After that, add the following instructions:

Source:
Protocol: HTTPS
Hostname: invoiceshelf.yourname.synology.me
Port: 443

Check Enable HSTS

Destination:
Protocol: HTTP
Hostname: localhost
Port: 9053

InvoiceShelf Synology NAS Set up 3

  • STEP 7

On the Reverse Proxy Rules click the Custom Header tab. Click Create and then, from the drop-down menu, click WebSocket. After you click on WebSocket, two Header Names and two Values will be automatically added. Click Save. Follow the instructions in the image below.

Synology Proxy WebSocket

  • STEP 8

Go to Control Panel / Network / Connectivity tab/ Check Enable HTTP/2 then click Apply. Follow the instructions in the image below.

InvoiceShelf Synology NAS Set up 4

  • STEP 9

Go to Control Panel / Security / Advanced tab/ Check Enable HTTP Compression then click Apply. Follow the instructions in the image below.

InvoiceShelf Synology NAS Set up 5

  • STEP 10

Go to File Station and open the docker folder. Inside the docker folder, create one new folder and name it invoiceshelf. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.

InvoiceShelf Synology NAS Set up 6

  • STEP 11

Now create three new folders inside the invoiceshelf folder that you have previously created at STEP 10 and name them conf, data, db. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.

InvoiceShelf Synology NAS Set up 7

  • STEP 12

Log into Portainer using your username and password. On the left sidebar in Portainer, click on Stacks then + Add stack. Follow the instructions in the image below.

1 Synology Portainer Add Stack

  • STEP 13

In the Name field type in invoiceshelf. Follow the instructions in the image below.

Note: Copy Paste the code below in the Portainer Stacks Web editor.

services:
  db:
    image: postgres:17
    container_name: InviceShelf-DB
    hostname: invoiceshelf-db
    security_opt:
      - no-new-privileges:true
    healthcheck:
      test: ["CMD", "pg_isready", "-q", "-d", "invoiceshelf", "-U", "invoiceshelfuser"]
      timeout: 45s
      interval: 10s
      retries: 10
    volumes:
      - /volume1/docker/invoiceshelf/db:/var/lib/postgresql/data:rw
    environment:
      POSTGRES_DB: invoiceshelf
      POSTGRES_USER: invoiceshelfuser
      POSTGRES_PASSWORD: invoiceshelfpass
    restart: on-failure:5

  invoiceshelf:
    image: invoiceshelf/invoiceshelf:latest
    container_name: InvoiceShelf
    ports:
      - 9053:80
    volumes:
      - /volume1/docker/invoiceshelf/data:/data:rw
      - /volume1/docker/invoiceshelf/conf:/conf:rw
    environment:
       PHP_TZ: Europe/Bucharest
       TIMEZONE: Europe/Bucharest
       PUID: 1026
       PGID: 100
       APP_NAME: Mariushosting
       APP_KEY: base64:PqkYgeKqq3hdHZTvL6ENXdhgyyoCDZYj9wofOcw0l4o=
       APP_ENV: local
       APP_DEBUG: true
       APP_URL: https://invoiceshelf.yourname.synology.me
       DB_CONNECTION: pgsql
       DB_HOST: db
       DB_PORT: 5432
       DB_DATABASE: invoiceshelf
       DB_USERNAME: invoiceshelfuser
       DB_PASSWORD: invoiceshelfpass
       DB_PASSWORD_FILE: rootpass
       CACHE_STORE: file
       SESSION_DRIVER: file
       SESSION_LIFETIME: 240
       SESSION_ENCRYPT: false
       SESSION_PATH: /
       SESSION_DOMAIN: invoiceshelf.yourname.synology.me
       SANCTUM_STATEFUL_DOMAINS: invoiceshelf.yourname.synology.me
       STARTUP_DELAY: 5
       TRUSTED_PROXIES: "*"
    restart: on-failure:5
    depends_on:
      - db

Note: Before you paste the code above in the Web editor area below, change the value for TZ. (Select your current Time Zone from this list.)
Note: Before you paste the code above in the Web editor area below, change the value numbers for PUID and PGID with your own values. (Follow my step by step guide on how to do this.)
Note: Before you paste the code above in the Web editor area below, change the value for APP_NAME. Mariushosting is an example for an APP NAME.
Note: Before you paste the code above in the Web editor area below, change the value for APP_KEY. (Generate your own free APP KEY.)
Note: Before you paste the code above in the Web editor area below, change the value for APP_URL and type in your own synology.me DDNS with https:// at the beginning that you have previously created at STEP 6.
Note: Before you paste the code above in the Web editor area below, change the value for SESSION_DOMAIN and type in your own synology.me DDNS without https:// at the beginning that you have previously created at STEP 6.
Note: Before you paste the code above in the Web editor area below, change the value for SANCTUM_STATEFUL_DOMAINS and type in your own synology.me DDNS without https:// at the beginning that you have previously created at STEP 6.

InvoiceShelf Synology NAS Set up 8

  • STEP 14

Scroll down on the page until you see a button named Deploy the stack. Click on it. Follow the instructions in the image below. The installation process can take up to a few minutes. It will depend on your Internet speed connection.

InvoiceShelf Synology NAS Set up 9

  • STEP 15

If everything goes right, you will see the following message at the top right of your screen: “Success Stack successfully deployed“.

InvoiceShelf Synology NAS Set up 10

  • STEP 16

Go back to STEP 1 or you will deal with karma 🙂.

  • STEP 17

Now open your browser and type in your HTTPS/SSL certificate like this https://invoiceshelf.yourname.synology.me that you have previously created at STEP 6. In my case it’s https://invoiceshelf.mariushosting.synology.me Select your language, then click Continue. Follow the instructions in the image below.

InvoiceShelf Synology NAS Set up 11

  • STEP 18

Click Check Requirements. Follow the instructions in the image below.

InvoiceShelf Synology NAS Set up 12

  • STEP 19

Click Continue. Follow the instructions in the image below.

InvoiceShelf Synology NAS Set up 13

  • STEP 20

Click Continue. Follow the instructions in the image below.

InvoiceShelf Synology NAS Set up 14

  • STEP 21

Type in your own database connection details. Follow the instructions below.

  1. App URL: Type in your own synology.me DDNS with https:// at the beginning.
  2. Database Connection: pgsql
  3. Database Port: 5432
  4. Database Name: invoiceshelf
  5. Database Username: invoiceshelfuser
  6. Database Password: invoiceshelfpass
  7. Database Host: db

Check wizard.database.overwrite then click Save & Continue. Follow the instructions in the image below.

InvoiceShelf Synology NAS Set up 15

  • STEP 22

In the App Domain field, type in your own synology.me DDNS without https:// at the beginning. Click Verify Now. Follow the instructions in the image below.

InvoiceShelf Synology NAS Set up 16

  • STEP 23

Follow my step by step guide on how to activate SMTP for your Gmail account. This step is mandatory. Note: If you don’t want to use the easiest way for SMTP with Google and you already have SMTP details from your own Mail Server, you can just skip this STEP and use your personalized email SMTP details instead.

  • STEP 24

Configure your email using Gmail SMTP details. Follow the instructions below.

  1. Mail Driver: smtp
  2. Mail Host: smtp.gmail.com
  3. Mail Username: type in your own Gmail address. STEP 23.
  4. Mail Password: type in your own Gmail app password. STEP 23.
  5. Mail Port: 587
  6. Mail Encryption: starttls
  7. From Mail Address: type in your own Gmail address. STEP 23.
  8. From Mail Name: Your company name.

Click Save. Follow the instructions in the image below.

InvoiceShelf Synology NAS Set up 17

  • STEP 25

Add your own Account Information then click Save & Continue. Follow the instructions in the image below.

InvoiceShelf Synology NAS Set up 18

  • STEP 26

Add your own Company Information then click Save & Continue. Follow the instructions in the image below.

InvoiceShelf Synology NAS Set up 19

  • STEP 27

Add your own Company Preferences then click Save & Continue. Follow the instructions in the image below.

InvoiceShelf Synology NAS Set up 20

  • STEP 28

A new pop up window will open. Click Ok. Follow the instructions in the image below.

InvoiceShelf Synology NAS Set up 21

  • STEP 29

Your InvoiceShelf at a glance!

InvoiceShelf Synology NAS Set up 22

  • STEP 30

Create your first invoice. Follow the instructions in the image below.

InvoiceShelf Synology NAS Set up 23

  • STEP 31

Your invoice at a glance!

InvoiceShelf Synology NAS Set up 24

  • STEP 32

Your InvoiceShelf dashboard at a glance!

InvoiceShelf Synology NAS Set up 25

Enjoy InvoiceShelf!

🆘TROUBLESHOOTING

If you encounter issues by using this container, make sure to check out the Common Docker issues article.

Note: Can I run Docker on my Synology NAS? See the supported models.
Note: How to Back Up Docker Containers on your Synology NAS.
Note: Find out how to update the InvoiceShelf container with the latest image.
Note: How to Free Disk Space on Your NAS if You Run Docker.
Note: How to Schedule Start & Stop For Docker Containers.
Note: How to Activate Email Notifications.
Note: How to Add Access Control Profile on Your NAS.
Note: How to Change Docker Containers Restart Policy.
Note: How to Use Docker Containers With VPN.
Note: Convert Docker Run Into Docker Compose.
Note: How to Clean Docker.
Note: How to Clean Docker Automatically.
Note: Best Practices When Using Docker and DDNS.
Note: Some Docker Containers Need WebSocket.
Note: Find out the Best NAS Models For Docker.
Note: Activate Gmail SMTP For Docker Containers.

This post was updated on Wednesday / October 9th, 2024 at 1:55 AM