Skip to content
Snippets Groups Projects
Commit 99bb76ee authored by Larbi Gharib's avatar Larbi Gharib
Browse files

Windows server tutorial

Change-Id: Ic360f5a00de0912733af958a1f8246faabc02aad
parent e860ddd5
No related branches found
No related tags found
No related merge requests found
Showing
with 212 additions and 10 deletions
...@@ -66,3 +66,189 @@ WantedBy=multi-user.target ...@@ -66,3 +66,189 @@ WantedBy=multi-user.target
</b></pre> </b></pre>
The parameters PORT, SSL_CERTIFICATE and SSL_CERTIFICATE_KEY are optional (however, PORT can be used alone whereas the SSL_CERTIFICATE comes in pair with SSL_CERTIFICATE_KEY) The parameters PORT, SSL_CERTIFICATE and SSL_CERTIFICATE_KEY are optional (however, PORT can be used alone whereas the SSL_CERTIFICATE comes in pair with SSL_CERTIFICATE_KEY)
## Running JAMS as Windows Service
# Download and install JAMS
Visit https://jami.net/services/ and downalod JAMS.
Extract JAMS to c:\jams
# Download and install JDK 11
Download JDK 11 from https://www.oracle.com/java/technologies/javase-jdk11-downloads.html (choose the conresponding architecture of your VM)
Install it using the install wizard.
# Download openssl to generate a key and a certificate
Download OpenSSL from https://kb.firedaemon.com/support/solutions/articles/4000121705 (or choose another source https://wiki.openssl.org/index.php/Binaries)
Once downloaded extract it to c:\openssl then create a folder bin inside c:\openssl\bin
Create a new file inside bin named openssl.cnf (make sure that the file extension is .cnd and not .cnd.txt) and copy past the following default configuration http://www.flatmtn.com/article/setting-openssl-create-certificates.html
#
# OpenSSL configuration file.
#
# Establish working directory.
dir = .
[ ca ]
default_ca = CA_default
[ CA_default ]
serial = $dir/serial
database = $dir/certindex.txt
new_certs_dir = $dir/certs
certificate = $dir/cacert.pem
private_key = $dir/private/cakey.pem
default_days = 365
default_md = md5
preserve = no
email_in_dn = no
nameopt = default_ca
certopt = default_ca
policy = policy_match
[ policy_match ]
countryName = match
stateOrProvinceName = match
organizationName = match
organizationalUnitName = optional
commonName = supplied
emailAddress = optional
[ req ]
default_bits = 1024 # Size of keys
default_keyfile = key.pem # name of generated keys
default_md = md5 # message digest algorithm
string_mask = nombstr # permitted characters
distinguished_name = req_distinguished_name
req_extensions = v3_req
[ req_distinguished_name ]
# Variable name Prompt string
#------------------------- ----------------------------------
0.organizationName = Organization Name (company)
organizationalUnitName = Organizational Unit Name (department, division)
emailAddress = Email Address
emailAddress_max = 40
localityName = Locality Name (city, district)
stateOrProvinceName = State or Province Name (full name)
countryName = Country Name (2 letter code)
countryName_min = 2
countryName_max = 2
commonName = Common Name (hostname, IP, or your name)
commonName_max = 64
# Default values for the above, for consistency and less typing.
# Variable name Value
#------------------------ ------------------------------
0.organizationName_default = My Company
localityName_default = My Town
stateOrProvinceName_default = State or Providence
countryName_default = US
[ v3_ca ]
basicConstraints = CA:TRUE
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid:always,issuer:always
[ v3_req ]
basicConstraints = CA:FALSE
subjectKeyIdentifier = hash
# Add OpenSSL to Sytem Environment variables
Go to Edit the system environment variables -> Environment Variables, then in System variables edit Path and add c:\openssl\
# Configure OpenSSL
Execute the following command to set the path to OpenSSL configuration.
set OPENSSL_CONF=c:\openssl\bin\openssl.cnf
Open the command prompt and cd c:\jams ans generate the Key and Certificate:
openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout server.key -out server.pem
Follow the wizard.
Once the key and certificate are generated execute the dir command you should see an output like this:
c:\jams>dir
Volume in drive C has no label.
Volume Serial Number is BC94-9EF2
Directory of c:\jams
2020-11-10 12:38 PM <DIR> .
2020-11-10 12:38 PM <DIR> ..
2020-10-22 10:56 AM 5,186,016 jams-launcher.jar
2020-10-22 10:56 AM 33,413,882 jams-server.jar
2020-11-10 11:53 AM <DIR> libs
2020-11-10 12:34 PM 1,732 server.key
2020-11-10 12:38 PM 1,336 server.pem
2020-10-22 04:05 PM 2,047,932 userguide.pdf
5 File(s) 40,650,898 bytes
3 Dir(s) 93,365,936,128 bytes free
Now execute the following command tot start JAMS
java -jar jams-launcher.jar PORT_NUMBER (eg. 8443 or 443) server.pem server.key
Open a navigator on the server and visite https://localhost:443 or https://localhost:8443 to validate that it's working.
Click CTRL + C to close the application
# Expose your localhost to the internet
Click on Windows ans search for Windows Defender Firewall with Advanced Security.
Right click on Inbound Rules and click on New Rule...
Select Port click next and specify the port you want to use example 443 or 8443.
Click next and select Allow the connection and click next.
Leave all of Domain Private and Public select and click next.
Name you Rule JAMS Inbound and click Finish
Now right click on Outbound Rules and click on New Rule...
Select Port click next and specify the port you want to use example 443 or 8443.
Click next and select Allow the connection and click next.
Leave all of Domain Private and Public select and click next.
Name you Rule JAMS Outbound and click Finish.
You are all set. You can now visit you application trought the server domain name or ip address on port 443 or 8443.
# Create a JAMS Windows Service (Embed Tomcat Server Windows Service) to start JAMS with the server
In order to create a JAMS Windows Service you can use the tool NSSM provided on http://nssm.cc/download (https://github.com/kirillkovalenko/nssm)
Once downloaded open a command prompt and change directory to nssm-2.24\win64 then execute:
nssm.exe install JAMS
A GUI interface will open.
In the Path field specify the path to the Java executable example "C:\Program Files\Common Files\Oracle\Java\javapath\java.exe".
In the Startup directory put the "C:\jams" installation folder path.
In the last field Arguments add the following arguments:
-classpath "c:\jams" -jar jams-launcher.jar PORT_NUMBER server.pem server.key
where PORT_NUMBER is the port number you want to use to serve the application example 443 or 8443
Now your JAMS application will start with the server.
Source: https://medium.com/@lk.snatch/jar-file-as-windows-service-bonus-jar-to-exe-1b7b179053e4
...@@ -10,6 +10,22 @@ For the purposes of this tutorial, we assume that ...@@ -10,6 +10,22 @@ For the purposes of this tutorial, we assume that
2. The server is publicly accessible to the outside world 2. The server is publicly accessible to the outside world
2. You have a valid username/password pair to connect to the server 2. You have a valid username/password pair to connect to the server
## Connect from a Linux device
Open Jami, go to the login page. Click on "Advanced":
<p align="center">
<img src="./img/client/linux/linux-step1.png" alt="Step 1" style="height:1024;width:768"/>
</p>
Select the option **"Connect to a JAMS server"** which will lead you to the following screen:
<p align="center">
<img src="./img/client/linux/linux-step2.png" alt="Step 2" style="height:1024;width:768"/>
</p>
The **Jami Account Management Server URL** in this case would be the DNS address of your server and the username and password which correspond to your account. If you have configured the server with an LDAP/AD backend, it would be your LDAP/AD username and password.
## Connect from a Windows device ## Connect from a Windows device
Open Jami, go to the login page. Click on "Advanced": Open Jami, go to the login page. Click on "Advanced":
......
...@@ -207,7 +207,7 @@ recommend users to place it behind Nginx or a similar web server which proxies r ...@@ -207,7 +207,7 @@ recommend users to place it behind Nginx or a similar web server which proxies r
The following is an example map of how you could configure JAMS behind Nginx (the process would be similar if you wanted to use any other type of proxying solution): The following is an example map of how you could configure JAMS behind Nginx (the process would be similar if you wanted to use any other type of proxying solution):
<p align="center"> <p align="center">
<img src="./img/map.png" alt="Create an admin account" style="height:250px;width:600px"/> <img src="img/map.png" alt="Create an admin account" style="height:250px;width:600px"/>
</p> </p>
The IP 10.10.0.1 is random, and should be seen as an example. The IP 10.10.0.1 is random, and should be seen as an example.
...@@ -272,13 +272,13 @@ For the purposes of this tutorial, we assume that ...@@ -272,13 +272,13 @@ For the purposes of this tutorial, we assume that
Open Jami, go to the login page. Click on "Advanced": Open Jami, go to the login page. Click on "Advanced":
<p align="center"> <p align="center">
<img src="./img/client/windows/windows-step1.png" alt="Step 1" style="height:400px;width:700px"/> <img src="img/client/windows/windows-step1.png" alt="Step 1" style="height:400px;width:700px"/>
</p> </p>
Select the option **"Connect to a JAMS server"** which will lead you to the following screen: Select the option **"Connect to a JAMS server"** which will lead you to the following screen:
<p align="center"> <p align="center">
<img src="./img/client/windows/windows-step2.png" alt="Step 2" style="height:400px;width:700px"/> <img src="img/client/windows/windows-step2.png" alt="Step 2" style="height:400px;width:700px"/>
</p> </p>
The ```Jami Account Management Server URL``` in this case would be the DNS address of your server and the username and password which correspond to your account. If you have configured the server with an LDAP/AD backend, it would be your LDAP/AD username and password. The ```Jami Account Management Server URL``` in this case would be the DNS address of your server and the username and password which correspond to your account. If you have configured the server with an LDAP/AD backend, it would be your LDAP/AD username and password.
...@@ -288,13 +288,13 @@ The ```Jami Account Management Server URL``` in this case would be the DNS addre ...@@ -288,13 +288,13 @@ The ```Jami Account Management Server URL``` in this case would be the DNS addre
Open Jami, go to the login page. Click on "Advanced": Open Jami, go to the login page. Click on "Advanced":
<p align="center"> <p align="center">
<img src="./img/client/macos/macos-step1.png" alt="Step 1" style="height:400px;width:444px"/> <img src="img/client/macos/macos-step1.png" alt="Step 1" style="height:400px;width:444px"/>
</p> </p>
Select the option **"Connect to account manager"** which will lead you to the following screen: Select the option **"Connect to account manager"** which will lead you to the following screen:
<p align="center"> <p align="center">
<img src="./img/client/macos/macos-step2.png" alt="Step 2" style="height:400px;width:700px"/> <img src="img/client/macos/macos-step2.png" alt="Step 2" style="height:400px;width:700px"/>
</p> </p>
The ```Jami Account Management Server URL``` in this case would be the DNS address of your server and the username and password which correspond to your account. If you have configured the server with an LDAP/AD backend, it would be your LDAP/AD username and password. The ```Jami Account Management Server URL``` in this case would be the DNS address of your server and the username and password which correspond to your account. If you have configured the server with an LDAP/AD backend, it would be your LDAP/AD username and password.
...@@ -304,13 +304,13 @@ The ```Jami Account Management Server URL``` in this case would be the DNS addre ...@@ -304,13 +304,13 @@ The ```Jami Account Management Server URL``` in this case would be the DNS addre
Open Jami, go to the login page. Open Jami, go to the login page.
<p align="center"> <p align="center">
<img src="./img/client/android/android-step1.png" alt="Step 1" style="height:400px;width:200px"/> <img src="img/client/android/android-step1.png" alt="Step 1" style="height:400px;width:200px"/>
</p> </p>
Select the option **"Connect to management server"** which will lead you to the following screen: Select the option **"Connect to management server"** which will lead you to the following screen:
<p align="center"> <p align="center">
<img src="./img/client/android/android-step2.png" alt="Step 2" style="height:400px;width:200px"/> <img src="img/client/android/android-step2.png" alt="Step 2" style="height:400px;width:200px"/>
</p> </p>
The server in this case would be the DNS address of your server and the username and password which correspond to your account. If you have configured the server with an LDAP/AD backend, it would be your LDAP/AD username and password. The server in this case would be the DNS address of your server and the username and password which correspond to your account. If you have configured the server with an LDAP/AD backend, it would be your LDAP/AD username and password.
...@@ -320,13 +320,13 @@ The server in this case would be the DNS address of your server and the username ...@@ -320,13 +320,13 @@ The server in this case would be the DNS address of your server and the username
Open Jami, go to the login page. Open Jami, go to the login page.
<p align="center"> <p align="center">
<img src="./img/client/ios/ios-step1.png" alt="Step 1" style="height:400px;width:200px"/> <img src="img/client/ios/ios-step1.png" alt="Step 1" style="height:400px;width:200px"/>
</p> </p>
Select the option **"Connect to account manager"** which will lead you to the following screen: Select the option **"Connect to account manager"** which will lead you to the following screen:
<p align="center"> <p align="center">
<img src="./img/client/ios/ios-step2.png" alt="Step 2" style="height:400px;width:200px"/> <img src="img/client/ios/ios-step2.png" alt="Step 2" style="height:400px;width:200px"/>
</p> </p>
The server in this case would be the DNS address of your server and the username and password which correspond to your account. If you have configured the server with an LDAP/AD backend, it would be your LDAP/AD username and password. The server in this case would be the DNS address of your server and the username and password which correspond to your account. If you have configured the server with an LDAP/AD backend, it would be your LDAP/AD username and password.
......
userguide/docs/img/ad.png

