Skip to content

Latest commit

 

History

History
144 lines (114 loc) · 3.68 KB

self-hosting.md

File metadata and controls

144 lines (114 loc) · 3.68 KB

Self-Hosting Guide

This guide provides instructions for self-hosting the TMDB Addon for Stremio.

Table of Contents

Docker Installation (Recommended)

The easiest way to run this addon is using Docker. The image is available on Docker Hub.

docker run -d \
  --name tmdb-addon \
  -p 1337:1337 \
  -e MONGODB_URI=your_mongodb_uri \
  -e FANART_API=your_fanart_key \
  -e TMDB_API=your_tmdb_key \
  -e HOST_NAME=http://your_domain:1337 \
  mrcanelas/tmdb-addon:latest

Using Docker Compose

Create a docker-compose.yml file:

version: '3'
services:
  tmdb-addon:
    image: mrcanelas/tmdb-addon:latest
    container_name: tmdb-addon
    ports:
      - "1337:1337"
    environment:
      - MONGODB_URI=your_mongodb_uri
      - FANART_API=your_fanart_key
      - TMDB_API=your_tmdb_key
      - HOST_NAME=http://your_domain:1337
    restart: unless-stopped

Then run:

docker-compose up -d

Manual Installation

  1. Clone the repository:
git clone https://github.com/mrcanelas/tmdb-addon.git
cd tmdb-addon
  1. Install dependencies:
npm install
  1. Configure environment variables:

    • Copy .env.example to .env
    • Fill in the required variables in the .env file
  2. Build the project:

npm run build
  1. Start the server:
node addon/server.js

Environment Variables

Variable Description Required
MONGODB_URI MongoDB connection URI Yes
FANART_API Fanart.tv API key Yes
TMDB_API TMDB API key Yes
HOST_NAME Public URL of your addon (e.g., http://your_domain:1337) Yes
PORT Server port (default: 1337) No

Getting API Keys

TMDB API

  1. Visit TMDB Developer
  2. Create an account if you don't have one
  3. Request an API key
  4. Use the API Read Access Token (v4 auth)

Fanart.tv API

  1. Visit Fanart.tv API
  2. Register for an account
  3. Request a personal API key

MongoDB

  1. Create an account on MongoDB Atlas
  2. Set up a free cluster
  3. Get your connection string
  4. Replace <password> in the connection string with your database user password

Verifying Installation

After installation, verify that the addon is working by accessing:

  • http://your_domain:1337/manifest.json
  • http://your_domain:1337/configure

To add the addon to Stremio, use the URL: stremio://your_domain:1337/manifest.json

Troubleshooting

Common Issues

  1. Cannot connect to MongoDB

    • Verify your MongoDB URI is correct
    • Ensure your IP is whitelisted in MongoDB Atlas
    • Check if the database user has correct permissions
  2. API Keys not working

    • Verify the keys are correctly copied
    • Check if the API services are operational
    • Ensure you're using the correct API key type
  3. Addon not accessible

    • Verify the port 1337 is open on your firewall
    • Check if the HOST_NAME variable matches your actual domain
    • Ensure your domain/IP is accessible from the internet

For additional help, please open an issue on GitHub.