Advanced Configurations

You may need to do further configurations to completelly install the backoffice system.

Here are some of the configuration you may need to do if one of this cases presents during installation

After downloading the source code, configure the database connection in the file  ./config / env / db.connection.js  replacing the words in italic with the settings of your schema
name: process.env.DB_NAME || ” insert database name ”
host: process.env.DB_HOST || ” insert database host “,
port: process.env.DB_PORT || , 3306,
username: process.env.DB_USERNAME || ” insert username created in your schema “,
password: process.env.DB_PASSWORD || ” insert pasword created in your schema ”
dialect: process.env.DB_DIALECT || ‘ insert value mysql ‘

Automaticlly webserver will start running in Port Service 80 . You may have other services running in this host por so you will have to change the host port for Magoware webserver.

Change port number in the following path    ./config /env/default.js
Configure port number : port: process.env.PORT ||  change port number from 80 in the  port number you are using

  1. Make sure sure you have acquired the SSL Certificate , and copy in the following directory
    ./ config / sslcertificate/
  2. Rename certificate file as described below :
    privateKey: key.txt’,
    certificate: certificate.txt’,
  3. Change in production mode
  4. Run the server using : sudo node server.js and will automatically switch to https

After downloading the source code, configure in the following path

  1. In case of using http change the following value in file  ./server.js

process.env.NODE_ENV = ‘development /  production ‘;

  1. In case of using https change the following value in file ./serverhttps.js

//process.env.NODE_ENV = ”development /  production ‘;

Remember in case you are using both http & https values should  not be the same

Example : http : process.env.NODE_ENV = ‘development ‘; https : //process.env.NODE_ENV = ”production ‘;

Our code uses clauses such as group by, having, order by etc. Make sure that the your database mode supports these clauses.

The code was tested with sql mode set to “NO_ENGINE_SUBSTITUTION”, so we would recommend using this as the sql mode if possible.


You can ask for our support to install the middleware for you. The installation fee is 130 $ and will be returned in case of purchasing the products.

Click the link below to continue with the payment and please send us your contact information to

