summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPerflyst <mail@perflyst.de>2019-01-23 21:12:02 +0100
committerGitHub <noreply@github.com>2019-01-23 21:12:02 +0100
commit03aa11b4123622284a4cfc4407d99bd94d1e8f71 (patch)
tree7856c1ca1c2f062eedbc3c4cdd96516526530138
parent5e272db8f524a1cdde9c834123a5f56ad5492df4 (diff)
downloadinvidious-03aa11b4123622284a4cfc4407d99bd94d1e8f71.tar.gz
invidious-03aa11b4123622284a4cfc4407d99bd94d1e8f71.tar.bz2
invidious-03aa11b4123622284a4cfc4407d99bd94d1e8f71.zip
Rewrite installation guide
-rw-r--r--README.md92
1 files changed, 51 insertions, 41 deletions
diff --git a/README.md b/README.md
index 97c9a2f8..b88b89f6 100644
--- a/README.md
+++ b/README.md
@@ -57,63 +57,84 @@ $ docker volume rm invidious_postgresdata
$ docker-compose build
```
-### Arch Linux:
+### Linux:
+
+#### Install dependencies
```bash
-# Install dependencies
-$ sudo pacman -S shards crystal imagemagick librsvg
+# Arch Linux
+$ sudo pacman -S shards crystal imagemagick librsvg postgresql
-# Setup PostgresSQL
-$ sudo systemctl enable postgresql
-$ sudo systemctl start postgresql
-$ sudo -i -u postgres
-$ createuser -s YOUR_USER_NAME
-$ createdb YOUR_USER_NAME
-$ exit
+# Ubuntu or Debian
+$ curl -sSL https://dist.crystal-lang.org/apt/setup.sh | sudo bash
+$ sudo apt update
+$ sudo apt install crystal libssl-dev libxml2-dev libyaml-dev libgmp-dev libreadline-dev librsvg2-dev postgresql imagemagick libsqlite3-dev
+```
-# Setup Invidious
+#### Add invidious user and clone repository
+
+```bash
+$ useradd -m invidious
+$ sudo -i -u invidious
$ git clone https://github.com/omarroth/invidious
-$ cd invidious
-$ ./setup.sh
-$ shards
-$ crystal build src/invidious.cr --release
+$ exit
```
-### On Ubuntu:
+#### Setup PostgresSQL
```bash
-# Install dependencies
-$ curl -sSL https://dist.crystal-lang.org/apt/setup.sh | sudo bash
-$ sudo apt update
-$ sudo apt install crystal libssl-dev libxml2-dev libyaml-dev libgmp-dev libreadline-dev librsvg2-dev postgresql imagemagick libsqlite3-dev
-
-# Setup PostgreSQL
$ sudo systemctl enable postgresql
$ sudo systemctl start postgresql
$ sudo -i -u postgres
-$ createuser -s YOUR_USER_NAME_HERE
-$ createdb YOUR_USER_NAME_HERE
+$ psql -c "CREATE USER kemal WITH PASSWORD 'kemal';"
+$ createdb -O kemal invidious
+$ psql invidious < /home/invidious/invidious/config/sql/channels.sql
+$ psql invidious < /home/invidious/invidious/config/sql/videos.sql
+$ psql invidious < /home/invidious/invidious/config/sql/channel_videos.sql
+$ psql invidious < /home/invidious/invidious/config/sql/users.sql
+$ psql invidious < /home/invidious/invidious/config/sql/nonces.sql
$ exit
+```
-# Setup Invidious
-$ git clone https://github.com/omarroth/invidious
+#### Setup Invidious
+
+```bash
+$ sudo -i -u invidious
$ cd invidious
-$ ./setup.sh
$ shards
$ crystal build src/invidious.cr --release
+# test compiled binary
+$ ./invidious # stop with ctrl c
+$ exit
+```
+
+#### systemd service
+```bash
+$ sudo cp invidious.service /etc/systemd/system/invidious.service
+$ sudo systemctl enable invidious.service
+$ sudo systemctl start invidious.service
```
-### On OSX:
+### OSX:
```bash
# Install dependencies
$ brew update
$ brew install shards crystal-lang postgres imagemagick librsvg
-# Setup Invidious
+# Clone repository and setup postgres database
$ git clone https://github.com/omarroth/invidious
$ cd invidious
-$ ./setup.sh
+$ brew services start postgresql
+$ psql -c "CREATE ROLE kemal WITH LOGIN PASSWORD 'kemal';"
+$ createdb invidious -U kemal
+$ psql invidious < config/sql/channels.sql
+$ psql invidious < config/sql/videos.sql
+$ psql invidious < config/sql/channel_videos.sql
+$ psql invidious < config/sql/users.sql
+$ psql invidious < config/sql/nonces.sql
+
+# Setup Invidious
$ shards
$ crystal build src/invidious.cr --release
```
@@ -121,7 +142,6 @@ $ crystal build src/invidious.cr --release
## Usage:
```bash
-$ crystal build src/invidious.cr --release
$ ./invidious -h
Usage: invidious [arguments]
-b HOST, --bind HOST Host to bind (defaults to 0.0.0.0)
@@ -147,16 +167,6 @@ $ curl -fsSLo- https://raw.githubusercontent.com/samueleaton/sentry/master/insta
$ ./sentry
```
-## Optional
-
-Create a systemd service to run Invidious in background. Edit `invidious.service` to change your installation path and log location. Than copy and enable the systemd service.
-
-```
-$ sudo cp invidious.service /etc/systemd/system/invidious.service
-$ sudo systemctl enable invidious.service
-$ sudo systemctl start invidious.service
-```
-
## Extensions
- [Alternate Tube Redirector](https://addons.mozilla.org/en-US/firefox/addon/alternate-tube-redirector/): Automatically open Youtube Videos on alternate sites like Invidious or Hooktube.