GithubHelp home page GithubHelp logo

totaljs / superadmin Goto Github PK

View Code? Open in Web Editor NEW
97.0 14.0 48.0 3.4 MB

Manage your Linux servers and Total.js applications easily. Free and open-source.

Home Page: https://www.totaljs.com/superadmin/

License: MIT License

JavaScript 68.98% CSS 4.57% HTML 21.77% Shell 4.68%
pm2 project javascript node nosql monitoring-server

superadmin's Introduction

superadmin's People

Contributors

athuli7 avatar dkubanyi avatar elswork avatar helferino avatar jodumont avatar molda avatar patchwerkqwer avatar petersirka avatar teutat3s avatar teutone avatar tomee03 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

superadmin's Issues

new subprocess [error] => parseFloat is not a Function

Hi!
I have a error in public/js/templates/applications.html line 962
when a new subprocess is created

memory += item.memory.parseFloat(); // is not a function

fix it by removing the function

memory += item.memory;

😃

Upload of big package files

Hi,

i get a no message error output from superadmin when i upload a 80 MB package file. Where is the limit of this files defined?

A nice feature would be a config where i limit the size of packages and a error of package is to big.

It´s a very nice app and I am so happy with this hosting solution.

Best reagrds,

NMonst4

Remove superadmin

Hi all,
Unfortunately, I could not found solution how to delete superadmin from my Ubuntu Server 16 correctly.
So could you please tell me how to do that?
Thanks!

nginx: not found

Hi,
When I want to renew the certificates give this error.

Error: Command failed: nginx -t /bin/sh: 1: nginx: not found

Thanks

unable to visit installed app using domain name

Hi there,

I'm new to total.js and SuperAdmin.

Just installed on Ubuntu 14 server, and added an application which is eshop, binding to a domain name which is www.xxx.com.

Then I edited my hosts file adding the ip and domain name.

But when I visit www.xxx.com, it's just showing the default nginx page.

What happened?
By the way, the supreadmin backend show's a wrong "Your IP address:", which is not the actual IP I'm using, bought from vultr.

and, Totaljs is great.

Any guidance?
Thank you.

Here're the configs:

root@vultr:/www/nginx# cat superadmin.conf 
#disablehttps#server{
#disablehttps#	listen          80;
#disablehttps#	server_name     sa.xxx.com;
#disablehttps#	location ^~ /.well-known/acme-challenge/ {
#disablehttps#			default_type "text/plain";
#disablehttps#			root /www/acme/;
#disablehttps#			break;
#disablehttps#	}
#disablehttps#	location ~ / {
#disablehttps#		return 301 https://sa.xxx.com$request_uri;
#disablehttps#	}
#disablehttps#}

server {

	listen         80;
#disablehttps#	listen         443 http2 ssl;
	server_name    sa.xxx.com;
	charset        utf-8;

#disablehttps# 	ssl_certificate /www/ssl/sa.xxx.com/fullchain.cer;
#disablehttps# 	ssl_certificate_key /www/ssl/sa.xxx.com/sa.xxx.com.key;
#disablehttps# 	ssl_trusted_certificate /www/ssl/sa.xxx.com/fullchain.cer;
#disablehttps# 	ssl_session_timeout 5m;
#disablehttps# 	ssl_stapling on;
#disablehttps# 	ssl_stapling_verify on;
#disablehttps# 	ssl_session_cache shared:SSL:10m;
#disablehttps# 	ssl_protocols SSLv3 TLSv1.2 TLSv1.1 SSLv2;
#disablehttps# 	ssl_prefer_server_ciphers on;
#disablehttps# 	ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";

	client_max_body_size 50M;

	location ^~ /.well-known/acme-challenge/ {
		default_type "text/plain";
		root /www/acme/;
		break;
	}

	location / {
		limit_req zone=ddos burst=33 nodelay;
		proxy_set_header    Host $http_host;
		proxy_set_header    X-Forwarded-For $remote_addr;
		proxy_set_header    X-Forwarded-Protocol $scheme;
		proxy_set_header    X-NginX-Proxy true;
		proxy_set_header    Upgrade $http_upgrade;
		proxy_set_header    Connection "upgrade";
		proxy_redirect      off;
		proxy_http_version  1.1;
		proxy_buffering     off;
		proxy_cache_bypass  $http_upgrade;
		proxy_cache_key     sfs$request_uri$scheme;
		proxy_pass_header   X-Ping;
		proxy_read_timeout  600s;
		proxy_pass          http://127.0.0.1:9999;
		break;
	}
}