47 responses to “Advanced Configurations”

  1. Anonymous says:

    After installation and run a server specified database is empty
    Why is it ?

    • Iris Staro says:

      Thank you for your interest on Magoware. We will be more than happy to assist you
      The database needs to be populated with your own data since you have installed your own demo. If you need assistance on how to setup in further steps the backoffice system please contact us :
      E-mail :
      Skype : MAGOWARE IPTV

      Have a nice day!

  2. gilbert says:

    Hi Staff,

    Thank you for great OTT solution to share as open source.
    I’ve installed the middleware and works fine except delete function and ..

    Can you please let me know what did i get wrong?

    • Iris Staro says:

      Hello Gilbert!
      Thank you for contacting Magoware!

      I want to explain that there are some menu-s and data that is not possible to delete from the system , but you can make them not available.
      We have replied to your e-mail address in order to better server you for any question or assistance you may need

      Magoware Team 

  3. Rassel Viamonte says:

    I would like to test your system, but there’s something is not working, or I don’t know how to do it. That’s why I need your support.
    When I run the server (server.js) there is nothing on the Data Base. I mean, the data base doesn’t exist. When the mysql schema is created, before or after the server.js runs for the first time? Can I have the mysql schema to create it manually, please?
    Thank you in advanced!
    Have a good day.


  4. Carlos says:


    The database is empty, please send me the database mysql schema.

    • Iris Staro says:

      Hello Carlos!

      Thank you for contacting Magoware!
      You need to create a database in MySQL server for Magoware first , and it will be empty.
      When you run the command sudo node server.js , you will see the system require the database credentials like database name, database username , database password and database host. After entering these data-s the web-server will start to run and the database will be populated with the default values

      If you need further assistance with the installation please contact us in our e-mail address or in our skype address : MAGOWARE IPTV

      Magoware Team

  5. Cody says:

    My download doesnt include the db.connection.js in the env folder. Any help would be nice so I can get this up and running!

    • Iris Staro says:


      Thank you for contacting Magoware!
      The file db.connection.js is created automatically after you run the command sudo node server.js and connect to the MySQL database.
      If you need help with the installation or configuration you can contact us also in our e-mail address

      Magoware Team

  6. Mauricio says:

    when i run command node server.js it connect to my db but i can see error
    SequelizeDatabaseError: ER_NO_SUCH_TABLE: Table ‘iptv_pambicom.epg_data’ doesn’t exist
    at Query.formatError (C:\backoffice-administration-master\node_modules\sequelize\lib\dialects\mysql\query.js:175:14)
    at Query._callback (C:\backoffice-administration-master\node_modules\sequelize\lib\dialects\mysql\query.js:49:21)
    at Query.Sequence.end (C:\backoffice-administration-master\node_modules\mysql\lib\protocol\sequences\Sequence.js:88:24)
    at Query.ErrorPacket (C:\backoffice-administration-master\node_modules\mysql\lib\protocol\sequences\Query.js:90:8)
    at Protocol._parsePacket (C:\backoffice-administration-master\node_modules\mysql\lib\protocol\Protocol.js:279:23)
    at Parser.write (C:\backoffice-administration-master\node_modules\mysql\lib\protocol\Parser.js:76:12)
    at Protocol.write (C:\backoffice-administration-master\node_modules\mysql\lib\protocol\Protocol.js:39:16)
    at Socket. (C:\backoffice-administration-master\node_modules\mysql\lib\Connection.js:103:28)
    at Socket.emit (events.js:160:13)
    at addChunk (_stream_readable.js:269:12)
    at readableAddChunk (_stream_readable.js:256:11)
    at Socket.Readable.push (_stream_readable.js:213:10)
    at TCP.onread (net.js:599:20)…

    and so on

    but the web server run but nothing happens when i try to login with user: admin and pass: admin

    Can you help me?

    • Iris Staro says:

      Hello Mauricio!
      Thank you for contacting Magoware!
      First please check nodejs version installed (it is required version 7.x.x or 8.x.x). If you have one of these versions installed, try to delete config folder , copy it again on the server and run : sudo node server.js
      Make sure database credentials you are entering are correct to not experience the same problem again.
      If you need further assistance please contact our support at

      Magoware Team

  7. Travers says:

    I’m trying to access the admin panel but try to access it there is a Not authorized message in the upper left hand corner of the browser.

    • Iris Staro says:

      Hello Travers!
      Thank you for contacting Magoware!

      Have you installed you own copy of demo backoffice , or you are trying to access the Magoware demo backoffice?
      Please if you can send us the details , so we can assist you better. Feel free to contact us at our support address :

      Magoware Team

  8. David Johnson says:

    Hi Magoware, I do think it would be far more helpful if you did reply to everyones same issue, once again error: Error connecting to database is showing on my clean installation, yes credentials are correct and yes i have set MYSQL mode.

    It would appear its something with your code or your missing a vital install step out intentionally.


  9. I already have a CDN but I am looking for MiddleWare… What costs are involved to get MagoWare setup?

  10. Adi says:

    Can I get help with setup?
    I got this error: Error connecting to database

    I’m pretty sure I did everything right.
    Environment: Windows 10, DB using xampp mysql (mariaDB)

  11. dtg says:

    I’ve installed magoware on Ubuntu server and got in to admin panel but have some issues.
    Page hangs (circle spinning on navigation bar) when i try to create stream in:
    TV Channels > Channels / Streams
    I’ve installed nodejs v8.11.3, npm v6.2.0
    Any ideas ?
    Thank you

  12. Michal says:


    In advanced settings howto -> https section you have point:
    Run file serverhttps.js

    But where to find it?

    • Iris Staro says:

      Hello Michal!
      Thank you for contacting Magoware.
      Regarding your question , please find below how to run the server on https mode :
      1. Transfer the certificates
      2. Change the mode from development to production on file : server.js
      3. From the command line , run on the Magoware root folder command : sudo node server.js

      Shall you need further assistance please don’t hesitate to contact us back , our support e-mail address :

      Magoware Team

  13. Michal says:

    Hi Iris,

    That returns following error:
    Error: ENOENT: no such file or directory, open ‘/*******/backoffice-administration/config/sslcertificate/’

    Any ideas? Thanks

    • Iris Staro says:

      Hello Michal!
      Do you have certificates for https protocol ? They are necessary to be able to run the Magoware server on https.

      Magoware Team

      • Michal says:

        Yes I do:

        /backoffice-administration/config/sslcertificate$ ls -l
        total 8
        -rwxrwxrwx+ 1 michal users 989 Oct 11 10:38 certificate.txt
        -rwxrwxrwx+ 1 michal users 0 Oct 10 21:23 cert.txt
        -rwxrwxrwx+ 1 michal users 1834 Oct 11 10:38 key.txt

        • Iris Staro says:

          Hello Michal!
          Please make sure you have changed the value from ‘development’ to production on file server.js on the following field :
          process.env.NODE_ENV = ‘development’; //this value should be set to production to enable https

          Magoware Team

          • Michal says:

            I did that. Dev is working fine, production doesn’t want to start. It gives misding

          • Iris Staro says:

            Hello Michal!

            Please find below how to re-name the certificates and run the server :
            1. Copy or transfer the ssl certificates on the following path : config/sslcertificate
            2. Rename the files as described below :
            privateKey: key.txt’,
            certificate: certificate.txt’,
            3. On file server.js edit the mode from development to production.

            After finishing these configurations run the server : sudo node server.js . It will be automatically switch to https

          • Danrlei Zaffari says:

            Hi i Have the same problem Can you help me?

            [root@iptv sslcertificate]# ls -lah
            total 8,0K
            drwxrwxrwx 2 root root 60 Out 26 12:10 .
            drwxr-xr-x 8 root root 160 Out 26 12:04 ..
            -rwxrwxrwx 1 root root 2,0K Out 26 12:08 certificate.txt
            -rwxrwxrwx 1 root root 0 Out 26 12:04 cert.txt
            -rwxrwxrwx 1 root root 3,2K Out 26 12:07 key.txt


            ‘use strict’;
            var defaultEnvConfig = require(‘./default’);
            process.env.DB_LOG = false;

            module.exports = {
            secure: {
            ssl: Boolean(process.env.ssl) || true,
            privateKey: ‘./config/sslcertificate/key.txt’,
            certificate: ‘./config/sslcertificate/certificate.txt’,
            ca: ‘./config/sslcertificate/’
            port: process.env.PORT || 443,
            db: require(‘./db.connection.js’),
            redis: {
            host: process.env.REDIS_HOST || “localhost”,
            port: process.env.REDIS_PORT || 6379,
            database: parseInt(process.env.REDIS_DATABASE) || 0,
            password: process.env.REDIS_PASSWORD || “”
            log: {
            // Can specify one of ‘combined’, ‘common’, ‘dev’, ‘short’, ‘tiny’
            format: ‘combined’,
            // Stream defaults to process.stdout
            // Uncomment to enable logging to a log on the file system
            options: {
            //stream: ‘access.log’
            app: {
            title: + ‘ – Production Environment’
            mailer: {
            from: process.env.MAILER_FROM || ‘MAILER_FROM’,
            options: {
            service: process.env.MAILER_SERVICE_PROVIDER || ‘MAILER_SERVICE_PROVIDER’,
            auth: {
            user: process.env.MAILER_EMAIL_ID || ‘MAILER_EMAIL_ID’,
            pass: process.env.MAILER_PASSWORD || ‘MAILER_PASSWORD’

            ‘use strict’;

            module.exports = {
            app: {
            title: ‘MAGOWARE’,
            description: ‘Magoware Administartion Portal’,
            keywords: ‘IPTV, Middleware, Backend, Backoffice, ‘,
            googleAnalyticsTrackingID: process.env.GOOGLE_ANALYTICS_TRACKING_ID || ”,
            reCaptchaSecret: process.env.RECAPTCHA_SECRET || ‘1234’
            port: process.env.PORT || 443,
            templateEngine: ‘swig’,
            // Session Cookie settings
            sessionCookie: {
            // session expiration is set by default to 24 hours
            maxAge: 24 * (60 * 60 * 1000),
            // httpOnly flag makes sure the cookie is only accessed
            // through the HTTP protocol and not JS/browser
            httpOnly: true,
            // secure cookie should be turned to true to provide additional
            // layer of security so that the cookie is set only when working
            // in HTTPS mode.
            secure: Boolean(process.env.ssl) || true
            // sessionSecret should be changed for security measures and concerns
            sessionSecret: ‘NodeMysqlCRUD20160608’,
            // sessionKey is set to the generic sessionId key used by PHP applications
            // for obsecurity reasons
            sessionKey: ‘sessionId’,
            sessionCollection: ‘sessions’,
            logo: ‘pubic/admin/images/mago.png’,
            favicon: ‘public/admin/favicon.ico’

          • Iris Staro says:

            Hello Darnlei!
            Thank you for contacting Magoware. We have contact you via our support e-mail with the steps to run the server on https. Also we have updated the article to refer

            Magoware Team

  14. Sal says:

    In case anyone else is having the same issues I had, here is the exact step-by-step installation instructions (the tutorial on this website is missing a lot):

    I was able to get Magoware working after over three days of troubleshooting, but before I start, this guide assumes you already have Ubuntu 14.04.05 LTS server OS installed on your device or virtual machine (when flashing the server OS I selected to NOT receive automatic updates and I installed the “Virtual Machine Host” software packages).

    Starting from a fresh installation:

    1). UPDATE:
    sudo su
    sudo apt-get update

    2). SSH ACCESS:
    sudo apt-get install openssh-server

    (Optional)*: Now SSH into your server using PuTTY; not required but preferred.

    3). MYSQL:
    sudo apt-get install mysql-server

    4). NODEJS & NPM:
    curl -sL$v.x | sudo -E bash –
    sudo apt-get install -y nodejs

    5). GIT (in-case you don’t already have ‘git’ installed):
    sudo apt-get install git

    6). MAGOWARE:
    git clone
    cd backoffice-administration/
    npm install
    npm audit fix | ## if vulnerabilities are found.
    npm audit | ## to manually fix vulnerabilities.

    7). SETUP MYSQL:
    cd backoffice-administration/
    mysql -u root -p
    [enter your mysql ‘root’ password if you set one up during mysql installation]
    CREATE DATABASE magoware;

    sudo su
    cd backoffice-administration/
    node server.js
    [Enter database username:] root
    [Enter database password:]
    [Enter database host address:] localhost
    [Enter database name:] magoware

    9). PANEL LOGIN:
    http://[your server IP-address]/admin
    [username:] admin
    [password:] admin

    Hope this helps others who may be having difficulty setting up their own iptv server.


  15. Pablo says:

    Good afternoon,
    I managed to complete the installation process in Windows. I already logged on to the admin portal few weeks ago. I might had changed the default admin password and dont recall what i changed it to. What file in configuration files can go in to reset it back to default?
    Thank you for your support,
    Pablo De La Cruz

    • Iris Staro says:

      Hello Pablo!
      Thank you for contacting Magoware.

      If you have changed the admin password from the option on the right side of the panel, you will need to reset it via database. We can assist you on that.
      On the other hand, if you don’t have much information on the existing database, you can just create a new database and run the service with the new database.

      Magoware Team

  16. albert born says:

    Hello im change admin password and i see green bar and say undefined and now imposible to log in in backoffice with New or old Pass. Im try to fund line in mysql back up but not done how can i set New Pass without loose all my data
    Thanks in advance
    PD. Where can i get different versión of backoffice I have some bugs in this one like movies crash the app

    • Iris Staro says:

      Hello Albert!
      Thank you for contacting Magoware. We have reset the password for you and assisted through the support email.
      Shall you have further questions or need assistance we will be glad to help

      Best Regards
      Magoware Team

  17. Franziska says:

    It works really well for me

  18. Antonis says:

    Hello team,
    Is it working on Hotel Tv like Samsung, LG or Mag?

Leave a Reply

Your email address will not be published.