44.7 KiB | W: | H:

userguide/docs/img/ad.png

54.8 KiB | W: | H:

userguide/docs/img/ad.png
userguide/docs/img/ad.png
userguide/docs/img/ad.png
userguide/docs/img/ad.png
  • 2-up
  • Swipe
  • Onion skin
userguide/docs/img/client/linux/linux-step1.png

45.1 KiB

userguide/docs/img/client/linux/linux-step2.png

30 KiB

userguide/docs/img/client/windows/windows-step1.png

46.2 KiB | W: | H:

userguide/docs/img/client/windows/windows-step1.png

52.6 KiB | W: | H:

userguide/docs/img/client/windows/windows-step1.png
userguide/docs/img/client/windows/windows-step1.png
userguide/docs/img/client/windows/windows-step1.png
userguide/docs/img/client/windows/windows-step1.png
  • 2-up
  • Swipe
  • Onion skin
userguide/docs/img/client/windows/windows-step2.png

25.4 KiB | W: | H:

userguide/docs/img/client/windows/windows-step2.png

25.4 KiB | W: | H:

userguide/docs/img/client/windows/windows-step2.png
userguide/docs/img/client/windows/windows-step2.png
userguide/docs/img/client/windows/windows-step2.png
userguide/docs/img/client/windows/windows-step2.png
  • 2-up
  • Swipe
  • Onion skin