root@vultr:/www/nginx# cat xxx_com-www.conf 
server {

	listen         80;
	server_name    www.xxx.com;
	charset        utf-8;

	location ~ "^/\.well-known/acme-challenge/([-_a-zA-Z0-9]+)$" {
		allow all;
		default_type "text/plain";
		return 200 "$1.4nBUgflk-q9K67HF39D8pF4Ek3a_3i7UtTTDMNDB5DU";
	}

	client_max_body_size 1M;
	#  flush=1m
	access_log	/www/logs/xxx_com-www--access.log superadmin;

	location / {
		client_max_body_size 5M;
		limit_req zone=ddos burst=20 nodelay;
		proxy_set_header    Host $http_host;
		proxy_set_header    X-Forwarded-For $remote_addr;
		proxy_set_header    X-Forwarded-Proto $scheme;
		proxy_set_header    X-NginX-Proxy true;
		proxy_set_header    Upgrade $http_upgrade;
		proxy_set_header    Connection "upgrade";
		proxy_redirect      off;
		proxy_http_version  1.1;
		proxy_buffering     off;
		
		proxy_read_timeout  600s;
		
		proxy_cache_bypass  $http_upgrade;
		proxy_cache_key     sfs$request_uri$scheme;
		proxy_pass_header   X-Ping;
		proxy_pass          http://127.0.0.1:8000;
		break;
	}
}

The database was suddenly deleted

A strange thing happened to me. I have a pretty powerful VPS with ~10 apps. Over the morning they all stopped working. Superadmin couldn't load (the apps). All other apps were throwing 502 Bad Gateway. I figured out what was the problem but not what caused it.

The databases/applications.json was empty. Fortunately applications.backup contained json but applications.json was completely empty. There was no {} either, so superadmin threw an error when loading the file on startup.

I am attaching a zip with the code that made the problem - exactly what happened. Unfortunately I couldn't figure out why applications.json was suddenly empty. Maybe a mini outage at the vps hosting but I can't simulate that. I didn't add any app. No app had errors. And even none of them were close to SSL expiration.

test.zip

====================================================
PID           : 1699
Node.js       : v20.10.0
Total.js      : v4093
OS            : linux 5.4.0-105-generic
Memory        : 9.72 MB / 17.54 MB
User          : root
====================================================
Name          : Total.js
Version       : 1.0.0
Date          : 2024-03-22 08:03:23
Mode          : debug
====================================================
Directory     : /www/superadmin
node_modules  : /www/node_modules/total4/
====================================================

Thank you

Update documentation

Hi,

a litle text in the readme for updating would be very fine. Not necessary but fine. ;)

Best regards,

NMonst4

node arguments

Hi,
How can I add node arguments to an application?
example:
node --harmony-async-await release.js

overwritten log files

Hi Peter,

i use superadmin for a few projects. Sometimes my servers crash... so i have to restart them (via superadmin).

However, after restarting the old logfile is overwritten, so i cannot see what went wrong before restarting the server. Is it possible for superadmin to keep the old logfile?

If not - it would surely be a good new feature 😄

What ports?

Readme says:

IMPORTANT: All ports from 8000 must be free for SuperAdmin applications because SuperAdmin uses auto-generating port numbers for new applications.

Is that ALL ports 8000+? With or without 8000?
So: 8000, 8001, ... ,49150 ,49151?

Or I think you mean 8***, so 8000-8999.

Custom NGINX configuration error

I get an error when saving

Error: Command failed: /usr/sbin/nginx -t nginx: [emerg] "server" directive is not allowed here in /www/nginx/test123_com.conf:13 nginx: configuration file /etc/nginx/nginx.conf test failed

config itself

