Skip to content


After installation take a look at the Post-install steps.

Note: Any PaaS or SaaS provider/software (Heroku, YunoHost, Repli...) are unsupported. Use them at your own risk. They WILL cause problems with Invidious and might even suspend your account for "abuse" since Invidious is heavy, bandwidth intensive and technically a proxy (and most providers don't like them). If you use one and want to report an issue, please mention which one you use.

Hardware requirements

Running Invidious requires at least 512MB of free RAM (so ~2G installed on the system), as long as it is restarted regularly, as recommended in the post-install configuration. Public instances should ideally have at least 4GB of RAM, 2vCPU, a 200 mbps link and 20TB of traffic (no data cap/unlimited traffic is preferred).

Compiling Invidious requires at least 2.5GB of free RAM (We recommend to have at least 4GB installed). If you have less (e.g on a cheap VPS) you can setup a SWAP file or partition, so the combined amount is >= 4GB.

Automated Installation

Invidious-Updater is a self-contained script that can automatically install and update Invidious.


The Invidious docker image is only available on Quay because, unlike Docker Hub, Quay is Free and Open Source Software. This is reflected in the docker-compose.yml file used in this walk-through.

Ensure Docker Engine and Docker Compose are installed before beginning.

Docker-compose method (production)

This method uses the pre-built Docker image from quay

Note: Currently the repository has to be cloned, this is because the file and the config/sql directory have to be mounted to the postgres container (See the volumes section in the docker-compose file below). This "problem" will be solved in the future.

git clone
cd invidious

Edit the docker-compose.yml with this content:

version: "3"

    # image: # ARM64/AArch64 devices
    restart: unless-stopped
      - ""
      # Please read the following file for a comprehensive list of all available
      # configuration options and their associated syntax:
          dbname: invidious
          user: kemal
          password: kemal
          host: invidious-db
          port: 5432
        check_tables: true
        # external_port:
        # domain:
        # https_only: false
        # statistics_enabled: false
      test: wget -nv --tries=1 --spider || exit 1
      interval: 30s
      timeout: 5s
      retries: 2
        max-size: "1G"
        max-file: "4"
      - invidious-db

    restart: unless-stopped
      - postgresdata:/var/lib/postgresql/data
      - ./config/sql:/config/sql
      - ./docker/
      POSTGRES_DB: invidious
      POSTGRES_USER: kemal
      test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]


Note: This compose is made for a true "production" setup, where Invidious is behind a reverse proxy. If you prefer to directly access Invidious, replace with 3000:3000 under the ports: section.

Docker-compose method (development)

This method builds a Docker image from source

git clone
cd invidious
docker-compose up

Manual Installation


Install Crystal

Follow the instructions for your distribution here:

Note: Invidious currently supports the following Crystal versions: 1.4.0 / 1.3.X / 1.2.X

Install the dependencies

Arch Linux

sudo pacman -S base-devel librsvg postgresql


sudo apt install libssl-dev libxml2-dev libyaml-dev libgmp-dev libreadline-dev postgresql librsvg2-bin libsqlite3-dev zlib1g-dev libpcre3-dev libevent-dev

RHEL based and RHEL-like systems (RHEL, Fedora, AlmaLinux, RockyLinux...)

sudo dnf install -y openssl-devel libevent-devel libxml2-devel libyaml-devel gmp-devel readline-devel postgresql librsvg2-devel sqlite-devel zlib-devel gcc

Add an Invidious user and clone the repository

useradd -m invidious
su - invidious
git clone

Set up PostgresSQL

systemctl enable --now postgresql
sudo -i -u postgres
psql -c "CREATE USER kemal WITH PASSWORD 'kemal';" # Change 'kemal' here to a stronger password, and update `password` in config/config.yml
createdb -O kemal invidious

Set up Invidious

su - invidious
cd invidious

# Configure config/config.yml as you like
cp config/config.example.yml config/config.yml 

# Deploy the database
./invidious --migrate


Note: If the command crystal build didn't work properly, you can build Invidious without lsquic may solve compatibilities issues:

crystal build src/ -Ddisable_quic --release

Systemd service

cp /home/invidious/invidious/invidious.service /etc/systemd/system/invidious.service
systemctl enable --now invidious.service


Install the dependencies

brew update
brew install shards crystal postgres imagemagick librsvg

Set up PostgresSQL

brew services start postgresql
psql -c "CREATE ROLE kemal WITH PASSWORD 'kemal';" # Change 'kemal' here to a stronger password, and update `password` in config/config.yml
createdb -O kemal invidious
psql invidious kemal < config/sql/channels.sql
psql invidious kemal < config/sql/videos.sql
psql invidious kemal < config/sql/channel_videos.sql
psql invidious kemal < config/sql/users.sql
psql invidious kemal < config/sql/session_ids.sql
psql invidious kemal < config/sql/nonces.sql
psql invidious kemal < config/sql/annotations.sql
psql invidious kemal < config/sql/privacy.sql
psql invidious kemal < config/sql/playlists.sql
psql invidious kemal < config/sql/playlist_videos.sql

Set up Invidious

git clone
cd invidious
shards install --production
crystal build src/ --release
cp config/config.example.yml config/config.yml 
# Configure config/config.yml how you want

Note: If the command crystal build didn't work properly, you can build Invidious without lsquic may solve compatibilities issues:

crystal build src/ -Ddisable_quic --release


Crystal, the programming language used by Invidious, doesn't support Windows yet but you can still install Invidious through two kinds of ways:

Post-install configuration:

Detailed configuration available in the configuration guide.

You must set a random generated value for the parameter hmac_key:! On Linux you can generate it using the command pwgen 20 1.

Because of various issues Invidious must be restarted often, at least once a day, ideally every hour.

If you use a reverse proxy, you must configure invidious to properly serve request through it:

https_only: true : if you are serving your instance via https, set it to true

domain: domain.ext: if you are serving your instance via a domain name, set it here

external_port: 443: if you are serving your instance via https, set it to 443

Update Invidious

Updating a Docker install

docker-compose pull
docker-compose up -d
docker image prune -f

Update a manual install

su - invidious
cd invidious
git pull
systemctl restart invidious.service



Logrotate configuration

echo "/home/invidious/invidious/invidious.log {
rotate 4
minsize 1048576
}" | tee /etc/logrotate.d/invidious.logrotate
chmod 0644 /etc/logrotate.d/invidious.logrotate