This guide will walk you through the process of deploying the Real-Debrid + StremThru + AIOStreams project. Please follow each step carefully to ensure a successful setup.
Open the aiostreams.env file in your project directory. You must edit the following lines to match your deployment:
-
Line 20:
BASE_URL- Set this to the public URL where your addon will be accessible.
- Example:
BASE_URL=https://aiostreams.yourdomain.com
-
Line 29:
SECRET_KEY- This is a critical security setting. Generate a 64-character hex string (see the comment in the file for generation instructions) and set it here.
- Example:
SECRET_KEY=01234567...........9abcdef
-
Line 34:
ADDON_PASSWORD- Set a password to protect your addon installation and usage. This can be any string.
- Example:
ADDON_PASSWORD=your_strong_password
Open the stremthru.env file and configure the StremThru service settings. This file contains various proxy and authentication configurations for your stream proxy.
The stremthru.env file uses the following syntax:
- STREMTHRU_HTTP_PROXY: HTTP proxy URL for routing traffic (leave empty if not using)
- STREMTHRU_TUNNEL: Tunnel configuration for secure connections
- STREMTHRU_PROXY_AUTH: Proxy authentication in
user:passwordformat - STREMTHRU_STORE_AUTH: Storage authentication in
user:service:API_KEYformat - STREMTHRU_PEER_URI: Peer connection URI for distributed streaming
- STREMTHRU_REDIS_URI: Redis connection URI for caching
- STREMTHRU_DATABASE_URI: Database connection string (PostgreSQL or SQLite)
Example configuration:
STREMTHRU_HTTP_PROXY=
STREMTHRU_TUNNEL=
STREMTHRU_PROXY_AUTH=user:your_password
STREMTHRU_STORE_AUTH=user:realdebrid:your_api_key
STREMTHRU_PEER_URI=
STREMTHRU_REDIS_URI=
STREMTHRU_DATABASE_URI=postgresql://user:password@localhost:5432/stremthruTo route traffic securely, you need to add your VPN's WireGuard configuration file to the project directory:
- Obtain your
wg0.conffile from your VPN provider. - Place the
wg0.conffile in the same directory as your other environment files (aiostreams.env,stremthru.env). - This file will be used by the Docker containers to establish a secure VPN connection.
Once all configuration files are set up, you can deploy the project using Docker Compose:
-
Make sure Docker and Docker Compose are installed on your system.
-
In your project directory, run:
docker compose up -d
This command will build and start all necessary containers in the background.
-
Check the logs to ensure all services are running correctly:
docker compose logs -f
-
Verify Service Availability:
- AIOStreams will be available on port 3000 (accessible at
http://localhost:3000or your configured domain) - StremThru Proxy will be available on port 8787 (accessible at
http://localhost:8787)
- AIOStreams will be available on port 3000 (accessible at
Before importing your AIOStreams configuration, you need to configure the StremThru proxy settings:
-
Access the AIOStreams Web Interface:
- Open your browser and navigate to
http://localhost:3000(or your configured domain) - Log in using your configured credentials
- Open your browser and navigate to
-
Navigate to the Proxy Settings:
- In the AIOStreams interface, go to the "Proxy" tab
- Look for the proxy configuration section
-
Add StremThru Proxy Configuration:
- Proxy URL: Enter
http://stremthru:8080(internal Docker network address) - Proxy Password: Enter the password you configured in
STREMTHRU_PROXY_AUTH(format:user:password) - Alternative External URL: If accessing from outside Docker, use
http://localhost:8787
- Proxy URL: Enter
-
Save the Configuration:
- Click the "Save" or "Apply" button to save your proxy settings
- The proxy configuration will be used for routing your streaming requests through StremThru
Note: Ensure StremThru is running and properly configured before adding it to AIOStreams. You can verify StremThru is working by accessing http://localhost:8787 in your browser.
Before importing your AIOStreams configuration, you need to set up your Real-Debrid and Torbox credentials:
-
Create Real-Debrid Account:
- Visit real-debrid.com and create an account
- Purchase a premium subscription (required for debrid services)
-
Get Your API Key:
- Log in to your Real-Debrid account
- Go to Settings → API → Generate API Key
- Copy your API key (it will look like:
ABCDEFGHIJKLMNOPQRSTUVWXYZ123456)
-
Add Credentials to AIOStreams:
- Access the AIOStreams web interface at
http://localhost:3000 - Navigate to the "Services" tab
- Find Real-Debrid in the list of services
- Click "Configure" or "Add"
- Enter your Real-Debrid API key
- Click "Save" or "Test Connection" to verify
- Access the AIOStreams web interface at
-
Create Torbox Account:
- Visit torbox.app and create an account
- Purchase a premium subscription
-
Get Your API Key:
- Log in to your Torbox account
- Go to Settings → API → Generate API Token
- Copy your API token
-
Add Credentials to AIOStreams:
- In the AIOStreams web interface, go to the "Services" tab
- Find Torbox in the list of services
- Click "Configure" or "Add"
- Enter your Torbox API token
- Click "Save" or "Test Connection" to verify
The aiostreams-config.json file allows you to quickly set up your AIOStreams instance with your preferred settings and services. Follow these steps to import your configuration:
-
Access the AIOStreams Web Interface:
- Open your browser and go to the URL you set as
BASE_URLin youraiostreams.envfile (e.g.,https://aiostreams.yourdomain.com).
- Open your browser and go to the URL you set as
-
Navigate to the Configuration Import Section:
- In the AIOStreams interface, look for the "Saves & Install" section, usually found at the bottom left of the sidebar.
-
Import the Configuration File:
- Click the "Import" button.
- Select the
aiostreams-config.jsonfile from your project directory. - Click the "Import" button to finalize the import process.
-
Enter Your Configuration Password:
- Enter the password you will use to log in to the AIOStreams web interface.
- Click the "Create" button.
-
Retrieve Your Addon Installation URL:
- After a successful import, the interface will provide you with an Install URL.
- Copy this URL.
-
Add the Addon to Stremio:
- Open Stremio, go to the Addons tab, and paste the Install URL to add your AIOStreams addon.
Important Reminders:
- Before importing, ensure you have:
- Configured your Real-Debrid and Torbox credentials (see Section 5.5)
- Added the StremThru Proxy URL and password in the Proxy tab (see Section 5)
- You can always update these settings after import if needed.
Editing Your Configuration in the Future:
- To edit your configuration later, you will need to log in to the AIOStreams web interface using your UUID and the configuration password you set during import. Make sure to keep these credentials safe.
- Updates: If you change any environment variables or configuration files, restart the containers:
docker compose down docker compose up --build -d
You are now ready to use AIOStreams! Enjoy your secure and feature-rich streaming experience.