# General Maintenance

### Setting Alterdot daemon to start automatically between server restarts

You can easily setup the alterdot daemon to restart when your server reboots. This means one less task to worry about during server maintenance

`cron` is job scheduler that is used in Unix environments. You can set it up to execute certain scripts or launch programs at specific times. While this guide will not go into the details of `cron`, it will cover a special trigger for `cron @reboot`.&#x20;

For this example, we assume that the alterdotd binary is located at /home/myuser/alterdot. Invoke the cron editor through the command crontab -e. If this is the first time, you will be asked to choose the text editor. Enter the following as the last line

`@reboot /home/myuser/alterdot/alterdotd --daemon`

Save the file. You will see a message that the crontab was successfully installed. You can view that the cron is setup by executing the command `crontab -l`

An alternate to cron is to setup alterdot as a service, but this way is easier and works across different linux flavors.

### Updating your Masternode to the latest version

* Log in to your server by using Putty or directly through SSH.
* Go inside the folder that contains your Alterdot client and shut it down by running the command: `./alterdot-cli stop`
* Exit this folder and download the latest Alterdot version using:

```
wget https://github.com/Alterdot/Alterdot/releases/download/v1.9.2.0/alterdot-v1.9.2-linux.tar.gz
```

* Extract the downloaded archive and copy its contents into a folder named `alterdot` for easier usage. If you already have this folder, the previous daemon and client will be overwritten.

```
tar -xzf alterdot-v1.9.2-linux.tar.gz
cp -f ./alterdot-v1.9.2-linux/alterdotd ./alterdot/
cp -f ./alterdot-v1.9.2-linux/alterdot-cli ./alterdot/
```

* Go into the `alterdot` folder and start your node.

```
cd alterdot
./alterdotd --daemon
```

* You can check whether or not your Masternode is running well by using these two commands:

`./alterdot-cli getinfo` will return the current state of your node, the number of blocks that it has synchronized, how many peers it's got, the version number and other things;

`./alterdot-cli masternode status` will return the current state of your Masternode, it should be labeled as `Ready` if it is running correctly.

### Lifting your Masternode ban (POSE\_BANNED)

In order to let the network know that your Masternode has resumed normal service, you have to create a Provider Update Service Transaction (ProUpServTx).

* Start your controller wallet (the one you used for registering the Masternode).
* Go to `Tools->Debug` console and run the following command:

```
protx update_service proTxHash ipAndPort operatorKey (operatorPayoutAddress feeSourceAddress)
```

Where:

* **proTxHash** is the hash of the registration transaction (ProRegTx). You can find it in your Masternode tab by right-clicking the Masternode you wish to update.
* **ipAndPort** is the IP and port of your Masternode in the format "`ip:port`"
* **operatorKey** is the BLS private key associated with this Masternode. You can find it in your alterdot.conf file present in the `.alterdot` folder of your server.
* **operatorPayoutAddress (optional)** is the address used for operator rewards. This is allowed only if you did initially specify an operator address in your registration transaction. Input an empty string like "" for this if you don't need it.
* **feeSourceAddress (optional)** is an address used to pay the fee for this transaction. The standard fee has to be paid in order for this transaction to be accepted into our blockchain so this is where you specify the address used for that.

Example:

```
protx update_service d6ec9a03e1251ac8c34178f47b6d763dc4ea6d96fd6eddb3c7aae2359e0f474a 140.82.59.51:31000 4308daa8de099d3d5f81694f6b618381e04311b9e0345b4f8b025392c33b0696 "" Ct6Cj6VcCfDxU5yweAT3NKKvm278rVbkhu

fad61c5f21cf3c0832f782c1444d3d2e2a8dbff39c5925c38033730e64ecc598
```

### More information

The core Alterdot codebase is based on Dash (DASH), so you can find additional information about the functioning of Masternodes and other maintenance instructions on their [Docs page](https://docs.dash.org/en/stable/masternodes/maintenance.html).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.alterdot.network/guides/masternode-setup/general-maintenance.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
