2019-10-20 16:30:23 -05:00
## Installing Satyr
A more detailed walkthrough.
### System Dependencies
2019-12-05 18:37:26 -06:00
Install ffmpeg(>= 4.2.1) and mysql through your distribution's package manager.
2020-06-27 23:39:57 -05:00
See [this page ](https://nodejs.org/en/download/package-manager/ ) for instructions on installing node v10.
2020-10-17 21:20:32 -05:00
If the version in your distro's package manager is different, you can install [n ](https://www.npmjs.com/package/n ) through npm to manage node versions.
2019-10-20 16:30:23 -05:00
### Installing Satyr
2020-06-27 23:39:57 -05:00
Before starting, you should create a system user to run the satyr service.
2019-10-20 16:30:23 -05:00
Clone the repository and change to the directory
```bash
git clone https://gitlab.com/knotteye/satyr.git
cd satyr
```
Install nodejs dependencies
```bash
npm install
```
Run the setup script to generate a config file and database setup.
```bash
npm run setup
```
2020-06-27 23:39:57 -05:00
Look over the generated config file in config/generated.yml, and move it to config/config.yml when you're satisfied.
2019-10-20 16:30:23 -05:00
Run the setup script for the database.
```bash
sudo mysql
source install/db_setup.sql;
```
2019-12-05 18:37:26 -06:00
Then start the server.
2019-10-20 16:30:23 -05:00
```bash
2019-12-21 17:23:00 -06:00
npm run start
2019-10-20 16:30:23 -05:00
```
2020-06-27 23:39:57 -05:00
It is reccomended that you run Satyr behind a TLS terminating reverse proxy like nginx. An example configuration can be found in CONFIGURATION.md
2019-11-10 08:27:00 -06:00
An example systemd service is provided at install/satyr.service. It assumes you've installed satyr into /opt/satyr, and created a satyr user with the home directory /var/lib/satyr for the purpose of running the service.
## Updating Satyr
2020-06-27 23:39:57 -05:00
Updating should be as simple as pulling the latest code and dependencies, then restarting the server.
2019-11-10 08:27:00 -06:00
```bash
git pull
npm i
2019-12-05 18:37:26 -06:00
npm update
2019-11-10 08:27:00 -06:00
```
Then restart the server.
## Migrating Satyr
2020-06-27 23:39:57 -05:00
To backup and restore, you will need to export the mysqlDB. Restore the new database from the backup, then copy the config and site directories to the new location.