server {
     listen 80;
     server_name mydomainname.com;
     location / {
         proxy_set_header X-Real-IP $ remote_addr;
         proxy_set_header Host $ http_host;
         proxy_pass http://127.0.0.1:2368;
     }
}

[warn] invalid parameter "spdy": ngx_http_spdy_module was superseded by ngx_http_v2_module

Hi there,

I've set up the https for superadmin.domain.

But when setting up https for www.xxx.com, I got the following error from superadmin's backend:

Error: Command failed: nginx -t nginx: [warn] invalid parameter "spdy": ngx_http_spdy_module was superseded by ngx_http_v2_module in /www/nginx/xxx_com-www.conf:3 nginx: [emerg] BIO_new_file("/www/ssl/www.xxx.com/fullchain.cer") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/www/ssl/www.xxx.com/fullchain.cer','r') error:2006D080:BIO routines:BIO_new_file:no such file) nginx: configuration file /etc/nginx/nginx.conf test failed

And in /www/ssl/www.xxx.com/, there's no fullchain.cer, but these:

drwxr-xr-x 2 root root 4096 Nov 15 17:33 ./
drwxr-xr-x 4 root root 4096 Nov 15 17:33 ../
-rw-r--r-- 1 root root  198 Nov 15 18:05 www.xxx.com.conf
-rw-r--r-- 1 root root  993 Nov 15 18:05 www.xxx.com.csr
-rw-r--r-- 1 root root  224 Nov 15 18:05 www.xxx.com.csr.conf
-rw-r--r-- 1 root root 1675 Nov 15 17:33 www.xxx.com.key

And the default /www/nginx/xxx_com-www.conf is:

server {

        listen         443 spdy ssl;

        charset        utf-8;
        server_name    www.xxx.com;
        ssl_certificate /www/ssl/www.xxx.com/fullchain.cer;
        ssl_certificate_key /www/ssl/www.xxx.com/www.xxx.com.key;
        ssl_trusted_certificate /www/ssl/www.xxx.com/fullchain.cer;
        ssl_session_timeout 5m;
        ssl_stapling on;
        ssl_stapling_verify on;
        ssl_session_cache shared:SSL:10m;
        ssl_protocols SSLv3 TLSv1.2 TLSv1.1 SSLv2;
        ssl_prefer_server_ciphers on;
        ....

There're basically two problem:

  • spdy conflicts with http2
    
  • fullchain.cer is missing....
    

I think I should change the spdy to http2 because it's working for the superadmin domain.
How should I correct this?

Thank you very much.

SSL fails on non-standard TLD's such as those from Handshake

This is the error that gets thrown when trying to generate the SSL certificates using a Handshake TLD.

Create new order error. Le_OrderFinalize not found. {
"type": "urn:ietf:params:acme:error:rejectedIdentifier",
"detail": "Error creating new order :: Cannot issue for "superadmin.handshaketld": Domain name does not end with a valid public suffix (TLD)",
"status": 400
}
[Sat Jan 29 10:49:42 UTC 2022] Please add '--debug' or '--log' to check more details.
[Sat Jan 29 10:49:42 UTC 2022] See: https://github.com/acmesh-official/acme.sh/wiki/How-to-debug-acme.sh

While this is a failing point for Acme and not SuperAdmin it would be helpful to have some idea as to how I could get around the acme based SSL and use my own. I found a tool called Handout that was able to generate appropriate DANE-based SSL certs for the TLD but now I'm not sure how to make SuperAdmin recognize and use them.

Any suggestions would be appreciated :)

Installation failed on raspberry pi zero

## Installing the NodeSource Node.js v6.x LTS Boron repo...


## You appear to be running on ARMv6 hardware. Unfortunately this is not currently supported by the NodeSource Linux distributions. Please use the 'linux-armv6l' binary tarballs available directly from nodejs.org for Node.js v4 and later.

It's possible fix by installing through https://github.com/sdesalas/node-pi-zero

Needs work on Dockerfile

Hello,

