Uninstalling

Gametron can be uninstalled by running a few commands using SSH. The uninstallation process differs based on what data you would like to keep and whether both Gametron master and slave are running on the same server.

 

Master

1. Deleting the master

There are two ways to delete the master, depending on whether you have Gametron slave running on the same server or not.

If Gametron slave is running on the same server, run the following command to delete the slave:

docker container rm -f gametron-master gametron-mysql

If Gametron slave is not running on the same server, run the following command:

docker container rm -f gametron-master gametron-mysql gametron-certbot gametron-watchtower

 

2. Deleting master files and database

If Gametron slave is running on the same server, run the following command to delete all master files and database:

rm -rf /var/lib/gametron/master

If Gametron slave is not running on the same server, run the following command:

rm -rf /var/lib/gametron

 

Slave

1. Deleting the slave

There are two ways to delete the slave, depending on whether you have Gametron master running on the same server or not.

If Gametron master is running on the same server, run the following command to delete the slave:

docker container rm -f gametron-slave

If Gametron master is not running on the same server, run the following command:

docker container rm -f gametron-slave gametron-certbot gametron-watchtower

 

2. Deleting game servers

Stop and delete all game servers running on the slave by running the following command for each game server on the slave:

docker container rm -f server_<server_id>

Replace <server_id> with the ID of each server running on the slave. You can find all server IDs in your Gametron master on the Server Management page.

If you want to delete all servers at once, you can run the command below instead. Make sure no other Docker containers are deleted by running the command (see the warning below).

If you have any other Docker containers running on the server whose name starts with “server_", they will be deleted if you run the following command. In this case it’s recommended to delete all game servers individually.

for i in $(docker container ls -aq --filter="name=server_*"); do
    docker container rm -f "$i"
done

 

3. Deleting slave files and database

The following command will also delete all files of each game server hosted on the slave. If you want to keep game server files, take a backup of the /var/lib/gametron/slave/servers directory first.

If Gametron master is running on the same server, run the following command to delete all slave files and database:

rm -rf /var/lib/gametron/slave

If Gametron master is not running on the same server, run the following command:

rm -rf /var/lib/gametron

 

Deleting SSL certificate

If you want to delete the SSL certificate created by Let’s Encrypt during installation, run the following command:

rm -rf /etc/letsencrypt/archive/<hostname>
rm -rf /etc/letsencrypt/live/<hostname>
rm -f /etc/letsencrypt/renewal/<hostname>.conf

Replace <hostname> with the hostname you used during installation.