This section is a step-by-step manual installation guide for the Navixy On-premise solution.
This guide primarily deals with Ubuntu 20 operating system - this is the OS recommended by us.
If you wish to install on any other OS, this guide can be adapted as the basic principles are the same.
The installation can be done entirely from root.
Install pre-requisites
Download and install the pre-requisites. The essentials are:
- MySQL 8.0 - only Server is required, other components are optional;
- Java SE Development Kit of the required version (17 for now);
- Nginx - any recent version;
- runit and runit-systemd.
For your convenience, you can execute the following:
sudo add-apt-repository ppa:linuxuprising/java
apt-get update
apt-get -y install openjdk-17-jdk curl nginx mysql-server runit runit-systemd mc
MySQL will ask for a new root password, you can leave it empty or set any password you wish, but be sure to remember it.
Also, Java might ask you to accept usage policy, answer "Yes".
Create user
First of all, you need to create java user for further operations with Navixy platform servises.
useradd -s /bin/bash -m java
Upload and unpack the platform package
You should have received a distribution package from Navixy, typically in a .tar.gz file.
Extract the package.
tar -zxvf $PACKAGENAME
It will be extracted to "navixy-package" directory, containing all the other platform files in it.
Hereinafter this will be the main directory of the distribution. You can see in this manual paths like "...navixy-package/db", which means that operations must be performed from it.
MySQL tuning
First, upload MySQL timezones (replace $PASSWORD with your MySQL root password):
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -uroot -p$ROOT_PWD mysql
Change or add the following parameters under [mysqld] section.
On database level, Navixy always works with data in UTC timezone, so it is needed to make this a default timezone for MySQL:
default-time-zone = '+00:00'
Set sql-mode to the following:
sql-mode="NO_ENGINE_SUBSTITUTION"
You need to tune MySQL according to your hardware specifications for the most efficient usage. If your server will be used only for Navixy platform, set the following paremeter to 70% of total RAM. For example, if you have 32 Gb RAM, set is as follows:
innodb_buffer_pool_size=22G
Restart MySQL service to apply changes.
Preparing databases
Next, you need to prepare the databases.
Log into MySQL from with root login, and execute the following. Substitute $PASSWORD variable with a new password (specific or random) for user "Navixy", remember it, you will need it later.
CREATE USER [email protected]'%' IDENTIFIED BY '$PWD' WITH MAX_QUERIES_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_USER_CONNECTIONS 0;
CREATE DATABASE google CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE DATABASE tracking CHARACTER SET utf8 COLLATE utf8_general_ci;
GRANT USAGE ON *.* to [email protected]'%';
GRANT ALL PRIVILEGES ON google.* TO [email protected]'%';
GRANT ALL PRIVILEGES ON tracking.* TO [email protected]'%';
Exit MySQL.
Switch to ...navixy-package/db directory.
Execute the following (of course change $ROOTPASSWORD to the password of your MySQL root user) to fill DB google with default tables:
mysql -uroot -p$ROOTPASSWORD google < google.sql
Delete updates.sql file (not needed here, only used for server updates) and google.sql (already used above)
rm updates.sql
rm google.sql
Check that these files are deleted and upload all the other dictionaries from DB folder to database:
cat *.sql | mysql -uroot -p$ROOTPASSWORD google
Execute the following to switch on web branding:
INSERT INTO google.features_to_dealers (dealer_id, feature_code) values (1,1);
Add the following line to the database so that you can transfer files through the mobile app to your server. Of course change api.domain.com to your domain for API, do not forget to change https to http if you do not use SSL.
INSERT INTO google.file_storages (id, engine, config) values (1, 'local_fs', '{"base_path":"./files/","base_upload_url":"https://api.domain.com/file/upload","base_download_url":"https://api.domain.com/file/dl","secret":"ervg4ver","upload_credentials_ttl":"10m","is_dynamic_preview_enabled": true,"dynamic_preview_pattern":"(.+)/file/dl/(.+)","dynamic_preview_replace":"$1/file/preview/$2","security_module":{"type":"hashid","salt":"vd8sgh8w3t4w","ttl":"7d","min_length":8}}');
Finally, apply the license key (fingerprint), which should be provided by Navixy. It will be just a string of symbols.
Insert fingerprint into the database (change $FINGERPRINT to the received value):
UPDATE google.variables SET value='$FINGERPRINT' WHERE var='fingerprint';
Configuring the platform: frontend
Copy these directories
- .../navixy-package/pro-ui
- .../navixy-package/panel-v2
to /var/www
Pro-UI
Find the file Config.example.js in /var/www/pro-ui.
Edit the following line. Change api.domain.com to your actual API domain.
apiRoot: '//api.domain.com',
If you do not have a separate domain for API and use one domain for all the platform, you need to add /api to this line, so the value should look like this:
apiRoot: '//domain.com/api',
Find the file app_config.example.sa.js in /var/www/pro-ui/static.
Again, specify your API domain in the line (of course, pay attention to http/https):
apiUrl: 'https://api.domain.com/api/',
Save edited file as app_config.js
Create symlink for /var/www/pro-ui/static/assets/images/dashboard to /var/www/pro-ui/
ln -s /var/www/pro-ui/static/assets/images/dashboard /var/www/pro-ui/
Panel-v2
Find the file PConfig.example.sa.js in /var/www/panel-v2 and edit the following.
Switch api.domain.com to your actual API domain. Warning: do not delete '/panel', just edit the domain name. Pay attention to http/https.
apiRoot: 'http://api.domain.com/panel',
Change saas.navixy.com to your UI domain (without http/https):
paasCompanyUrl: 'saas.navixy.com',
Change api.domain.com to your actual API domain:
terminalHost: 'ws://api.domain.com:8383/',
Setting up Nginx web service configuration
Open the directory ...navixy-package/templates.
1. Copy the file image-preview-cache.conf to /etc/nginx/conf.d
2. Copy the files map.conf and local-image-preview.conf to /etc/nginx/sites-available.
3. Create a file named navixy.conf in /etc/nginx/sites-available. Fill it with the required Nginx configuration from this page:
Choose configuration based on HTTP/HTTPS and a number of domains to be used.
Note that if you use SSL, the certificate must be valid
It should match the private key, otherwise Nginx will fail to start.
Also, the certificate must be full-chain, which means it must contain in one file the main certificate, intermediate certificate (or several) and the root certificate, as shown in the example below.
-----BEGIN CERTIFICATE-----
*contents of main cert*
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
*contents of intermediate cert*
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
*contents of root cert*
-----END CERTIFICATE-----
Check the file /etc/nginx/nginx.conf (http block) for the following lines. Add them, if not present:
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
Make symlinks for all files from sites-available directory to sites-enabled:
ln -s /etc/nginx/sites-available/local-image-preview.conf /etc/nginx/sites-enabled
ln -s /etc/nginx/sites-available/map.conf /etc/nginx/sites-enabled
ln -s /etc/nginx/sites-available/navixy.conf /etc/nginx/sites-enabled
Remove default.conf from /sites-available and /sites-enabled (this is a default Nginx config file, you do not need it).
Restart Nginx with the following command. It will test config and will warn you if any errors are found:
nginx -t && nginx -s reload
Configuring the platform: backend
Copy the following folders from ...navixy-package to /home/java:
- api-server
- sms-server
- tcp-server
Inside each of them is a subdirectory named conf, and you will find a file db.properties in it.
This is the file for configuring the platform to connect to the database.
You need to change the database connection credentials for each of the services.
To do this, edit the following lines ($PASSWORD is apassword for user navixy you created before)
db.username=navixy
db.password=$PASSWORD
If your database is hosted on another server, you also need to change the db.connectionString line in the same files. Specify the actual address of your database server instead of localhost, but do not change anything else in this string.
API-server
Switch to /home/java/api-server/conf and edit a file named config.properties.
Specify full link to your API domain (with http:// or https:// in the beginning) in the following string:
api.externalBaseUrl=
Specify the email settings that will be used for feedback/help section:
[email protected]
[email protected]
feedback.substituteFromEmail=false
feedback.toEmail - should contain the target address to which help emails will be sent.
feedback.defaultFromEmail - default sender of help emails (e.g. [email protected])
feedback.substituteFromEmail - toggles between sending a help email from the default sender (false) or from the user's own address (true).
TCP-server
Switch to /home/java/tcp-server/conf and again edit a file named config.properties.
Specify IP and domain name that are used for UI. These settings will be used for auto-activation commands for trackers.
externalIP=127.0.0.1
externalHostname=myhost.ru
Add the following string to the end of config for file storage operations:
api.command.baseUrl=http://127.0.0.1:8084/internal/command/
SMS-server
This service is responsible for sending and receiving the messages. It uses the default settings and requires no further configuration.
Change directories owner
Give rights to the directories to java user.
cd /home/java
chown -R java:java api-server sms-server tcp-server
Adding Linux services for the platform.
Copy all files from .../navixy-package/runit to /etc/sv
Then make symlinks fir files in /etc/sv to /etc/service.
(Symlink for tcp-server should be named navixyserver)
ln -s /etc/sv/api-server /etc/service/api-server
ln -s /etc/sv/sms-server /etc/service/sms-server
ln -s /etc/sv/tcp-server /etc/service/navixyserver
Give rights to folders to java user:
cd /etc/sv
chown -R root:root api-server sms-server tcp-server
Restart services:
sv restart api-server
sv restart sms-server
sv restart navixyserver
Copy restart-navixy script from .../navixy-package/scripts to usr/bin.
Change owner:
chmod 755 /usr/bin/restart-navixy
Final steps
Once everything is installed and launched, check availability of your Admin panel domain. It should direct you to admin login page.
The credentials are default, so consider changing your password as soon as you log into the system.
- username: admin
- password: admin
If something goes wrong, check Troubleshooting pages.
User interface is not available at this stage, because its domain should first be specified in Admin panel, "Service Preferences" tab.