From 8771411352bd4c1269e60522688b7b7bc0ed32f2 Mon Sep 17 00:00:00 2001 From: knotteye Date: Sun, 20 Oct 2019 16:30:23 -0500 Subject: [PATCH] Add more detailed installation instructions Add example systemd service --- docs/CONFIGURATION.md | 3 ++- docs/INSTALLATION.md | 35 +++++++++++++++++++++++++++++++++++ docs/README.md | 1 + install/satyr.service | 21 +++++++++++++++++++++ 4 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 docs/INSTALLATION.md create mode 100644 install/satyr.service diff --git a/docs/CONFIGURATION.md b/docs/CONFIGURATION.md index 4c01a44..f9bf420 100644 --- a/docs/CONFIGURATION.md +++ b/docs/CONFIGURATION.md @@ -19,8 +19,9 @@ saltRounds = 12 [ircd] enable = true #enable IRC peering +#unused for now ``` ### Web Frontend If you want to customize the front-end css, place a file with any changes you wish to make at site/local.css -You can change the logo by replacing site/logo.svg, or edit templates/base.njk to look for another source. \ No newline at end of file +You can change the logo by replacing site/logo.svg. \ No newline at end of file diff --git a/docs/INSTALLATION.md b/docs/INSTALLATION.md new file mode 100644 index 0000000..37792db --- /dev/null +++ b/docs/INSTALLATION.md @@ -0,0 +1,35 @@ +## Installing Satyr +A more detailed walkthrough. + +### System Dependencies +Install ffmpeg and mysql through your distribution's package manager. +See [this page](https://nodejs.org/en/download/package-manager/) for instructions on install node. Compatible versions are >=10. Nightly builds may fail to compile some of the native addons. + +### Installing Satyr +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 +``` +Look over the generated config file in config/generated.toml, and move it to config/local.toml when you're satisfied. +Run the setup script for the database. +```bash +sudo mysql +source install/db_setup.sql; +``` +Compile the code and start the server. +```bash +npm run build +npm start +``` + +It is reccomended that you run Satyr behind a TLS terminating reverse proxy, like nginx. +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. \ No newline at end of file diff --git a/docs/README.md b/docs/README.md index e7427b2..1dbca55 100644 --- a/docs/README.md +++ b/docs/README.md @@ -10,6 +10,7 @@ npm install npm run setup npm run build ``` +Follow the instructions after setup runs. ### Run the server ```bash diff --git a/install/satyr.service b/install/satyr.service new file mode 100644 index 0000000..29d2ccb --- /dev/null +++ b/install/satyr.service @@ -0,0 +1,21 @@ +[Unit] +Description=A livestreaming server. +After=network.target + +[Service] +ExecReload=/bin/kill $MAINPID +KillMode=process +Restart=on-failure + +User=satyr +Environment="HOME=/var/lib/satyr" +WorkingDirectory=/opt/satyr +ExecStart=/usr/bin/npm start + +PrivateTmp=true +ProtectHome=true +ProtectSystem=full +NoNewPrivileges=true + +[Install] +WantedBy=multi-user.target \ No newline at end of file