userguide/docs/img/jams-dashboard.png

190 KiB | W: | H:

userguide/docs/img/jams-dashboard.png

412 KiB | W: | H:

userguide/docs/img/jams-dashboard.png
userguide/docs/img/jams-dashboard.png
userguide/docs/img/jams-dashboard.png
userguide/docs/img/jams-dashboard.png
  • 2-up
  • Swipe
  • Onion skin
userguide/docs/img/ldap.png

48.1 KiB | W: | H:

userguide/docs/img/ldap.png

57.6 KiB | W: | H:

userguide/docs/img/ldap.png
userguide/docs/img/ldap.png
userguide/docs/img/ldap.png
userguide/docs/img/ldap.png
  • 2-up
  • Swipe
  • Onion skin
userguide/docs/img/local.png

37 KiB | W: | H:

userguide/docs/img/local.png

45.9 KiB | W: | H:

userguide/docs/img/local.png
userguide/docs/img/local.png
userguide/docs/img/local.png
userguide/docs/img/local.png
  • 2-up
  • Swipe
  • Onion skin
userguide/docs/img/step1.png

45.2 KiB | W: | H:

userguide/docs/img/step1.png

41.2 KiB | W: | H:

userguide/docs/img/step1.png
userguide/docs/img/step1.png
userguide/docs/img/step1.png
userguide/docs/img/step1.png
  • 2-up
  • Swipe
  • Onion skin
userguide/docs/img/step2-1.png

46.4 KiB | W: | H:

userguide/docs/img/step2-1.png

56.1 KiB | W: | H:

userguide/docs/img/step2-1.png
userguide/docs/img/step2-1.png
userguide/docs/img/step2-1.png
userguide/docs/img/step2-1.png
  • 2-up
  • Swipe
  • Onion skin
userguide/docs/img/step2-2.png

42.5 KiB | W: | H:

userguide/docs/img/step2-2.png

52.6 KiB | W: | H:

userguide/docs/img/step2-2.png
userguide/docs/img/step2-2.png
userguide/docs/img/step2-2.png
userguide/docs/img/step2-2.png
  • 2-up
  • Swipe
  • Onion skin
userguide/docs/img/step2.png

643 KiB

userguide/docs/img/step3.png

626 KiB

userguide/docs/img/step4.png

52 KiB | W: | H:

userguide/docs/img/step4.png

63.3 KiB | W: | H:

userguide/docs/img/step4.png
userguide/docs/img/step4.png
userguide/docs/img/step4.png
userguide/docs/img/step4.png
  • 2-up
  • Swipe
  • Onion skin
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment