---
description: Process for updating code on the eVOLVER Server (Raspberry Pi)
---

# Updating the eVOLVER Server

If you have any questions or concerns not addressed here, reach out on [this forum post](https://www.evolver.bio/t/updating-the-evolver-server/69).

{% hint style="info" %}
You can download the latest version of the code on our [GitHub release page](https://github.com/FYNCH-BIO/evolver/releases). If you do, skip step 3 below.
{% endhint %}

## Updating the RPi GUI

### 1. SCP File to Pi

On Mac: `scp evolver-electron-2.0.0.AppImage pi@<your_evolver_ip>:.`

On Windows, use [WinSCP](https://winscp.net/eng/index.php) or [Filezilla](https://filezilla-project.org/) to drag the file to `/users/pi/home/`

### 2. Change Permissions to AppImage

First, ssh to the Pi:

`ssh pi@<your_evolver_ip>`

Next, make the file executable using chmod:

`chmod +x evolver-electron-2.0.0.AppImage`

### 3. Change What AppImage the Pi uses at startup

`sudo nano /etc/xdg/openbox/autostart`

Scroll down and change the following line to correspond with the version you are using.

```
# Start Electron App in Kiosk Mode
./evolver-electron-2.0.0.AppImage
```

### 4. Reboot the eVOLVER

You can either power cycle (turn off the eVOLVER completely, wait a few seconds, then turn it back on) or you can use the following command:

`sudo reboot now`

## Updating the eVOLVER Server Code

#### [Mac/UNIX](#mac-unix)

#### [Windows](#undefined)

### Mac/Unix

1. Open up a terminal of your choice (I use [iTerm2](https://iterm2.com/)).
2. Use the `cd` command to navigate to the eVOLVER server software.

![](https://3394537773-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYy5AdmKzUTn7D8n357Md%2Fuploads%2FXmamEtCK8yIl4yQXoA7a%2Fcd.png?alt=media\&token=628a028f-81da-4c2e-b2f8-1b75f4b6e77e)

3\. Use `git` to pull the latest version of the code. I have my own fork, so I need to pull the code from an upstream master branch. `git pull origin master` should work for most setups.

![](https://3394537773-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYy5AdmKzUTn7D8n357Md%2Fuploads%2FgkDx100uRIK4VBrXo9bf%2Fgitpull.png?alt=media\&token=36619942-8792-47a5-b839-15a7ed425e61)

4\. I like to use the  `scp` command to transfer the files over to the eVOLVER. `scp` stands for secure copy - it uses`ssh` to transfer files between computers on a network. You can also use any GUI based tool - [Filezilla](https://filezilla-project.org/) is a popular one. I also normally only transfer the python files, and not the entire evolver directory. The server saves calibration files and other configurations which we don't want to modify by accident. To transfer only the relevant python files, run the following command:

{% hint style="info" %}
Replace the \<eVOLVER\_IP> text below with the actual eVOLVER IP.
{% endhint %}

`scp evolver/evolver/*.py pi@<eVOLVER_IP>:/home/pi/evolver/evolver`

![](https://3394537773-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYy5AdmKzUTn7D8n357Md%2Fuploads%2FRiz6pDHSnqsX7a1nRXyW%2Fscpcommand.png?alt=media\&token=431e7512-cdf1-4a9e-9e3b-141bc13ba3e2)

5\. Now that the files have been updated, the last step is to restart the server so the changes will take effect. `ssh` over to the evolver and run `sudo supervisorctl`. Then enter `restart evolver`, and you're done!

![](https://3394537773-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYy5AdmKzUTn7D8n357Md%2Fuploads%2FmLrsWOLjfSsn1uP9IflJ%2Frestart.png?alt=media\&token=15eb486f-343d-423d-a833-edab1510a98c)

### Windows

Follow steps 1-3 as described above.

4\. Use [WinSCP](https://winscp.net/eng/index.php) or [Filezilla](https://filezilla-project.org/) to drag the .py files into the correct locations. Be careful not to overwrite other types of files.

5\. Most Windows 10 computers have a Windows 10 SSH client (such as OpenSSH Client) so you can log into the Raspberry Pi from Command Prompt in order to restart the server. Simply type `ssh pi@<eVOLVER_IP>` (replace \<eVOLVER\_IP> with your actual eVOLVER IP) and log in. From here you can run `sudo supervisorctl` as normal.
