SuperAdmin / 06. Troubleshooting
Updated: 07. November 2019
Author: Peter Širka

06. Troubleshooting

Professional Support Chat with contributors

FAQ


SSL certificate is expired for SuperAdmin

If your SSL has been expired just login to your server via SSH (you need be under root privileges) and write into the terminal:

# Open app directory
$ cd /www/superadmin/

# Renew SSL
$ bash ssl.sh superadmindomain.yourdomain.com --renew

# Test NGINX configuration
$ nginx -t

# Reload NGINX configuration
$ nginx -s reload

How can I restart SuperAdmin?

You need to restart it manually on the server. Just login to your server via SSH (you need be under root privileges) and write into the terminal:

# Open app directory
$ cd /www/superadmin/

# Run SuperAdmin
$ bash run.sh

The command stops SuperAdmin (if ran) and start it again.


How can I upgrade SuperAdmin to newest version?

  • back up file /databases/applications.json
  • back up your credentials in /config file (only credentials, nothing more)
  • download source-code of SuperAdmin from my.totaljs.com
  • copy all directories and files from a new version of SuperAdmin to your server
  • restore your backup file /databases/applications.json
  • restore your credentials in /config
  • install ftp helper via $ apt-get install -y ftp
  • you need to update SSL generator to the latest version via bash /www/superadmin/ssl.sh --update
  • restart SuperAdmin bash run.sh
  • clear cache in your web browser

IMPORTANT:

If you have lower version than v7.0.0 then replace /etc/nginx/nginx.conf for /superadmin/nginx.conf.


How can I uninstall SuperAdmin from my server?

  • you need to kill SuperAdmin and stop all Total.js applications:
$ kill -9 $(ps aux | grep "total" | awk {'print $2'}) > /dev/null
  • then remove /www/ directory
  • restore old nginx configuration, it's stored as /etc/nginx/nginx.conf.backup
  • remove a cron job according to this result $ crontab -l
  • done

Can I use own nginx configs?

Of course. SuperAdmin doesn't limit you with nginx and you can create own nginx configs out of SuperAdmin, just add your nginx config to the directory below:

  • /www/nginx/ directory
  • and perform nginx reload $ nginx -s

Where are stored certificates, websites and configs?

All data are stored in /www/ directory:

  • SSL certificates /www/ssl/
  • Nginx configs /www/nginx
  • Logs /www/logs/
  • Websites /www/www/
  • SuperAdmin /www/superadmin/

Can I provide SuperAdmin on another Linux distribution than Ubuntu?

Yes, but we have tested it on Ubuntu Server only. Some developers provide SuperAdmin on Debian distributions, but we don't have any experience with it.


How does monitoring work?

Each Total.js applications need to depend on monitor module. Follow module install instructions. If you have monitor module installed then add URL to monitoring to your app in SuperAdmin:

Monitoring


Can I use SuperAdmin in commercial projects?

Of course, we don't limit you. Premium SuperAdmin is under MIT license and you can use it everywhere or sell it to your end-customers.


Which applications are needed for SuperAdmin?

Install requirements:

  • Ubuntu Server +v14
  • curl
  • openssl

SuperAdmin requirements:

  • awk
  • bash
  • cat
  • cp
  • df
  • du
  • free
  • ftp
  • grep
  • ifconfig
  • last
  • lsof
  • mkdir
  • netstat
  • npm
  • ps
  • tail
  • tar
  • unzip
  • uptime
  • wc
  • zip

A problem with generating of SSL certificates

Check:

If you have a problem with generating SSL certificates, try to check your DNS records for IPv4 and IMPORTANT: IPv6 address. ACME checks IPv6 first and then it checks IPv4.

If the generating of SSL still persist and it worked before, then try to perform the steps below:

  • remove the file /www/superadmin/databases/acmethumbprint.txt
  • try to update acme.sh curl https://get.acme.sh | sh
  • restart superadmin $ bash /www/superadmin/run.sh

How can I reconfigure SuperAdmin from/to HTTPS

When you first install SuperAdmin if for whatever reason the SSL is not generated correctly it will default to HTTP hosting. You now have the option to reconfigure it from/to HTTPS as well as being able to generate a new SSL using the bash script superadmin/reconfigure.sh:

# SET TO HTTPS AND GENERATE SSL:
$ bash reconfigure.sh y superadmin.mydomain.com y

# SET TO HTTPS WITHOUT GENERATING SSL:
$ bash reconfigure.sh y superadmin.mydomain.com

# SET TO HTTP:
$ bash reconfigure.sh n superadmin.mydomain.com

How do I run another apps than Total.js?

It's easy, just follow create a start script like this:

var express = require('express');
var app = express();

app.get('/', function (req, res) {
    res.send('hello world 2')
});

// !!! IMPORTANT 1:
app.listen(+process.argv[2]);

// !!! IMPORTANT 2 ("total" word must start in the process title):
process.title = 'total: express';

And then set a name of start script to SuperAdmin:

Start Script