RMM Tatical
RMM Tatical
RMM Tatical
Understanding TRMM
Anything you configure: scripts, tasks, patching, etc is queued and scheduled on the
server to do something. Everything that is queued, happens immediately when agents
are online. The agent gets a NATS command, the server tells it to do xyz and it does it.
When agents are not connected to the server nothing happens. The Windows Task
Scheduler says do x at some time, what it's asked to do is get x command from the
server. If the server is offline, nothing happens. If an agent comes online, every x
interval (Windows Update, pending tasks etc) check and see if there is something for
me to do that I missed while I was offline. When that time occurs (eg agent sees if it
needs to update itself at 35 minutes past every hour Update Agents ) it'll get requested
on the online agent.
Image Source
2. Agent checks / tasks and how they work on the workstation/interact with
server
Server
https://docs.tacticalrmm.com/howitallworks/ 1/21
09/08/2024, 12:12 How it all Works - Tactical RMM Documentation
Django Admin
Description
A complete list of all packages used by Tactical RMM are listed here.
If you have strict outbound firewall rules these are the outbound rules needed for all
functionality:
Regular Use
1. Outbound traffic to all agent IP scopes for reflect traffic from agents
During installation/updating
System Services
https://docs.tacticalrmm.com/howitallworks/ 2/21
09/08/2024, 12:12 How it all Works - Tactical RMM Documentation
Nginx is the web server for the rmm , api , and mesh domains. All sites redirect port 80
(HTTP) to port 443 (HTTPS).
https://docs.tacticalrmm.com/howitallworks/ 3/21
09/08/2024, 12:12 How it all Works - Tactical RMM Documentation
rmm.example.com
Config: /etc/nginx/sites-enabled/frontend.conf
root: /var/www/rmm/dist
api.example.com
This serves the TRMM API for the frontend and agents.
Config: /etc/nginx/sites-enabled/rmm.conf
roots:
/rmm/api/tacticalrmm/static/
/rmm/api/tacticalrmm/tacticalrmm/private/
Upstreams:
unix://rmm/api/tacticalrmm/tacticalrmm.sock
unix://rmm/daphne.sock
mesh.example.com
Config: /etc/nginx/sites-enabled/meshcentral.conf
Upstream: http://127.0.0.1:4430/
https://docs.tacticalrmm.com/howitallworks/ 4/21
09/08/2024, 12:12 How it all Works - Tactical RMM Documentation
default
This is the default site installed with nginx. This listens on port 80 only.
Config: /etc/nginx/sites-enabled/default
root: /var/www/rmm/dist
systemd config
status commands
standard
Service: nginx.service
Address: 0.0.0.0
Port: 443
Version: 1.18.0
docker
From the docker host view container status - docker ps --filter "name=trmm-
nginx"
https://docs.tacticalrmm.com/howitallworks/ 5/21
09/08/2024, 12:12 How it all Works - Tactical RMM Documentation
Built on the Django framework, the Tactical RMM service is the heart of the system by
serving the API for the frontend and agents.
uWSGI config
uWSGI docs
status commands
journalctl:
View the logs: journalctl --identifier uwsgi --since "30 minutes ago" |
less
standard
Service: rmm.service
Socket: /rmm/api/tacticalrmm/tacticalrmm.sock
Log: None
Version: 2.0.18
docker
From the docker host view container status - docker ps --filter "name=trmm-
backend"
https://docs.tacticalrmm.com/howitallworks/ 6/21
09/08/2024, 12:12 How it all Works - Tactical RMM Documentation
Daphne is the official ASGI HTTP / WebSocket server maintained by the Channels
project.
Daphne config
status commands
journalctl (this provides only system start/stop logs, not the actual logs):
View the logs: journalctl --identifier daphne --since "30 minutes ago" |
less
standard
Service: daphne.service
Socket: /rmm/daphne.sock
Config: /rmm/api/tacticalrmm/tacticalrmm/local_settings.py
Log: /rmm/api/tacticalrmm/tacticalrmm/private/log/trmm_debug.log
docker
From the docker host view container status - docker ps --filter "name=trmm-
websockets"
https://docs.tacticalrmm.com/howitallworks/ 7/21
09/08/2024, 12:12 How it all Works - Tactical RMM Documentation
NATS is a messaging bus for "live" communication between the agent and server.
NATS provides the framework for the server to push commands to the agent and
receive information back.
https://docs.tacticalrmm.com/howitallworks/ 8/21
09/08/2024, 12:12 How it all Works - Tactical RMM Documentation
NATS config
status commands
journalctl:
standard
Service: nats.service
Address: 0.0.0.0
Config: /rmm/api/tacticalrmm/nats-rmm.conf
TLS: /etc/letsencrypt/live/example.com/fullchain.pem
Log: None
Version: v2.3.3
docker
Get into bash in your docker with: docker exec -it trmm-nats /bin/bash
https://docs.tacticalrmm.com/howitallworks/ 9/21
09/08/2024, 12:12 How it all Works - Tactical RMM Documentation
status commands
standard
Service: nats-api.service
Config: /rmm/api/tacticalrmm/nats-api.conf
TLS: /etc/letsencrypt/live/example.com/fullchain.pem
Log: None
docker
Get into bash in your docker with: docker exec -it trmm-nats /bin/bash
Celery Service
https://docs.tacticalrmm.com/howitallworks/ 10/21
09/08/2024, 12:12 How it all Works - Tactical RMM Documentation
Celery config
Celery docs
status commands
journalctl: Celery executes sh causing the systemd identifier to be sh , thus mixing the
celery and celerybeat logs together.
"tail" the logs: journalctl --identifier sh --follow
View the logs: journalctl --identifier sh --since "30 minutes ago" | less
standard
Service: celery.service
Config: /etc/conf.d/celery.conf
Log: /var/log/celery/w*-*.log
docker
From the docker host view container status - docker ps --filter "name=trmm-
celery"
Celery Beat is a scheduler. It kicks off tasks at regular intervals, that are then executed
by available worker nodes in the cluster.
https://docs.tacticalrmm.com/howitallworks/ 11/21
09/08/2024, 12:12 How it all Works - Tactical RMM Documentation
status commands
journalctl: Celery executes sh causing the systemd identifier to be sh , thus mixing the
celery and celerybeat logs together.
View the logs: journalctl --identifier sh --since "30 minutes ago" | less
standard
Service: celerybeat.service
Log: /var/log/celery/beat.log
docker
From the docker host view container status - docker ps --filter "name=trmm-
celerybeat"
Redis Service
Redis is an in-memory data structure store used as a database, cache, and message
broker for Django / Celery.
https://docs.tacticalrmm.com/howitallworks/ 12/21
09/08/2024, 12:12 How it all Works - Tactical RMM Documentation
Redis config
Redis docs
status commands
standard
Service: redis-server.service
Log: /var/log/redis/redis-server.log
docker
From the docker host view container status - docker ps --filter "name=trmm-
redis"
View logs: docker compose logs tactical-redis
MeshCentral
MeshCentral is used for "Take Control" (connecting to machine for remote access),
and 2 screens of the "Remote Background" (Terminal, and File Browser).
/meshcentral/meshcentral-data/config.json
https://docs.tacticalrmm.com/howitallworks/ 13/21
09/08/2024, 12:12 How it all Works - Tactical RMM Documentation
Info
Mesh usernames are CaSe sEnSiTive. Tactical will make sure it's all lower case to avoid
sync problems.
MeshCentral
MeshCentral docs
status commands
docker
From the docker host view container status - docker ps --filter "name=trmm-
meshcentral"
View logs: docker compose logs tactical-meshcentral
Debugging
Open either "Take Control" or "Remote Background" to get mesh login token.
To view detailed logging goto "Trace" > click Tracing button and choose categories.
If you run sudo systemctl status --full --no-pager meshcentral and you don't see
Active: active (running) since ...
You can manually run meshcentral using this command to see the full output with errors.
https://docs.tacticalrmm.com/howitallworks/ 14/21
09/08/2024, 12:12 How it all Works - Tactical RMM Documentation
MeshCentral Agent
Get Mesh Agent Version info with this command. Should match server version.
Other Dependencies
Django dependencies
future==0.18.2
loguru==0.5.3
msgpack==1.0.2
packaging==20.9
psycopg2-binary==2.9.1
pycparser==2.20
pycryptodome==3.10.1
pyotp==2.6.0
pyparsing==2.4.7
pytz==2021.1
qrcode dependencies
requests==2.25.1
six==1.16.0
sqlparse==0.4.1
https://docs.tacticalrmm.com/howitallworks/ 15/21
09/08/2024, 12:12 How it all Works - Tactical RMM Documentation
twilio dependencies
urllib3==1.26.5
uWSGI==2.0.19.1
validators==0.18.2
vine==5.0.0
websockets==9.1
zipp==3.4.1
Windows Agent
Found in %programfiles%\TacticalAgent
The Tactical RMM agent runs under the SYSTEM security context.
3. Executed.
Having said that...Windows logs all things PowerShell: Event Viewer > Microsoft >
Windows > PowerShell > Operational Log so be careful with fancy API calls and
auth token using agents for execution.
Warning
Remember: Auth tokens are Username/Password/2FA verification all rolled into a single
chunk of text!
RunAsUser functionality
Now that we know the agent runs under the SYSTEM security context and what that
means, there is an option to "RunAsUser" (Windows only).
https://docs.tacticalrmm.com/howitallworks/ 16/21
09/08/2024, 12:12 How it all Works - Tactical RMM Documentation
2. The user has to be logged in, if the computer is still sitting at the Login screen there
will be no active user to discover, and fail. If you're using fast user switching, it is the
active user that will be discovered and used.
1. The Tactical RMM "RunAsUser" checkbox associated with the script, and all code will
be run under the actively logged in user only with their security permissions. The user
access token that will be used is the limited user access token. You will not be able to
do any admin level stuff because TRMM's RunAsUser doesn't have a UAC elevation
capability to call and request a 2nd access token with admin privileges.
If you have strict firewall rules these are the only outbound rules from the agent
needed for all functionality:
1. All agents have to be able to connect outbound to TRMM server on the 3 domain
names on port 443.
Unsigned Agents
Signed Agents
https://docs.tacticalrmm.com/howitallworks/ 17/21
09/08/2024, 12:12 How it all Works - Tactical RMM Documentation
Windows Automatically
If the Tactical agent is connecting to your server, you can use the Community scripts:
Windows Manually
Open CMD as admin on the problem computer and stop the agent services:
Note
There's a Community script that will collect your agent log called TacticalRMM - Get
Agent Logs .
Linux
vi /etc/systemd/system/tacticalagent.service
https://docs.tacticalrmm.com/howitallworks/ 18/21
09/08/2024, 12:12 How it all Works - Tactical RMM Documentation
Change
ExecStart=/usr/local/bin/tacticalagent -m svc
to
then
systemctl daemon-reload
systemctl restart tacticalagent.service
Mac
In terminal window:
Use Agents right click menu > Agent recovery > Mesh Agent
Use Agents right click menu > Agent recovery > Tactical Agent
...OR
MeshCentral is online
Run
https://docs.tacticalrmm.com/howitallworks/ 19/21
09/08/2024, 12:12 How it all Works - Tactical RMM Documentation
Start / Restart Tactical RMM service from either services.msc or from Admin Command
prompt:
The current Tactical RMM Windows Update process is relatively simple atm. As of right
now, it is in the top 3 big items to be reworked.
Use the Automation Policy > Patch Policy to apply it to machines. The Other
category is poorly named by Microsoft, those are the regular monthly updates and
should be auto-approved.
Note
If you want more control of Windows patching right now, look into a script-based
implementation of PSWindowsUpdate.
Be aware: When you install the Tactical RMM Agent on a Windows computer it sets
this:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU
AUOptions (REG_DWORD):
1: Keep my computer up to date is disabled in Automatic Updates.
If you want to resume normal Windows patching and disable Tactical RMM updating
functions, you should run this.
Where does it get updates from? TRMM gets the list of Windows updates using this
Microsoft API: https://docs.microsoft.com/en-us/windows/win32/api/_wua/
The Tactical RMM server updates an agent's patch list every 8 hours based on the
patch policy to check for what to update, and what's installed.
https://docs.tacticalrmm.com/howitallworks/ 20/21
09/08/2024, 12:12 How it all Works - Tactical RMM Documentation
Note
Currently if the agent is not online at the time the patch policy is set to install, there is no
"install as soon as it comes online".
Tip
Trying to get reboots to happen at specific times after Windows update? Set your Reboot
After Installation to: Never
Then create a task that reboots at your preferred date/time
Log Files
error.log Nginx log for all errors on all TRMM URL's: rmm, api and mesh
tail -f /rmm/api/tacticalrmm/tacticalrmm/private/log/error.log
access.log Nginx log for auditing access on all URL's: rmm, api and mesh (this is a
large file, and should be cleaned periodically)
tail -f /rmm/api/tacticalrmm/tacticalrmm/private/log/access.log
tail -f /rmm/api/tacticalrmm/tacticalrmm/private/log/django_debug.log
https://docs.tacticalrmm.com/howitallworks/ 21/21