Skip to content

API + Frontend to remotely manage different services on my site.

Notifications You must be signed in to change notification settings

Ge0rg3/admin.georgeom.net

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

admin.georgeom.net

API + Frontend to remotely manage and monitor different services on my site.

git wasn't used during the bulk development of the project, this is just for changes past 30-08-2020.

Setup

  1. Clone repo
  2. Add password to backend/auth/password.txt file
  3. Run setup.sh script with sudo/as root
  4. Run deploy.sh script to compile angular
  5. Run start.sh script to start the uwsgi server
  6. Move example database from backend/dev_data/permissions.db to backend/auth/ and add permissions

Securing

This should be run by a service account with passwordless sudo access, and the account should be disabled so no authentication is possible. The following commands will create such an account:

sudo useradd -M dashboard
sudo usermod -L dashboard
sudo usermod -aG www-data dashboard
sudo usermod -aG sudo dashboard

The following will then need to be added to the sudoers file:

dashboard ALL=(ALL) NOPASSWD:ALL

Restart on system boot

Add the following to dashboard user crontab (where /var/www/admin is the project path). We run du as it takes a long time to get diskspace the first time, which is then cached.

@reboot bash /var/www/admin/start.sh
@reboot bash du -ax  / -d 1 -b

Serving on nginx

Create the following nginx config

server {
        listen 80;

	# If cloudflare enforcer exists, uncheck below
        # include /etc/nginx/cloudflare-allow.conf;
        # deny all;

	# Replace site.com with domain
        server_name site.com;
        location / {
                proxy_pass http://127.0.0.1:1337/;
        }
}

Usage

Diskspace

Diskspace

Processes

Processes

Statuses

Statuses

Firewall

Firewall

About

API + Frontend to remotely manage different services on my site.

Topics

Resources

Stars

Watchers

Forks