Installation
- SuperAdmin (v8.0.0) needs latest Total.js from NPM
+v2.8.0
- License: MIT
- NEW: Documentation
Services:
IMPORTANT
- SuperAdmin is running on port 9999 which can be changed in
run.sh
script in/www/superadmin/run.sh
- SuperAdmin is auto-generating port numbers for new applications starting from
8000
. So for 100 apps you need to make sure ports8000-8099
are free. - SuperAdmin must be run as
root
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
To install SuperAdmin run commands bellow:
# UBUNTU
$ sudo wget https://cdn.totaljs.com/superadmin.sh && bash superadmin.sh
# CENTOS
$ sudo wget https://cdn.totaljs.com/superadmin-centos.sh && bash superadmin-centos.sh
# ALPINE
$ sudo wget https://cdn.totaljs.com/superadmin-alpine.sh && bash superadmin-alpine.sh
- login user:
admin
, password:admin
(credentials are stored in/www/superadmin/config
) - manually run (if you didn't register cron in the installation)
$ cd /www/superadmin/
and$ bash run.sh
To install and run SuperAdmin with Docker:
# CLONE this repository to the current folder
git clone https://github.com/totaljs/superadmin.git .
# BUILD with tag superadmin
docker build -t superadmin .
# RUN tag superadmin (you can also map any of the exposed ports)
docker run -p 8080:80 -it superadmin
How do I translate SuperAdmin?
- install Total.js as global module
npm install -g total.js
- then open SuperAdmin directory
cd superadmin
- then perform this command
totaljs --translate
- translate translated file
translate.resource
- and copy the content to
/resources/default.resource
- run app
Where does SuperAdmin store data?
All data are stored in /superadmin/databases/
directory. Applications are stored in application.json
.
IMPORTANT: NGINX access logs are stored as /www/logs/[appname]--access.log
How to upload my application?
SuperAdmin uses a Total.js package mechanism. The mechanism creates a package file with a complete directory structure and all files. IMPORTANT the latest version supports uploading of .zip
files.
- first you have to install Total.js framework as a global module
$ npm install -g total.js
- then perform a command below:
$ cd myapplication
$ tpm create myapp.package
tpm
creates a package file- and this file you can upload via SuperAdmin
How to upgrade my older SuperAdmin version?
Don't worry, it's very easy.
- back up file
/databases/applications.json
- back up your credentials in
/config
file (only credentials, nothing more) - 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 have to update
SSL generator
to latest version viabash /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
.
Nice to know
Bash script superadmin/ssl.sh
can create or renew certificate manually:
# CREATE:
$ bash ssl.sh superadmin.mydomain.com
# RENEW:
$ bash ssl.sh superadmin.mydomain.com --renew
Bash script superadmin/reconfigure.sh
can reconfigure SuperAdmin from/to HTTPS:
# 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
Uninstall SuperAdmin
- stop all apps in SuperAdmin
- kill SuperAdmin using this command
$ kill -9 $(lsof -i :9999 | grep "total" | awk {'print $2'}) > /dev/null
- to replace nginx.conf with backed up file use this command
$ cp /etc/nginx/nginx.conf.backup /etc/
nginx/nginx.conf - reload nginx service nginx reload and/or just stop it
$ service nginx stop
- if you added a cron job to start apps at system startup then remove this line
@reboot /bin/bash /www/superadmin/run.sh
from crontab using$ crontab -e
command - remove
/www/
folder, this will remove all ssl certificates, nginx conf files, all applications, etc. - to remove node.js run
$ apt-get remove -y nodejs
- to remove nginx run
$ apt-get remove -y nginx
- to remove graphicsmagick run
$ apt-get remove -y graphicsmagick
Contributors
- Peter Širka (author) [email protected]
- Martin Smola (support) [email protected]
- Pedro Costa (contributor) [email protected]
- Jonathan Dumont (contributor) [email protected]