Karrio is a suite of open-source tools that make shipping simple and accessible. With Karrio, you can access a network of shipping carriers with a single API integration, build shipping functionalities seamlessly, and improve fulfilment operations. In this step by step guide I will show you how to install Karrio on your Synology NAS using Docker & Portainer.
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.
STEP 5
Now click the “Create” button. Follow the instructions in the image below.
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 Karrio. After that, add the following instructions:
Source:
Protocol: HTTPS
Hostname: karrio.yourname.synology.me
Port: 443
Check Enable HSTS
Destination:
Protocol: HTTP
Hostname: localhost
Port: 3580
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.
STEP 8
Go to Control Panel / Login Portal / Advanced Tab / click Reverse Proxy. Follow the instructions in the image below.
STEP 9
Now click the “Create” button. Follow the instructions in the image below.
STEP 10
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 Karrio API. After that, add the following instructions:
Source:
Protocol: HTTPS
Hostname: karrioapi.yourname.synology.me
Port: 443
Check Enable HSTS
Destination:
Protocol: HTTP
Hostname: localhost
Port: 5002
STEP 11
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.
STEP 12
Go to Control Panel / Network / Connectivity tab/ Check Enable HTTP/2 then click Apply. Follow the instructions in the image below.
STEP 13
Go to Control Panel / Security / Advanced tab/ Check Enable HTTP Compression then click Apply. Follow the instructions in the image below.
STEP 14
Go to File Station and open the docker folder. Inside the docker folder, create one new folder and name it karrio. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.
STEP 15
Now create two new folders inside the karrio folder that you created at STEP 14 and name them db and redis. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.
STEP 16
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.
STEP 17
In the Name field type in karrio. Follow the instructions in the image below.
services: redis: image: redis container_name: Karrio-REDIS hostname: karrio-redis security_opt: - no-new-privileges:true user: 1026:100 healthcheck: test: ["CMD-SHELL", "redis-cli ping || exit 1"] volumes: - /volume1/docker/karrio/redis:/data:rw environment: TZ: Europe/Bucharest restart: on-failure:5 db: image: postgres:16 container_name: Karrio-DB security_opt: - no-new-privileges:true healthcheck: test: ["CMD", "pg_isready", "-q", "-d", "karrio", "-U", "karriouser"] timeout: 45s interval: 10s retries: 10 volumes: - /volume1/docker/karrio/db:/var/lib/postgresql/data:rw environment: POSTGRES_DB: karrio POSTGRES_USER: karriouser POSTGRES_PASSWORD: karriopass restart: on-failure:5 api: image: karrio/server:2024.9.7 container_name: Karrio-API hostname: karrio-api security_opt: - no-new-privileges:true ports: - 5002:5002 environment: USE_HTTPS: True DEBUG_MODE: False DETACHED_WORKER: True SECRET_KEY: Expb7DxmJAyygBfW6btrAVaXPWyJ6KQK KARRIO_HTTP_PORT: 5002 ADMIN_EMAIL: Your-own-email-address ADMIN_PASSWORD: mariushosting ALLOW_SIGNUP: True ALLOW_ADMIN_APPROVED_SIGNUP: False ALLOW_MULTI_ACCOUNT: False MULTI_ORGANIZATIONS: False REDIS_PORT: 6379 REDIS_HOST: karrio-redis DATABASE_HOST: karrio-db DATABASE_NAME: karrio DATABASE_PORT: 5432 DATABASE_ENGINE: postgresql_psycopg2 DATABASE_USERNAME: karriouser DATABASE_PASSWORD: karriopass restart: on-failure:5 depends_on: redis: condition: service_healthy db: condition: service_healthy worker: image: karrio/server:2024.9.7 command: '/bin/bash ./worker' container_name: Karrio-WORKER hostname: karrio-worker security_opt: - no-new-privileges:true environment: DEBUG_MODE: False REDIS_PORT: 6379 REDIS_HOST: karrio-redis DATABASE_HOST: karrio-db DATABASE_NAME: karrio DATABASE_PORT: 5432 DATABASE_ENGINE: postgresql_psycopg2 DATABASE_USERNAME: karriouser DATABASE_PASSWORD: karriopass restart: on-failure:5 depends_on: redis: condition: service_healthy db: condition: service_healthy api: condition: service_started dashboard: image: karrio/dashboard:2024.9.7 container_name: Karrio-DASHBOARD hostname: karrio-dashboard security_opt: - no-new-privileges:true user: 1026:100 healthcheck: test: wget --no-verbose --tries=1 --spider http://localhost:3000 ports: - 3580:3000/tcp environment: JWT_SECRET: MariushostingMariushostingMari13 NEXT_PUBLIC_DASHBOARD_URL: https://karrio.yourname.synology.me # Karrio Homepage Link -> 3580 -> STEP 6 NEXT_PUBLIC_KARRIO_PUBLIC_URL: https://karrioapi.yourname.synology.me # Karrio API Link -> 5002 -> STEP 10 restart: on-failure:5 depends_on: api: condition: service_started
Note: Before you paste the code above in the Web editor area below, change the value numbers for user with your own UID and GID values. (Follow my step by step guide on how to do this.) 1026 is my personal UID value and 100 is my personal GID value. You have to type in your own values.
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 for ADMIN_EMAIL and type in your own email.
Note: Before you paste the code above in the Web editor area below, change the value for ADMIN_PASSWORD and type in your own password. mariushosting is an example for a password.
Note: Before you paste the code above in the Web editor area below, change the value for JWT_SECRET and add your own JWT_SECRET. MariushostingMariushostingMari13 is an example for a JWT_SECRET. You should invent your own Value. Add 32 random characters, both letters and numbers
Note: Before you paste the code above in the Web editor area below, change the value for NEXT_PUBLIC_DASHBOARD_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 NEXT_PUBLIC_KARRIO_PUBLIC_URL and type in your own synology.me DDNS with https:// at the beginning that you have previously created at STEP 10.
STEP 18
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.
STEP 19
If everything goes right, you will see the following message at the top right of your screen: “Success Stack successfully deployed“.
STEP 20
Go back to STEP 1 or you will deal with karma 🙂.
STEP 21
Now open your browser and type in your HTTPS/SSL certificate like this https://karrio.yourname.synology.me In my case it’s https://karrio.mariushosting.synology.me If everything goes right, you will see the Karrio Login page. Type in your own Email and Password that you have previously created at STEP 17, then click Log in. Follow the instructions in the image below. Before the login page becomes available, you need to wait 5-6 minutes or you will get an error message that says API is not reachable or you can’t login. Just refresh the page after a few minutes.
STEP 22
Your Karrio Dashboard at a glance!
Enjoy Karrio!
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 Karrio 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 Tuesday / October 8th, 2024 at 12:29 AM