A few things needs to be changed:
19.04 -> 20.04 because Ubuntu 19 was decommissioned (see https://askubuntu.com/questions/1238222/the-repository-http-security-ubuntu-com-ubuntu-disco-security-release-no-lon).

ENV TZ=Europe/Paris or else
...
RUN apt-get update
RUN apt-get install -y tzdata to prevent tz setup from stopping the build process and getting the TZ from ENV
...

After RUN mkdir /www/node_modules/:
RUN cd /wwwneeded to be sure we install in the right folder
RUN npm init -y needed for package.json

I had to change a few things to run+manage it with Portainer:
change auto-created container name to something permanent (TotalJS), its image to superadmin:1.5
manually add 8080 to 80
Interactive+TTY,
restart = until stopped
image

Cannot find module

$ bash /www/superadmin/run.sh

module.js:340
throw err;
^

Error: Cannot find module '/root/release.js'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:289:25)
at Function.Module.runMain (module.js:457:10)
at startup (node.js:138:18)
at node.js:974:3

After upgrade problem with ssl certs

Hi,

after i upgraded superdamin from 4 to 5 i get strange ssl renew error. I cant renew the cert from superadmin backend

Error:

jquery.min.js:4 POST http://SERVERNAME/api/apps/ 408 (Request Timeout)

and from command line with "bash ssl.sh WEBADDRESS --renew"

i get

Error

:Verify error:Invalid response from http://

ok i break it down and i get a succesfull renew if i add a "Listen 80;" to nginx.conf for the app in "/www/nginx/APPNAME.conf"

What´s wrong with my upgrade? Anything else is running fine.

superadmin couldn't start!

Hi!
after i try to start superadmin with bash run..sh command in /www/superadmin/ directory, this message shows up:
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
the OS is Ubuntu 16.04

Run ReactJS

Is it possible to run ReactJS apps thru superadmin? Thanks

nginx: [error] invalid PID number

Im getting this error after trying to create a new application in superadmin on a fresh installation in a digitalocean droplet:
Error: Command failed: /usr/sbin/nginx -s reload nginx: [warn] "ssl_stapling" ignored, no OCSP responder URL in the certificate "/www/ssl/superadmin.csr" nginx: [error] invalid PID number "" in "/var/run/nginx.pid"

Screenshot

how to stop autoupdate for totalcms

hi, your open source stacks are great, every product of it! Im currently in love with superadmin and I have installed totaljs cms over it.

my question is: how to stop superadmin to update totalcms after restart?

for example: plugins/pages/schemas/templates.js if I remove the spa18.css from the source to add tailwindcss and bundle it, it overwrites/update the .src by superadmin after app restarts.

on hover popup for monitor?

Hello, set up a page with the monitor module from superadmin.
When I go to the url domain/$monitor it shows the statistics.
But it does not show me the popup as it appears on the superadmin landing
It does not show any errors from the console.

thank you very much for your help.

(https://www.totaljs.com/superadmin).
image

my app
image

rpm based installation script ?

Hello.

I want to install superadmin in order to replace pm2 on centos.
is there an rpm based installation script?
I'm really excited about this project, if there isn't.. i'll create one.
just want to know if anyone started the progress or is there any basic instructions on how to install
this on non-debian linux distro.

thank you!

SuperAdmin counter stay 0

Hi Peter,

I don't know if it's normal but all my counter on top stay always 0.
And I don't have the same interface like you.
I add screenshot below

Thanks

Herve

1609142351tjjr7y
screenshot - 11112016 - 14 02 46

nginx: not found

Similar to (resolved) issue #24 - nginx is not found.

Steps to reproduce:

  1. Install Ubuntu-Server (latest LTS).
  2. Use SuperAdmin install script
  • Everything now works -
  1. Reboot.
  • Now everything is broken -
    ** Testing nginx will fail
    ** Creating a new website will fail
    ** etc.

The issue appears to be caused by the path for root having only been set to '/usr/bin:/bin' at the time of calling run.sh, when a which nginx shows it's located in '/usr/sbin/nginx'.

For now, I've prefixed line 3 in /www/superadmin/run.sh with PATH=$PATH:/usr/sbin which seems to solve the issue (rather than hardcoding the absolute path in ./definitions/superadmin.js as @molda suggested). It would be preferable to use the result from which nginx for setting this path.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.