# How to Setup Orchestrator

**URL:** https://forum.hypercore.one/t/how-to-setup-orchestrator/61
**Category:** How To
**Created:** [May 16, 2023, 2:02pm UTC](https://forum.hypercore.one/t/how-to-setup-orchestrator/61 "2023-05-16T14:02:25Z")
**Posts on this page:** 14
**Page:** 2

<div class="post-metadata">

### Author: ![Chadass](https://forum.hypercore.one/user_avatar/forum.hypercore.one/chadass/32/32_2.png) [@Chadass](https://forum.hypercore.one/u/Chadass)
#### Post date: [June 13, 2023, 9:31pm UTC](https://forum.hypercore.one/t/how-to-setup-orchestrator/61/40 "2023-06-13T21:31:06Z")

</div>

I will try adding my publeys

---

<div class="post-metadata">

### Author: ![0x3639](https://forum.hypercore.one/user_avatar/forum.hypercore.one/0x3639/32/33_2.png) [@0x3639](https://forum.hypercore.one/u/0x3639)
#### Post date: [June 13, 2023, 10:02pm UTC](https://forum.hypercore.one/t/how-to-setup-orchestrator/61/41 "2023-06-13T22:02:08Z")

</div>

I would not try that. The pubkey gets auto populated by the orchestrator. How do you know the orchestrator is failing? Status = stopped?

---

<div class="post-metadata">

### Author: ![Chadass](https://forum.hypercore.one/user_avatar/forum.hypercore.one/chadass/32/32_2.png) [@Chadass](https://forum.hypercore.one/u/Chadass)
#### Post date: [June 13, 2023, 10:39pm UTC](https://forum.hypercore.one/t/how-to-setup-orchestrator/61/42 "2023-06-13T22:39:26Z")

</div>

I tried the solution you gave again, I noticed my config.json got back to glbalstate 3 and the old buggy values. Redoing the process.

EDIT: aaaand doesn’t work.

The link to get the last update is wget [https://github.com/HyperCore-Team/orchestrator/releases/download/v0.0.3-alphanet/orchestrator-linux-amd64.zip](https://github.com/HyperCore-Team/orchestrator/releases/download/v0.0.3-alphanet/orchestrator-linux-amd64.zip) right ?

---

<div class="post-metadata">

### Author: ![mehowz](https://forum.hypercore.one/user_avatar/forum.hypercore.one/mehowz/32/75_2.png) [@mehowz](https://forum.hypercore.one/u/mehowz)
#### Post date: [June 13, 2023, 11:19pm UTC](https://forum.hypercore.one/t/how-to-setup-orchestrator/61/43 "2023-06-13T23:19:11Z")

</div>

Just to confirm you’re overwriting the old file (if any) and unzipping the new one right?

I can confirm that my GlobalState remains 0.

---

<div class="post-metadata">

### Author: ![Chadass](https://forum.hypercore.one/user_avatar/forum.hypercore.one/chadass/32/32_2.png) [@Chadass](https://forum.hypercore.one/u/Chadass)
#### Post date: [June 13, 2023, 11:49pm UTC](https://forum.hypercore.one/t/how-to-setup-orchestrator/61/44 "2023-06-13T23:49:58Z")

</div>

I will redo the process tomorrow

---

<div class="post-metadata">

### Author: ![Chadass](https://forum.hypercore.one/user_avatar/forum.hypercore.one/chadass/32/32_2.png) [@Chadass](https://forum.hypercore.one/u/Chadass)
#### Post date: [June 14, 2023, 9:24am UTC](https://forum.hypercore.one/t/how-to-setup-orchestrator/61/45 "2023-06-14T09:24:58Z")

</div>

I have redone all the process and still nothing works for me. I drop my configuration file here in case Sumamu see it:

{  
“DataPath”: “/root/.orchestrator”,  
“EventsPath”: “”,  
“QueuesPath”: “”,  
“GlobalState”: 0,  
“EvmAddress”: “redacted”,  
“Networks”: {  
“BSC”: {  
“Urls”: [  
“ws://127.0.0.1:8545”  
],  
“FilterQuerySize”: 2000  
},  
“Ethereum”: {  
“Urls”: [  
“redacted”  
],  
“FilterQuerySize”: 2000  
},  
“Zenon”: {  
“Urls”: [  
“ws://127.0.0.1:35998”  
],  
“FilterQuerySize”: 0  
}  
},  
“TssConfig”: {  
“Port”: 55055,  
“PublicKey”: “”,  
“DecompressedPublicKey”: “”,  
“LocalPubKeys”: null,  
“Bootstrap”: “”,  
“PubKeyWhitelist”: {},  
“BaseDir”: “/root/.orchestrator/tss”,  
“BaseConfig”: {  
“PartyTimeout”: 160000000000,  
“KeyGenTimeout”: 900000000000,  
“KeySignTimeout”: 240000000000,  
“KeyRegroupTimeout”: 60,  
“PreParamTimeout”: 900000000000,  
“EnableMonitor”: false  
}  
},  
“ProducerKeyFileName”: “producer”,  
“ProducerKeyFilePassphrase”: “redacted”,  
“ProducerIndex”: 0  
}

---

<div class="post-metadata">

### Author: ![0x3639](https://forum.hypercore.one/user_avatar/forum.hypercore.one/0x3639/32/33_2.png) [@0x3639](https://forum.hypercore.one/u/0x3639)
#### Post date: [June 14, 2023, 10:05am UTC](https://forum.hypercore.one/t/how-to-setup-orchestrator/61/46 "2023-06-14T10:05:12Z")

</div>

> [@mehowz](#):
>
> overwriting the old file

@Chadass I was actually making this mistake myself… until Mehowz pointed it out.

---

<div class="post-metadata">

### Author: ![Chadass](https://forum.hypercore.one/user_avatar/forum.hypercore.one/chadass/32/32_2.png) [@Chadass](https://forum.hypercore.one/u/Chadass)
#### Post date: [June 14, 2023, 10:51am UTC](https://forum.hypercore.one/t/how-to-setup-orchestrator/61/47 "2023-06-14T10:51:39Z")

</div>

So it’s

`wget https://github.com/HyperCore-Team/orchestrator/releases/download/v0.0.3-alphanet/orchestrator-linux-amd64.zip`

```auto
unzip orchestrator-linux-amd64.zip

```

And “A” ?

Then you edit the “old” config file right?

EDIT : It seems to work for now, I forgot `sudo cp orchestrator-linux-amd64 /usr/local/bin/`

EDIT2 : plz ser add mine here, producer ends with “tjjzl” [Orchestrators](https://status.hypercore.one/status/orchestrators)

---

<div class="post-metadata">

### Author: ![0x3639](https://forum.hypercore.one/user_avatar/forum.hypercore.one/0x3639/32/33_2.png) [@0x3639](https://forum.hypercore.one/u/0x3639)
#### Post date: [June 14, 2023, 12:28pm UTC](https://forum.hypercore.one/t/how-to-setup-orchestrator/61/48 "2023-06-14T12:28:22Z")

</div>

```auto
wget -O orchestrator-linux-amd64.zip https://github.com/HyperCore-Team/orchestrator/releases/download/v0.0.3-alphanet/orchestrator-linux-amd64.zip
unzip orchestrator-linux-amd64.zip
sudo systemctl stop orchestrator
sudo cp orchestrator-linux-amd64 /usr/local/bin/
sudo systemctl start orchestrator
# check status of orchestrator by running next command
sudo systemctl status orchestrator

```

Note: it is `wget -O`

I don’t think you are actually upgrading the orchestrator. What we discovered was that when you `wget` a file with a name that already exists, wget renames the file and adds `.1` after `.zip`.

Do an `ls` in your download directory and do you see many files with `.zip.1`, `.zip.2`. if so those are the new downloads. If you are unzipping `.zip` that is the very first download. And you are unziping it and replace the same binary over and over.

when you do `wget -O` it will overwrite the filename and will NOT add a number at the end.

---

<div class="post-metadata">

### Author: ![0x3639](https://forum.hypercore.one/user_avatar/forum.hypercore.one/0x3639/32/33_2.png) [@0x3639](https://forum.hypercore.one/u/0x3639)
#### Post date: [June 14, 2023, 12:31pm UTC](https://forum.hypercore.one/t/how-to-setup-orchestrator/61/49 "2023-06-14T12:31:43Z")

</div>

I’ve deleted a few posts in this thread that are confusing (mostly by me). As the instructions change I’m updating the original post.

---

<div class="post-metadata">

### Author: ![mehowz](https://forum.hypercore.one/user_avatar/forum.hypercore.one/mehowz/32/75_2.png) [@mehowz](https://forum.hypercore.one/u/mehowz)
#### Post date: [June 25, 2023, 3:56pm UTC](https://forum.hypercore.one/t/how-to-setup-orchestrator/61/50 "2023-06-25T15:56:01Z")

</div>

I can’t edit this post, so here is the corrected version:

* * *

If you want the orchestrator to restart multiple times after it crashes (in instances where perhaps it can’t connect to the Zenon / ETH node and needs to try again/wait between attempts):

@sumamu had shared some configs, and here is a variation of it:

Stop the orchestrator:

```auto
sudo systemctl stop orchestrator

```

Followed by:

```auto
sudo nano /etc/systemd/system/orchestrator.service

```

Then add `StartLimitIntervalSec=300s`, `StartLimitBurst=10` and `RestartSec=60` as seen below:

```auto
[Unit]
Description=Orchestrator Service
After=network.target
StartLimitIntervalSec=300s
StartLimitBurst=10

[Service]
User=root
Group=root
ExecStart=/usr/local/bin/orchestrator-linux-amd64
ExecStop=/usr/bin/pkill -9 orchestrator-linux-amd64
Restart=on-failure
RestartSec=60
TimeoutStopSec=10s
TimeoutStartSec=10s
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=orchestrator

[Install]
WantedBy=multi-user.target

```

Then:

```auto
sudo systemctl daemon-reload
sudo systemctl start orchestrator

```

In this configuration:

StartLimitIntervalSec=300s: systemd will observe restart attempts within a 300 second (5 minute) interval.

StartLimitBurst=10: If the service fails and restarts more than 10 times within the above interval, systemd will stop trying to restart it until the interval has passed.

Restart=on-failure: The service will be restarted when the process exits with a non-zero exit code.

RestartSec=60: systemd will wait for 60 seconds before trying to restart the service after it has failed.

So, in a scenario where the service continually fails, the Orchestrator service will restart up to 10 times within a 5-minute window, with a delay of 60 seconds between each restart attempt. After 10 failed attempts within this window, systemd will stop trying to restart the service until the 5-minute interval has passed.

---

<div class="post-metadata">

### Author: ![0x3639](https://forum.hypercore.one/user_avatar/forum.hypercore.one/0x3639/32/33_2.png) [@0x3639](https://forum.hypercore.one/u/0x3639)
#### Post date: [June 27, 2023, 12:19am UTC](https://forum.hypercore.one/t/how-to-setup-orchestrator/61/51 "2023-06-27T00:19:24Z")

</div>

I just fixed the edit post issue. Have you had success with this? I did not update the original instructions because I have not tested them. If this is working well, I’ll try to update my node and then update the original instructions.

---

<div class="post-metadata">

### Author: ![mehowz](https://forum.hypercore.one/user_avatar/forum.hypercore.one/mehowz/32/75_2.png) [@mehowz](https://forum.hypercore.one/u/mehowz)
#### Post date: [June 28, 2023, 1:05am UTC](https://forum.hypercore.one/t/how-to-setup-orchestrator/61/52 "2023-06-28T01:05:29Z")

</div>

Update the binary in 1 command (takes a total of 25 seconds to execute). Include the parentheses when copy/pasting the whole code block – **and remember to update the the URL path to the .zip file between releases!**

```auto
(
wget -O orchestrator-linux-amd64.zip https://github.com/HyperCore-Team/orchestrator/releases/download/v0.0.3b-alphanet/orchestrator-linux-amd64.zip
sleep 5 && unzip -o orchestrator-linux-amd64.zip
sleep 5 && sudo systemctl stop orchestrator
sleep 5 && sudo cp orchestrator-linux-amd64 /usr/local/bin/
sleep 5 && sudo systemctl start orchestrator
sleep 5 && sudo systemctl status orchestrator
)

```

---

<div class="post-metadata">

### Author: ![0x3639](https://forum.hypercore.one/user_avatar/forum.hypercore.one/0x3639/32/33_2.png) [@0x3639](https://forum.hypercore.one/u/0x3639)
#### Post date: [June 28, 2023, 1:41am UTC](https://forum.hypercore.one/t/how-to-setup-orchestrator/61/53 "2023-06-28T01:41:31Z")

</div>

Here is an upgrade script to automatically the orchestrator.

`sudo apt-get install jq`

`nano upgrade.sh`

```auto
#!/bin/bash

set -e

# Get the latest release from GitHub API
latest_release=$(curl -s https://api.github.com/repos/HyperCore-Team/orchestrator/releases/latest | jq -r ".assets[] | select(.name | contains(\"linux-amd64.zip\")) | .browser_download_url")

# Download the latest release
wget -O orchestrator-linux-amd64.zip "$latest_release"
unzip -o orchestrator-linux-amd64.zip
sudo systemctl stop orchestrator
sleep 5
sudo cp orchestrator-linux-amd64 /usr/local/bin/
sudo systemctl start orchestrator
sleep 5
sudo systemctl status orchestrator

```

To use the script, save the above lines in a file, let’s say `upgrade.sh` . Then, run `chmod +x upgrade.sh` to make it executable. You can then run it with `./upgrade.sh` .

[Previous page](https://forum.hypercore.one/t/how-to-setup-orchestrator/61.md?page=1)
