From bf9143459139b6879d1de4a9f80ad3353778e691 Mon Sep 17 00:00:00 2001 From: Justin Date: Wed, 18 Sep 2024 18:02:54 +0800 Subject: [PATCH 1/2] update to 2.4.11 --- _data/product_version.yml | 1 + .../ConfigureReverseProxyUsingIIS.md | 66 ++++++++ .../ConfigureReverseProxyUsingNginx.md | 138 +++++++++++++++++ selfhosting-v2.4.1/DLSonLinux.md | 142 ++++++++++++++++++ selfhosting-v2.4.1/DLSonWindows.md | 126 ++++++++++++++++ selfhosting-v2.4.1/index.md | 78 ++++++++++ selfhosting/DLSonLinux.md | 6 +- selfhosting/DLSonWindows.md | 10 +- 8 files changed, 559 insertions(+), 8 deletions(-) create mode 100644 selfhosting-v2.4.1/ConfigureReverseProxyUsingIIS.md create mode 100644 selfhosting-v2.4.1/ConfigureReverseProxyUsingNginx.md create mode 100644 selfhosting-v2.4.1/DLSonLinux.md create mode 100644 selfhosting-v2.4.1/DLSonWindows.md create mode 100644 selfhosting-v2.4.1/index.md diff --git a/_data/product_version.yml b/_data/product_version.yml index 4996766..553f70e 100644 --- a/_data/product_version.yml +++ b/_data/product_version.yml @@ -1,3 +1,4 @@ version_info_list: - latest version + - 2.4.1 - 2.2.19 \ No newline at end of file diff --git a/selfhosting-v2.4.1/ConfigureReverseProxyUsingIIS.md b/selfhosting-v2.4.1/ConfigureReverseProxyUsingIIS.md new file mode 100644 index 0000000..b13fbd5 --- /dev/null +++ b/selfhosting-v2.4.1/ConfigureReverseProxyUsingIIS.md @@ -0,0 +1,66 @@ +--- +layout: default-layout +title: Configure Reverse Proxy Using IIS +keywords: Install, Dynamsoft License Server, Windows +description: Documentation of Steps to configure reverse proxy using IIS for Dynamsoft License Server. +breadcrumbText: Install DLS on Windows +needAutoGenerateSidebar: true +--- + +# Configure Reverse Proxy Using IIS + +The following is an example on how to set up a reverse proxy using `IIS` for DLS for your reference. You can do the configuration yourself as long as you can achieve the requirement which is to redirect requests sent to `https://www.yoursite.com/dls/*` to `http://127.0.0.1:48080/*`. + +## Install IIS + +Skip this step if you already have IIS installed. + +## Install IIS URL Rewrite + +Download and install IIS URL Rewrite from [here](https://www.iis.net/downloads/microsoft/url-rewrite). + +## Install Application Request Routing + +Download and install Microsoft Application Request Routing [here](https://www.microsoft.com/en-us/download/confirmation.aspx?id=47333). + +## Configure the proxy + +![DLS-on-Windows-023]({{site.assets}}imgs/dlsonwin-023.png) + +![DLS-on-Windows-024]({{site.assets}}imgs/dlsonwin-024.png) + +![DLS-on-Windows-025]({{site.assets}}imgs/dlsonwin-025.png) + +## Configure URL Rewrite rules + +![DLS-on-Windows-017]({{site.assets}}imgs/dlsonwin-017.png) + +![DLS-on-Windows-018]({{site.assets}}imgs/dlsonwin-018.png) + +![DLS-on-Windows-019]({{site.assets}}imgs/dlsonwin-019.png) + +Let's configure the following rule for the server + +``` text +Name:DLS-rewrite-rule +Pattern: ^dls/(.*)$ +Rewrite URL:http://localhost:48080/{R:1} +``` + +![DLS-on-Windows-020]({{site.assets}}imgs/dlsonwin-020.png) + +## Test that the configuration works + +Open `http://www.yoursite.com/dls/page/index.html` and if you see the following page then the configuration is complete. + +![DLS-on-Windows-026]({{site.assets}}imgs/dlsonwin-026.png) + +## Configure SSL + +Prepare a SSL certificate for your site (e.g. `https://www.yoursite.com`) and configure it properly. + +Refer to [how to set up ssl on iis](https://learn.microsoft.com/en-us/iis/manage/configuring-security/how-to-set-up-ssl-on-iis). + +After that, you should be able to access the server by `https://www.yoursite.com/dls/page/index.html#/`. + +> If you use a JavaScript-based SDK, such as Dynamic Web TWAIN WebAssembly Edition or Dynamsoft Barcode Reader JavaScript Edition, you must configure the self-hosted DLS to run over a secure connection (HTTPS). diff --git a/selfhosting-v2.4.1/ConfigureReverseProxyUsingNginx.md b/selfhosting-v2.4.1/ConfigureReverseProxyUsingNginx.md new file mode 100644 index 0000000..5e45472 --- /dev/null +++ b/selfhosting-v2.4.1/ConfigureReverseProxyUsingNginx.md @@ -0,0 +1,138 @@ +--- +layout: default-layout +title: Configure HTTPS on Linux +keywords: Install, Dynamsoft License Server, Linux, HTTPS +description: Steps and information about how to configure HTTPS on Linux +breadcrumbText: Configure HTTPS on Linux +needAutoGenerateSidebar: true +--- + +# Configure Reverse Proxy Using Nginx + +The following is an example on how to set up a reverse proxy using `nginx` for DLS for your reference. You can do the configuration yourself as long as you can achieve the requirement which is to redirect requests sent to `https://www.yoursite.com/dls/*` to `http://127.0.0.1:48080/*`. + +## Install nginx + +### On CentOs + +* Install + +``` shell +rpm -ivh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm +yum install nginx +``` + +* Start + +``` shell +systemctl start nginx.server +``` + +* Configure the web server to start with the OS + +``` shell +systemctl enable nginx.server +``` + +### On Ubuntu + +``` shell +sudo apt install nginx-full +sudo systemctl start nginx +sudo systemctl enable nginx +``` + +## Test nginx + +Open "http://localhost" in a browser. If `nginx` was installed and started successfully, you should see a message like + +``` text +······ Welcome to nginx! ······ +``` + +## Configure nginx + +### Open the configuration file + +The file could either be `/etc/nginx/conf.d/default.conf` or `/etc/nginx/sites-enabled/default` . + + + +### Add reverse proxy + +``` shell +location /dls/ { + proxy_pass http://127.0.0.1:48080/; +} +``` + +### Restart the server + +``` shell +sudo systemctl restart nginx +``` + +At this point, you can access the server with the URL `http://localhost/dls/page/index.html#/` or `http:///dls/page/index.html#/`. + + + +## Configure SSL + +For security, we should access DLS via HTTPS. + +### Self-signed Certificate + +For demoing and testing purposes, we can try the self-signed certificate when configuring `nginx` by uncommenting the 3 lines as shown below. + +``` shell +server { +... +# SSL configuration +# +listen 443 ssl default_server; +listen [::]:443 ssl default_server; +# +# Note: You should disable gzip for SSL traffic. +# See: https://bugs.debian.org/773332 +# +# Read up on ssl_ciphers to ensure a secure configuration. +# See: https://bugs.debian.org/765782 +# +# Self signed certs generated by the ssl-cert package +# Don't use them in a production server! +# +include snippets/snakeoil.conf; +... +} +``` + +If your system doesn't have the self-signed certificate. You can install it like this + +``` shell +sudo apt-get install ssl-cert +sudo make-ssl-cert generage-default-snakeoil +``` + +Your client needs to be configured to trust that self-signed certificate. For example, if you are running a web application, you can open the page `https:///dls/page/index.html#/` in the browser and do the following + +* Page shows warning about the self-signed certificate +* Click `Advanced` +* Click `Proceed to xxxx (unsafe)`. + +Then this self-signed certificate will be trusted temporarily for some time. + +> NOTE that you should avoid using self-signed certificates in your production server. + +### Trusted Certificate + +You can get a trusted certificate from many suppliers. + +e.g. You can get a free one from [certbot](https://certbot.eff.org/). + +> If you use a JavaScript-based SDK, such as Dynamic Web TWAIN WebAssembly Edition or Dynamsoft Barcode Reader JavaScript Edition, you must configure the self-hosted DLS to run over a secure connection (HTTPS). diff --git a/selfhosting-v2.4.1/DLSonLinux.md b/selfhosting-v2.4.1/DLSonLinux.md new file mode 100644 index 0000000..a053053 --- /dev/null +++ b/selfhosting-v2.4.1/DLSonLinux.md @@ -0,0 +1,142 @@ +--- +layout: default-layout +title: Install Dynamsoft Dynamsoft License Server on Linux +keywords: Install, Dynamsoft License Server, Linux +description: Steps and information about how to install Dynamsoft Dynamsoft License Server on Linux +breadcrumbText: Install DLS on Linux +needAutoGenerateSidebar: true +--- + +# Install Dynamsoft License Server on Linux + +## Example Environment + +* CPU: 2 Core +* Memory:2 GB +* Disk Space + * System: 8 GB + * Data: 20 GB +* OS:CentOs7.4 + +## Installation + +The following shows all the commands and steps required to set up the Dynamsoft License Server + + + +### Download the Dynamsoft License Server v2.4.1 installer, or just copy it over to a proper location + +``` shell +cd /a-proper-location +wget https://tst.dynamsoft.com/public/download/dls/2.4.1/dynamsoft_dls-linux_x64-v2.4.1.tar.gz +``` + +### Unzip and start the Dynamsoft License Server + +``` shell +# Unzip the installer +tar zxvf dynamsoft_dls-linux_x64-v2.4.1.tar.gz +# Set permissions +chmod -R 755 ./dls-linux +# Start the server +cd ./dls-linux +./startup.sh +``` + +If you use Ubuntu, to start the server, try the following instead. + +``` shell +# [optional] Install net-tools if it is not available (Ubuntu 20.04 may not come with it) +sudo apt install net-tools +./startup.sh +``` + +### Check the status to make sure the server is up + +``` shell +ps -ef |grep dynamsoft +``` + +Now, if you visit [http://127.0.0.1:48080/page/index.html#/](http://127.0.0.1:48080/page/index.html#/) in the browser, you should be able to see the management portal of the Dynamsoft License Server. + +> You can edit startup.sh to change the listening ports. + +Upon the first visit, you will be asked to set an admin password. A few things to note: + +> 1. The default password is empty; +> 2. The user name is admin and it can not be changed; +> 3. **Currently, there isn't a way to retrieve the password should it get lost. Therefore, please keep the password secure**. + +After that, you will land on the home page where you can find the UUID of this DLS . + +> This UUID is require when [activating your licenses]({{site.selfhosted}}index.html#activate-the-license). + +![DLS-HomePage-001]({{site.assets}}imgs/dls-homepage.png) + +If you see the above page, DLS is installed correctly and is ready to process requests. In order to better integrate with your original service, and make the service more secure on the Internet, the next step is to configure the network environment - (set up a reverse proxy) - for it with the help of `nginx`. See [Configure Reverse Proxy Using Nginx]({{site.selfhosted}}configurereverseproxyusingnginx.html) on how to redirect requests for `https://www.yoursite.com/dls/*` to `https://127.0.0.1:48080/*`. + +> NOTE +> +> 1. "proxy" and "https" are only required if you use one of the following products: +> +> * SDKs for Javascript without a local service (like Dynamsoft BarcodeReader Javascript Edition). +> * SDKs for iOS (unless the user makes an exception for the application). ![dls iOS allow http]({{site.assets}}imgs/dls-iOS-allow-http.png) (Reference: https://stackoverflow.com/questions/31254725/transport-security-has-blocked-a-cleartext-http#answer-33712228) +> +> If "proxy" and "https" are not configured, please use `http://ip:port/` in the following steps. +> +> 2. For Docker Users +> +> DLS binds the physical information of a machine. After DLS runs for the first time, you can not change the host machine. Since it is difficult to ensure that a service is deployed on a fixed physical machine on k8s, we do not recommend deploying DLS on k8s. +> +> Some data in the DLS installation directory requires persistent storage. One way is to use the container like a virtual machine. If `docker stop ` was executed, use `docker restart ` to restart. +> Another way is to use [volume mounts](https://docs.docker.com/get-started/05_persisting_data/) or [bind mounts](https://docs.docker.com/get-started/06_bind_mounts/). + +## Configuration + +With the above steps, DLS will be listening on requests sent to this URL `https://www.yoursite.com/dls/`. You can set up another DLS on another machine as the standby server just in case the main server is temporarily unavailable due to network and other reasons. + +### Configure a Standby DLS + +For maximum up time, a standby DLS is necessary. Assume you have installed two copies of DLS, the following are the steps to configure them + +* Find the file `dls.json.sample` in the DLS directory, copy and rename it to `dls.json` + +* In the configuration, there are two settings: "serverMode" and "servers". We only need to change "servers". It accepts two values, the first specifies the main DLS URL and the second, the standby URL. + + * For the main DLS: `"servers": ["self", "https://standby.yoursite.com/dls/"]` + + * For the standby DLS: `"servers": ["https://www.yoursite.com/dls/", "self"]` + +> NOTE that you need to configure both the main DLS and the standby DLS separately. + +### Configure Server URLs + +In order for the license client to know where to find DLS, the server URLs need to be embedded in the license string. + +By default, when you first import a license and create a project, the license string for the project will already contain a server URL which is simply the host of the website. For example, if DLS is being visited like shown in the following image, then the license string will contain server URL as `http://127.0.0.1:48080/`. + +![dls-url-001]({{site.assets}}imgs/dls-url-config-001.png) + +Since the client devices may visit the DLS through a proxy, the automatically detected URL can be incorrect. We can click the button "Set Server URL" and correct it: + +![dls-url-002]({{site.assets}}imgs/dls-url-config-002.png) + +Input the actual server URLs and save: + +![dls-url-003]({{site.assets}}imgs/dls-url-config-003.png) + +Once saved, all license strings will be updated to contain the server URLs. diff --git a/selfhosting-v2.4.1/DLSonWindows.md b/selfhosting-v2.4.1/DLSonWindows.md new file mode 100644 index 0000000..ad40479 --- /dev/null +++ b/selfhosting-v2.4.1/DLSonWindows.md @@ -0,0 +1,126 @@ +--- +layout: default-layout +title: Install Dynamsoft Dynamsoft License Server on Windows +keywords: Install, Dynamsoft License Server, Windows +description: Steps and information about how to install Dynamsoft Dynamsoft License Server on Windows +breadcrumbText: Install DLS on Windows +needAutoGenerateSidebar: true +--- + +# Install Dynamsoft License Server on Windows Server + +## Example Environment + +* CPU: Intel Core 2 Duo or AMD Athlon 64 X2 5600+ +* Memory: 2G +* OS: Windows Server 2016 +* Disk Space + * System: 30 GB + * Data: 20 GB + +## Installation + +### Run DLS as a service + +* Download the installer from [Dynamsoft-Licensing-Tracking-Server v2.4.1](https://tst.dynamsoft.com/public/download/dls/2.4.1/dynamsoft_dls-win_x64-v2.4.1.zip) and unzip it to a proper location. In our case, it's unzipped to **"E:\dynamsoft_dls-win_x64-v2.4.1"**. + +* Download [NSSM](https://nssm.cc/ci/nssm-2.24-101-g897c7ad.zip) and unzip, in our case, it's unzipped to **"E:\nssm-2.24"**. + +* Open cmd, navigate to the directory **"E:\nssm-2.24\win64"** and run the following command + +```cmd +nssm install dynamsoft-dls +``` + +* A GUI will open, fill the parameters for the application like this (change the values according to where you put the files, and change ports if ports are occupied) + + * **Path**: `E:\dynamsoft_dls-win_x64-v2.4.1\win\bin\dynamsoftdlsx.exe` + * **Startup directory**: `E:\dynamsoft_dls-win_x64-v2.4.1` + * **Arguments**: `".\win\jre\bin\dynamsoftdls" -Duser.language=en -Duser.region=CA -Djavax.net.ssl.trustStoreType=WINDOWS-ROOT --add-opens java.base/jdk.internal.loader=ALL-UNNAMED -jar ".\dls-2.4.1.jar" --server.port=48080 --data.port=30201` + +![nssm-001]({{site.assets}}imgs/nssm-001.png) + +* Switch to the last tab "Hooks" and choose "Application exit" as the Event and specify the parameter as + + * **Command**: `E:\dynamsoft_dls-win_x64-v2.4.1\shutdown.bat` + +![nssm-002]({{site.assets}}imgs/nssm-002.png) + +* Press the button "Install Service" and you should be able to find dynamsoft-dls as one of the services in the services GUI or in **Task Manager -> Service**. If it is not started, start it. + +> NOTE +> +> It usually takes a few seconds for the service to start. Sometimes it might take longer. + +### Test the service + +Once the server is running, you can test it via the URL [http://127.0.0.1:48080/page/index.html](http://127.0.0.1:48080/page/index.html). + +> If you changed the port during installation, you should use that port instead. + +Upon the first visit, you will be asked to set an admin password. A few things to note: + +> 1. The default password is empty; +> 2. The user name is admin and it can not be changed; +> 3. **Currently, there isn't a way to retrieve the password should it get lost. Therefore, please keep the password secure**. + +After that, you will land on the home page where you can find the UUID of this DLS . + +> This UUID is required when [activating your licenses]({{site.selfhosted}}index.html#activate-the-license). + +![DLS-HomePage-001]({{site.assets}}imgs/dls-homepage.png) + +If the above page shows up, then the server is installed correctly and is ready to process requests. In order to better integrate with your original service, and make the service more secure on the Internet, the next step is to configure the network environment - (set up a reverse proxy) - for it with the help of `IIS` . See [Configure Reverse Proxy Using IIS]({{site.selfhosted}}configurereverseproxyusingiis.html) on how to redirect requests sent to `https://www.yoursite.com/dls/*` to `https://127.0.0.1:48080/*`. + +> Notes +> +> 1. About `PsExec64.exe` +> +> `PsExec64.exe` is a powerful tool on windows, but it is also considered risky by antivirus software. +> +> Normally, DLS does not allow "start as administrator". However, in order to meet some specific needs, we allow "administrator" to create another user to start DLS, which requires the use of `PsExec64.exe`. +> +> When using `NSSM` as described in this article, the startup user is `Local System Account`, which means you can safely remove `win/bin/PsExec64.exe`. +> +> 2. "proxy" and "https" are only required if you use one of the following products: +> +> * SDKs for Javascript without a local service (like Dynamsoft BarcodeReader Javascript Edition). +> * SDKs for iOS (unless the user makes an exception for the application). ![dls iOS allow http]({{site.assets}}imgs/dls-iOS-allow-http.png) (Reference: https://stackoverflow.com/questions/31254725/transport-security-has-blocked-a-cleartext-http#answer-33712228) +> +> If "proxy" and "https" are not configured, please use `http://ip:port/` in the following steps. + +## Configuration + +With the above steps, DLS will be listening on requests sent to this URL "https://www.yoursite.com/dls/". You can set up another DLS on another machine as the standby server just in case the main server is temporarily unavailable due to network and other reasons. + +### Configure a Standby DLS + +For maximum up time, a standby DLS is necessary. Assume you have installed two copies of DLS, the following are the steps to configure them + +* Find the file `dls.json.sample` in the DLS directory, copy and rename it to `dls.json` + +* In the configuration, there are two settings: "serverMode" and "servers". We only need to change "servers". It accepts two values, the first specifies the main DLS URL and the second, the standby URL. + + * For the main DLS: `"servers": ["self", "https://standby.yoursite.com/dls/"]` + + * For the standby DLS: `"servers": ["https://www.yoursite.com/dls/", "self"]` + +> NOTE that you need to configure both the main DLS and the standby DLS separately. + +### Configure Server URLs + +In order for the license client to know where to find DLS, the server URLs need to be embedded in the license string. + +By default, when you first import a license and create a project, the license string for the project will already contain a server URL which is simply the host of the website. For example, if DLS is being visited like shown in the following image, then the license string will contain server URL as `http://127.0.0.1:48080/`. + +![dls-url-001]({{site.assets}}imgs/dls-url-config-001.png) + +Since the client devices may visit the DLS through a proxy, the automatically detected URL can be incorrect. We can click the button "Set Server URL" and correct it: + +![dls-url-002]({{site.assets}}imgs/dls-url-config-002.png) + +Input the actual server URLs and save: + +![dls-url-003]({{site.assets}}imgs/dls-url-config-003.png) + +Once saved, all license strings will be updated to contain the server URLs. diff --git a/selfhosting-v2.4.1/index.md b/selfhosting-v2.4.1/index.md new file mode 100644 index 0000000..2a32ca3 --- /dev/null +++ b/selfhosting-v2.4.1/index.md @@ -0,0 +1,78 @@ +--- +layout: default-layout +title: Self-hosted License Tracking +keywords: self-hosted, activation, import +description: This page is about how to use self-hosted license tracking. +breadcrumbText: Self-hosted DLS +needAutoGenerateSidebar: true +noTitleIndex: true +--- + +# Self-hosted DLS + +If your production environment does not allow internet connection, an alternative option is to host the license server program on your internal server machine so all your devices or end users can connect and get licensed via intranet connection. + +* [Set Up DLS](#set-up-dls) +* [Activate the License](#activate-the-license) +* [Import the License](#import-the-license) +* [Manage License Keys](#manage-license-keys) +* [Upgrade DLS](#upgrade-dls) + +## Set Up DLS + +The first step in using your own DLS is to install it. Please read one of the following guides + +* [Set up DLS on Windows]({{site.selfhosted}}dlsonwindows.html) +* [Set up DLS on Linux]({{site.selfhosted}}dlsonlinux.html) + +After the installation, you can proceed to the next step. + +## Activate the License + +In the [customer portal](https://www.dynamsoft.com/customer/license/fullLicense), activate a license you want to use in your own DLS and select "Connect to My Self-Hosted License Server". + +![Choose-Activation-Option-2]({{site.assets}}imgs/activate-004.png) + +You'll be asked to input the `UUID` of your DLS, the UUID is found on the home page of your DLS. + +![DLS-HomePage-001]({{site.assets}}imgs/dls-homepage.png) + +Once done, an activated License File will be generated and downloaded automatically, the next step is to [import the license](#import-the-license). + +> Read more on [what is License File]({{site.about}}terms.html#license-file) + +## Import the License + +This step imports the License File into DLS so that you can configure and use the purchased license(s). + +* Click "Items" to go to the **License Items** page +* Click "Select File" to open the License File you just downloaded + +![License Items - import]({{site.assets}}imgs/licenseitems-002.png) + +After that, you will be asked to either create a new project for this license or insert it to an existing project + +![License Items - import]({{site.assets}}imgs/licenseitems-003.png) + +If you clicked "New Project", you will be asked to provide a name for this project + +![License Items - import]({{site.assets}}imgs/licenseitems-004.png) + +Once imported, you can find the project listed on the **Projects** page where you can get the license key string to use in your applications. + +![License Items - import]({{site.assets}}imgs/licenseitems-005.png) + +## Manage License Keys + +To manage a license key is to configure the project bound to this license key. For more details, please see [Project Configurartion]({{site.common}}project.html). + +## Track the License + +For Self-Hosted DLS, all usage data is submitted to [DLS]({{site.about}}terms.html#dynamsoft-license-server) hosted by yourself. You can + +* [View the license usage statistics]({{site.common}}statistics.html) +* [Get notified about license status]({{site.common}}usagealerts.html) + +## Upgrade DLS + +Because a license gets bound to a copy of DLS as soon as it's activated, you must be cautious when upgrading DLS. Dynamsoft recommends that DLS should not be upgraded unless absolutely necessary. An important thing to keep in mind is that the license itself usually needs to be regenerated during a DLS upgrade, so always contact [Dynamsoft Support Team](mailto:support@dynamsoft.com) before you plan a DLS upgrade. diff --git a/selfhosting/DLSonLinux.md b/selfhosting/DLSonLinux.md index a053053..067df2d 100644 --- a/selfhosting/DLSonLinux.md +++ b/selfhosting/DLSonLinux.md @@ -38,18 +38,18 @@ mount -a ``` --> -### Download the Dynamsoft License Server v2.4.1 installer, or just copy it over to a proper location +### Download the Dynamsoft License Server v2.4.11 installer, or just copy it over to a proper location ``` shell cd /a-proper-location -wget https://tst.dynamsoft.com/public/download/dls/2.4.1/dynamsoft_dls-linux_x64-v2.4.1.tar.gz +wget https://tst.dynamsoft.com/public/download/dls/2.4.11/dynamsoft_dls-linux_x64-v2.4.11.tar.gz ``` ### Unzip and start the Dynamsoft License Server ``` shell # Unzip the installer -tar zxvf dynamsoft_dls-linux_x64-v2.4.1.tar.gz +tar zxvf dynamsoft_dls-linux_x64-v2.4.11.tar.gz # Set permissions chmod -R 755 ./dls-linux # Start the server diff --git a/selfhosting/DLSonWindows.md b/selfhosting/DLSonWindows.md index ad40479..de3beff 100644 --- a/selfhosting/DLSonWindows.md +++ b/selfhosting/DLSonWindows.md @@ -22,7 +22,7 @@ needAutoGenerateSidebar: true ### Run DLS as a service -* Download the installer from [Dynamsoft-Licensing-Tracking-Server v2.4.1](https://tst.dynamsoft.com/public/download/dls/2.4.1/dynamsoft_dls-win_x64-v2.4.1.zip) and unzip it to a proper location. In our case, it's unzipped to **"E:\dynamsoft_dls-win_x64-v2.4.1"**. +* Download the installer from [Dynamsoft-Licensing-Tracking-Server v2.4.11](https://tst.dynamsoft.com/public/download/dls/2.4.11/dynamsoft_dls-win_x64-v2.4.11.zip) and unzip it to a proper location. In our case, it's unzipped to **"E:\dynamsoft_dls-win_x64-v2.4.11"**. * Download [NSSM](https://nssm.cc/ci/nssm-2.24-101-g897c7ad.zip) and unzip, in our case, it's unzipped to **"E:\nssm-2.24"**. @@ -34,15 +34,15 @@ nssm install dynamsoft-dls * A GUI will open, fill the parameters for the application like this (change the values according to where you put the files, and change ports if ports are occupied) - * **Path**: `E:\dynamsoft_dls-win_x64-v2.4.1\win\bin\dynamsoftdlsx.exe` - * **Startup directory**: `E:\dynamsoft_dls-win_x64-v2.4.1` - * **Arguments**: `".\win\jre\bin\dynamsoftdls" -Duser.language=en -Duser.region=CA -Djavax.net.ssl.trustStoreType=WINDOWS-ROOT --add-opens java.base/jdk.internal.loader=ALL-UNNAMED -jar ".\dls-2.4.1.jar" --server.port=48080 --data.port=30201` + * **Path**: `E:\dynamsoft_dls-win_x64-v2.4.11\win\bin\dynamsoftdlsx.exe` + * **Startup directory**: `E:\dynamsoft_dls-win_x64-v2.4.11` + * **Arguments**: `".\win\jre\bin\dynamsoftdls" -Duser.language=en -Duser.region=CA -Djavax.net.ssl.trustStoreType=WINDOWS-ROOT --add-opens java.base/jdk.internal.loader=ALL-UNNAMED -jar ".\dls-2.4.11.jar" --server.port=48080 --data.port=30201` ![nssm-001]({{site.assets}}imgs/nssm-001.png) * Switch to the last tab "Hooks" and choose "Application exit" as the Event and specify the parameter as - * **Command**: `E:\dynamsoft_dls-win_x64-v2.4.1\shutdown.bat` + * **Command**: `E:\dynamsoft_dls-win_x64-v2.4.11\shutdown.bat` ![nssm-002]({{site.assets}}imgs/nssm-002.png) From 139645d89eff8bb97eca447b419423d29b095b25 Mon Sep 17 00:00:00 2001 From: Justin Date: Wed, 18 Sep 2024 18:08:52 +0800 Subject: [PATCH 2/2] remove redundant backup --- .../ConfigureReverseProxyUsingIIS.md | 66 --------- .../ConfigureReverseProxyUsingNginx.md | 138 ------------------ selfhosting-v2.4.1/index.md | 78 ---------- 3 files changed, 282 deletions(-) delete mode 100644 selfhosting-v2.4.1/ConfigureReverseProxyUsingIIS.md delete mode 100644 selfhosting-v2.4.1/ConfigureReverseProxyUsingNginx.md delete mode 100644 selfhosting-v2.4.1/index.md diff --git a/selfhosting-v2.4.1/ConfigureReverseProxyUsingIIS.md b/selfhosting-v2.4.1/ConfigureReverseProxyUsingIIS.md deleted file mode 100644 index b13fbd5..0000000 --- a/selfhosting-v2.4.1/ConfigureReverseProxyUsingIIS.md +++ /dev/null @@ -1,66 +0,0 @@ ---- -layout: default-layout -title: Configure Reverse Proxy Using IIS -keywords: Install, Dynamsoft License Server, Windows -description: Documentation of Steps to configure reverse proxy using IIS for Dynamsoft License Server. -breadcrumbText: Install DLS on Windows -needAutoGenerateSidebar: true ---- - -# Configure Reverse Proxy Using IIS - -The following is an example on how to set up a reverse proxy using `IIS` for DLS for your reference. You can do the configuration yourself as long as you can achieve the requirement which is to redirect requests sent to `https://www.yoursite.com/dls/*` to `http://127.0.0.1:48080/*`. - -## Install IIS - -Skip this step if you already have IIS installed. - -## Install IIS URL Rewrite - -Download and install IIS URL Rewrite from [here](https://www.iis.net/downloads/microsoft/url-rewrite). - -## Install Application Request Routing - -Download and install Microsoft Application Request Routing [here](https://www.microsoft.com/en-us/download/confirmation.aspx?id=47333). - -## Configure the proxy - -![DLS-on-Windows-023]({{site.assets}}imgs/dlsonwin-023.png) - -![DLS-on-Windows-024]({{site.assets}}imgs/dlsonwin-024.png) - -![DLS-on-Windows-025]({{site.assets}}imgs/dlsonwin-025.png) - -## Configure URL Rewrite rules - -![DLS-on-Windows-017]({{site.assets}}imgs/dlsonwin-017.png) - -![DLS-on-Windows-018]({{site.assets}}imgs/dlsonwin-018.png) - -![DLS-on-Windows-019]({{site.assets}}imgs/dlsonwin-019.png) - -Let's configure the following rule for the server - -``` text -Name:DLS-rewrite-rule -Pattern: ^dls/(.*)$ -Rewrite URL:http://localhost:48080/{R:1} -``` - -![DLS-on-Windows-020]({{site.assets}}imgs/dlsonwin-020.png) - -## Test that the configuration works - -Open `http://www.yoursite.com/dls/page/index.html` and if you see the following page then the configuration is complete. - -![DLS-on-Windows-026]({{site.assets}}imgs/dlsonwin-026.png) - -## Configure SSL - -Prepare a SSL certificate for your site (e.g. `https://www.yoursite.com`) and configure it properly. - -Refer to [how to set up ssl on iis](https://learn.microsoft.com/en-us/iis/manage/configuring-security/how-to-set-up-ssl-on-iis). - -After that, you should be able to access the server by `https://www.yoursite.com/dls/page/index.html#/`. - -> If you use a JavaScript-based SDK, such as Dynamic Web TWAIN WebAssembly Edition or Dynamsoft Barcode Reader JavaScript Edition, you must configure the self-hosted DLS to run over a secure connection (HTTPS). diff --git a/selfhosting-v2.4.1/ConfigureReverseProxyUsingNginx.md b/selfhosting-v2.4.1/ConfigureReverseProxyUsingNginx.md deleted file mode 100644 index 5e45472..0000000 --- a/selfhosting-v2.4.1/ConfigureReverseProxyUsingNginx.md +++ /dev/null @@ -1,138 +0,0 @@ ---- -layout: default-layout -title: Configure HTTPS on Linux -keywords: Install, Dynamsoft License Server, Linux, HTTPS -description: Steps and information about how to configure HTTPS on Linux -breadcrumbText: Configure HTTPS on Linux -needAutoGenerateSidebar: true ---- - -# Configure Reverse Proxy Using Nginx - -The following is an example on how to set up a reverse proxy using `nginx` for DLS for your reference. You can do the configuration yourself as long as you can achieve the requirement which is to redirect requests sent to `https://www.yoursite.com/dls/*` to `http://127.0.0.1:48080/*`. - -## Install nginx - -### On CentOs - -* Install - -``` shell -rpm -ivh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm -yum install nginx -``` - -* Start - -``` shell -systemctl start nginx.server -``` - -* Configure the web server to start with the OS - -``` shell -systemctl enable nginx.server -``` - -### On Ubuntu - -``` shell -sudo apt install nginx-full -sudo systemctl start nginx -sudo systemctl enable nginx -``` - -## Test nginx - -Open "http://localhost" in a browser. If `nginx` was installed and started successfully, you should see a message like - -``` text -······ Welcome to nginx! ······ -``` - -## Configure nginx - -### Open the configuration file - -The file could either be `/etc/nginx/conf.d/default.conf` or `/etc/nginx/sites-enabled/default` . - - - -### Add reverse proxy - -``` shell -location /dls/ { - proxy_pass http://127.0.0.1:48080/; -} -``` - -### Restart the server - -``` shell -sudo systemctl restart nginx -``` - -At this point, you can access the server with the URL `http://localhost/dls/page/index.html#/` or `http:///dls/page/index.html#/`. - - - -## Configure SSL - -For security, we should access DLS via HTTPS. - -### Self-signed Certificate - -For demoing and testing purposes, we can try the self-signed certificate when configuring `nginx` by uncommenting the 3 lines as shown below. - -``` shell -server { -... -# SSL configuration -# -listen 443 ssl default_server; -listen [::]:443 ssl default_server; -# -# Note: You should disable gzip for SSL traffic. -# See: https://bugs.debian.org/773332 -# -# Read up on ssl_ciphers to ensure a secure configuration. -# See: https://bugs.debian.org/765782 -# -# Self signed certs generated by the ssl-cert package -# Don't use them in a production server! -# -include snippets/snakeoil.conf; -... -} -``` - -If your system doesn't have the self-signed certificate. You can install it like this - -``` shell -sudo apt-get install ssl-cert -sudo make-ssl-cert generage-default-snakeoil -``` - -Your client needs to be configured to trust that self-signed certificate. For example, if you are running a web application, you can open the page `https:///dls/page/index.html#/` in the browser and do the following - -* Page shows warning about the self-signed certificate -* Click `Advanced` -* Click `Proceed to xxxx (unsafe)`. - -Then this self-signed certificate will be trusted temporarily for some time. - -> NOTE that you should avoid using self-signed certificates in your production server. - -### Trusted Certificate - -You can get a trusted certificate from many suppliers. - -e.g. You can get a free one from [certbot](https://certbot.eff.org/). - -> If you use a JavaScript-based SDK, such as Dynamic Web TWAIN WebAssembly Edition or Dynamsoft Barcode Reader JavaScript Edition, you must configure the self-hosted DLS to run over a secure connection (HTTPS). diff --git a/selfhosting-v2.4.1/index.md b/selfhosting-v2.4.1/index.md deleted file mode 100644 index 2a32ca3..0000000 --- a/selfhosting-v2.4.1/index.md +++ /dev/null @@ -1,78 +0,0 @@ ---- -layout: default-layout -title: Self-hosted License Tracking -keywords: self-hosted, activation, import -description: This page is about how to use self-hosted license tracking. -breadcrumbText: Self-hosted DLS -needAutoGenerateSidebar: true -noTitleIndex: true ---- - -# Self-hosted DLS - -If your production environment does not allow internet connection, an alternative option is to host the license server program on your internal server machine so all your devices or end users can connect and get licensed via intranet connection. - -* [Set Up DLS](#set-up-dls) -* [Activate the License](#activate-the-license) -* [Import the License](#import-the-license) -* [Manage License Keys](#manage-license-keys) -* [Upgrade DLS](#upgrade-dls) - -## Set Up DLS - -The first step in using your own DLS is to install it. Please read one of the following guides - -* [Set up DLS on Windows]({{site.selfhosted}}dlsonwindows.html) -* [Set up DLS on Linux]({{site.selfhosted}}dlsonlinux.html) - -After the installation, you can proceed to the next step. - -## Activate the License - -In the [customer portal](https://www.dynamsoft.com/customer/license/fullLicense), activate a license you want to use in your own DLS and select "Connect to My Self-Hosted License Server". - -![Choose-Activation-Option-2]({{site.assets}}imgs/activate-004.png) - -You'll be asked to input the `UUID` of your DLS, the UUID is found on the home page of your DLS. - -![DLS-HomePage-001]({{site.assets}}imgs/dls-homepage.png) - -Once done, an activated License File will be generated and downloaded automatically, the next step is to [import the license](#import-the-license). - -> Read more on [what is License File]({{site.about}}terms.html#license-file) - -## Import the License - -This step imports the License File into DLS so that you can configure and use the purchased license(s). - -* Click "Items" to go to the **License Items** page -* Click "Select File" to open the License File you just downloaded - -![License Items - import]({{site.assets}}imgs/licenseitems-002.png) - -After that, you will be asked to either create a new project for this license or insert it to an existing project - -![License Items - import]({{site.assets}}imgs/licenseitems-003.png) - -If you clicked "New Project", you will be asked to provide a name for this project - -![License Items - import]({{site.assets}}imgs/licenseitems-004.png) - -Once imported, you can find the project listed on the **Projects** page where you can get the license key string to use in your applications. - -![License Items - import]({{site.assets}}imgs/licenseitems-005.png) - -## Manage License Keys - -To manage a license key is to configure the project bound to this license key. For more details, please see [Project Configurartion]({{site.common}}project.html). - -## Track the License - -For Self-Hosted DLS, all usage data is submitted to [DLS]({{site.about}}terms.html#dynamsoft-license-server) hosted by yourself. You can - -* [View the license usage statistics]({{site.common}}statistics.html) -* [Get notified about license status]({{site.common}}usagealerts.html) - -## Upgrade DLS - -Because a license gets bound to a copy of DLS as soon as it's activated, you must be cautious when upgrading DLS. Dynamsoft recommends that DLS should not be upgraded unless absolutely necessary. An important thing to keep in mind is that the license itself usually needs to be regenerated during a DLS upgrade, so always contact [Dynamsoft Support Team](mailto:support@dynamsoft.com) before you plan a DLS upgrade.