This commit is contained in:
wh1te909 2021-02-24 00:12:55 +00:00
parent f863c29194
commit a05998a30e
12 changed files with 166 additions and 97 deletions

View File

@ -44,4 +44,5 @@ model_bakery
mkdocs
mkdocs-material
pymdown-extensions
Pygments
mypy

1
.gitignore vendored
View File

@ -46,3 +46,4 @@ docker-compose.dev.yml
docs/.vuepress/dist
nats-rmm.conf
.mypy_cache
docs/site/

View File

@ -15,6 +15,8 @@ Demo database resets every hour. Alot of features are disabled for obvious reaso
### [Discord Chat](https://discord.gg/upGTkWp)
### [Documentation](https://wh1te909.github.io/tacticalrmm/)
## Features
- Teamviewer-like remote desktop control
@ -33,98 +35,6 @@ Demo database resets every hour. Alot of features are disabled for obvious reaso
- Windows 7, 8.1, 10, Server 2008R2, 2012R2, 2016, 2019
## Installation
## Installation / Backup / Restore / Usage
### Requirements
- VPS with 2GB ram (an install script is provided for Ubuntu Server 20.04 / Debian 10)
- A domain you own with at least 3 subdomains
- Google Authenticator app (2 factor is NOT optional)
### Docker
Refer to the [docker setup](docker/readme.md)
### Installation example (Ubuntu server 20.04 LTS)
Fresh VPS with latest updates\
login as root and create a user and add to sudoers group (we will be creating a user called tactical)
```
apt update && apt -y upgrade
adduser tactical
usermod -a -G sudo tactical
```
switch to the tactical user and setup the firewall
```
su - tactical
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow ssh
sudo ufw allow http
sudo ufw allow https
sudo ufw allow proto tcp from any to any port 4222
sudo ufw enable && sudo ufw reload
```
Our domain for this example is tacticalrmm.com
In the DNS manager of wherever our domain is hosted, we will create three A records, all pointing to the public IP address of our VPS
Create A record ```api.tacticalrmm.com``` for the django rest backend\
Create A record ```rmm.tacticalrmm.com``` for the vue frontend\
Create A record ```mesh.tacticalrmm.com``` for meshcentral
Download the install script and run it
```
wget https://raw.githubusercontent.com/wh1te909/tacticalrmm/master/install.sh
chmod +x install.sh
./install.sh
```
Links will be provided at the end of the install script.\
Download the executable from the first link, then open ```rmm.tacticalrmm.com``` and login.\
Upload the executable when prompted during the initial setup page.
### Install an agent
From the app's dashboard, choose Agents > Install Agent to generate an installer.
## Updating
Download and run [update.sh](https://raw.githubusercontent.com/wh1te909/tacticalrmm/master/update.sh)
```
wget https://raw.githubusercontent.com/wh1te909/tacticalrmm/master/update.sh
chmod +x update.sh
./update.sh
```
## Backup
Download [backup.sh](https://raw.githubusercontent.com/wh1te909/tacticalrmm/master/backup.sh)
```
wget https://raw.githubusercontent.com/wh1te909/tacticalrmm/master/backup.sh
```
Change the postgres username and password at the top of the file (you can find them in `/rmm/api/tacticalrmm/tacticalrmm/local_settings.py` under the DATABASES section)
Run it
```
chmod +x backup.sh
./backup.sh
```
## Restore
Change your 3 A records to point to new server's public IP
Create same linux user account as old server and add to sudoers group and setup firewall (see install instructions above)
Copy backup file to new server
Download the restore script, and edit the postgres username/password at the top of the file. Same instructions as above in the backup steps.
```
wget https://raw.githubusercontent.com/wh1te909/tacticalrmm/master/restore.sh
```
Run the restore script, passing it the backup tar file as the first argument
```
chmod +x restore.sh
./restore.sh rmm-backup-xxxxxxx.tar
```
### Refer to the [documentation](https://wh1te909.github.io/tacticalrmm/)

View File

@ -4,5 +4,6 @@ django-extensions
mkdocs
mkdocs-material
pymdown-extensions
Pygments
isort
mypy

48
docs/docs/backup.md Normal file
View File

@ -0,0 +1,48 @@
# Backing up the RMM
A backup script is provided for quick and easy way to backup all settings into one file to move to another server.
Download the backup script:
```bash
wget https://raw.githubusercontent.com/wh1te909/tacticalrmm/master/backup.sh
```
Edit `backup.sh` with your text editor of choice.
Change the postgres username/password at the top of the file.
You can find this info in the following file:
```
/rmm/api/tacticalrmm/tacticalrmm/local_settings.py
```
Look for this section and grab the USER / PASSWORD:
```python
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'tacticalrmm',
'USER': 'someusername',
'PASSWORD': 'somepassword',
'HOST': 'localhost',
'PORT': '5432',
}
}
```
From the Web UI, click **Tools > Server Maintenance**
Choose **Prune DB Tables** from the dropdown and check the `Audit Log` and `Pending Actions` checkboxes, and then click **Submit**
Doing a prune first before running the backup will significantly speed up the postgres vacuum command that is run during backup.
Run the backup script
```bash
chmod +x backup.sh
./backup.sh
```
The backup tar file will be saved in `/rmmbackups` with the following format:
`rmm-backup-CURRENTDATETIME.tar`

View File

@ -3,7 +3,7 @@
#### How do I do X feature in the web UI?
Alot of features in the web UI are hidden behind right-click menus; almost everything has a right click menu so if you don't see something, try right clicking on it.
#### Where are the linux / mac agents?
#### Where are the Linux / Mac agents?
Linux / Mac agents are currently under development.
#### I am locked out of the web UI. How do I reset my password?
@ -13,9 +13,9 @@ SSH into your server and run these commands:
!!!note
The code below will reset the password for the account that was created during install.
To reset a password for a different user, you should use the web UI (see the next question below), but can also do so through the command line by replacing<br/>
`user = User.objects.first()`<br/>
`#!python user = User.objects.first()`<br/>
with<br/>
`user = User.objects.get(username='someuser')`
`#!python user = User.objects.get(username='someuser')`
<br/>
in the code snippet below.

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

37
docs/docs/restore.md Normal file
View File

@ -0,0 +1,37 @@
# Restore
!!!info
It is currently not possible to restore to a different domain/subdomain, only to a different physical or virtual server.
#### Prepare the new server
Create the same exact linux user account as you did when you installed the original server.
Add it to the sudoers group and setup the firewall.
Refer to the [installation instructions](install_server.md) for steps on how to do all of the above.
#### Change DNS A records
Open the DNS manager of whever your domain is hosted.
Change the 3 A records `rmm`, `api` and `mesh` and point them to the public IP of your new server.
#### Run the restore script
Copy the backup tar file you created during [backup](backup.md) to the new server.
Download the restore script.
```bash
wget https://raw.githubusercontent.com/wh1te909/tacticalrmm/master/restore.sh
```
Edit the restore script with your editor of choice and change the postgres username/password at the top of the file.
Refer to the [backup](backup.md) instructions on where to find this info.
Copy the backup tar file to the new server and then call the update script, passing it the backup file as the first argument:
```bash
chmod +x restore.sh
./restore.sh rmm-backup-XXXXXXXXX.tar
```

View File

@ -0,0 +1,39 @@
# Updating Agents
!!!warning
The agent's version is directly tied to the RMM's version.<br/><br/>
For example, currently RMM version 0.4.17 is compatible with agent version 1.4.6 and lower.<br/><br/>
You should never attempt to manually update an agent to a newer version without first making sure your RMM is on the latest version.
#### Updating from the Web UI
Agents will automatically self update themselves if you have auto self update enabled in **Settings > Global Settings**<br/><br/>
![autoagentupdate](images/autoagentupdate.png)
There is a background job that runs every hour, at 35 minutes past the hour and sends any online agents an update command if it detects they are on an older version.<br/><br/>
You can also trigger this background job to run on demand by clicking **Agents > Update Agents** in the web UI:<br/><br/>
![manualagentupdate](images/manualagentupdate.png)
You can individually choose which agents to update, or simply Select All.<br/><br/>
The RMM will automatically skip any agents that don't need updating.<br/><br/>
You can trigger this manual agent update anytime you want. It is safe to spam, and won't run if an agent update task is already running.<br/><br/>
It will also make sure agents update to the correct version, in case they are an older version that cannot be directly upgraded to the latest version.<br/><br/>
For example, agents older than version 1.3.0 must first be updated to 1.3.0 before they can go any further.<br/>
<br/>
#### Manually updating from the command line on the agent
You should never need to do this but might be needed to troubleshoot agents that are not updating automatically.<br/>
Download the `winagent-vX.X.X.exe` executable from the [github releases page](https://github.com/wh1te909/rmmagent/releases) and place it somewhere on the filesystem.<br/>
Open CMD as admin and call the exe like so:
```
C:\Windows\Temp>winagent-vX.X.X.exe /VERYSILENT /LOG=agentupdate.txt
```
This command will return immediately since it spawns a background process to run the update.<br/>
The agent will take around 30 seconds to fully update.<br/><br/>
You can check the `agentupdate.txt` log file that is created for troubleshooting.<br/><br/>

View File

@ -0,0 +1,27 @@
# Updating the RMM
!!!danger
Do __not__ attempt to manually edit the update script or any configuration files unless specifically told to by one of the developers.<br/><br/>
Since this software is completely self hosted and we have no access to your server, we have to assume you have not made any config changes to any of the files or services on your server, and the update script will assume this.<br/><br/>
You should also **never** attempt to automate running the update script via cron.<br/><br/>
The update script will update itself if needed to the latest version when you run it, and them prompt you to run it again.<br/><br/>
Sometimes, manual intervention will be required during an update in the form of yes/no prompts, so attempting to automate this will ignore these prompts and cause your installation to break.
SSH into your server as the linux user you created during install.<br/><br/>
__Never__ run any update scripts or commands as the `root` user.<br/>This will mess up permissions and break your installation.<br/><br/>
Download the update script and run it:<br/>
```bash
tactical@tacrmm:~$ wget https://raw.githubusercontent.com/wh1te909/tacticalrmm/master/update.sh
tactical@tacrmm:~$ chmod +x update.sh
tactical@tacrmm:~$ ./update.sh
```
<br/>
If you are already on the latest version, the update script will notify you of this and return immediately.<br/><br/>
You can pass the optional `--force` flag to the update script to forcefully run through an update, which will bypass the check for latest version.<br/>
```bash
tactical@tacrmm:~$ ./update.sh --force
```
This is usefull for a botched update that might have not completed fully.<br/><br/>
The update script will also fix any permissions that might have gotten messed up during a botched update, or if you accidentally ran the update script as the `root` user.

View File

@ -5,6 +5,11 @@ nav:
- "Traditional Install": install_server.md
- "Docker Install": install_docker.md
- Agent Installation: install_agent.md
- Updating:
- "Updating the RMM": update_server.md
- "Updating Agents": update_agents.md
- Backup: backup.md
- Restore: restore.md
- FAQ: faq.md
- License: license.md
site_description: "A remote monitoring and management tool"