mirror of
https://github.com/Viren070/tmdb-addon.git
synced 2025-12-01 23:18:11 +01:00
42d40c1b32
- Rewrite README.md with improved structure and markdown formatting - Add detailed documentation files: - self-hosting.md: Complete guide for deployment (#66) - development.md: Development setup and workflow - contributing.md: Contribution guidelines - api.md: API endpoints and usage The documentation now includes: - Clear local development setup instructions - Detailed deployment guides (Docker and manual) - Step-by-step environment configuration - API reference with examples - Development workflow guidelines - Troubleshooting sections - Best practices and code examples Closes #66
3.7 KiB
3.7 KiB
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
- Clone the repository:
git clone https://github.com/mrcanelas/tmdb-addon.git
cd tmdb-addon
- Install dependencies:
npm install
-
Configure environment variables:
- Copy
.env.exampleto.env - Fill in the required variables in the
.envfile
- Copy
-
Build the project:
npm run build
- 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
- Visit TMDB Developer
- Create an account if you don't have one
- Request an API key
- Use the API Read Access Token (v4 auth)
Fanart.tv API
- Visit Fanart.tv API
- Register for an account
- Request a personal API key
MongoDB
- Create an account on MongoDB Atlas
- Set up a free cluster
- Get your connection string
- 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.jsonhttp://your_domain:1337/configure
To add the addon to Stremio, use the URL:
stremio://your_domain:1337/manifest.json
Troubleshooting
Common Issues
-
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
-
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
-
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.