Deploy
Method 1 - Cloudflare Pages (Best host)
-
Fork P-Stream on Github.
-
Go to Cloudflare pages and click “Sign Up”.
-
Create a Cloudflare account.
-
Now, click the blue “Create” button at the top of the page.
-
By default Cloudflare assumes your creating a worker instead, change the “Workers” tab to “Pages”.
-
Select the blue button that says “Connect to git” and then connect the Github account you forked P-Stream on.
-
Now you can select repositories from your github account, select your fork of P-Stream and click “Begin setup”.
-
Give your project a silly name and select
mainas the production branch. -
In “Build settings” change the “Build command” to
pnpm buildand the “Build output directory” todist. -
Select the
Environment variabledrop down and add the required variables. -
Click “Save and Deploy” to watch your new site deploy.
-
Congrats! You have your own version of P-Stream hosted for FREE.
Method 2 - Vercel (Might be broken idk)
-
Click here to fork the P-Stream Github repository.
-
Click here to go to Vercel.
-
Sign in using either a GitHub, GitLab, or Bitbucket.
-
Click the “New Project” button on the top right of your dashboard and follow the steps to create a new project for your self hosted version of movie web.
-
After clicking it, you’ll be presented with a list of Git repositories that the Git account you’ve signed up with has write access to.
-
Select your own fork of the P-Stream Github repository.
-
Configure the environment variables:
VITE_CORS_PROXY_URL: Enter your proxy URL here. Make sure to not have a slash at the end of your URL. Example (THIS IS AN EXAMPLE, IT WON’T WORK FOR YOU):https://test-proxy.test.workers.devVITE_TMDB_READ_API_KEY: Enter your TMDB Read Access Token here. Please read the TMDB page on how to get an API key.VITE_BACKEND_URL: Only set if you have a self-hosted backend. Put in your backend URL. Check out configuration reference for details. Make sure to not have a slash at the end of the URL.
-
Click “Deploy”.
-
Congrats! You have your own version of P-Stream hosted.
-
You may wish to configure a custom domain - Please consult the Vercel docs for how to do this.
Method 3 - Static Web Host
-
Download the file
P-Stream.zipfrom the latest release: https://github.com/p-stream/p-stream/releases/latest. -
Extract the ZIP file so you can edit the files.
-
Open
config.jsin an editor such as Notepad, Visual Studio Code or similar. -
Put your proxy URL in-between the double quotes of
VITE_CORS_PROXY_URL: "". Make sure to not have a slash at the end of your URL. Example (THIS IS AN EXAMPLE, IT WON’T WORK FOR YOU):VITE_CORS_PROXY_URL: "https://test-proxy.test.workers.dev" -
Put your TMDB Read Access Token inside the quotes of
VITE_TMDB_READ_API_KEY: "". Please read the TMDB page on how to get an API key. -
If you have a self-hosted backend server, enter your URL in the
VITE_BACKEND_URLvariable. Check out configuration reference for details. Make sure to not have a slash at the end of the URL. -
Save the file.
-
Upload all of the files to a static website hosting such as:
- GitHub Pages
- Netlify
- Vercel
- Etc, there are lots of options.
-
Congrats! You have your own version of P-Stream hosted.
Method 4 - Docker Compose - Home Network
Docker is not recommended! It’s much easier to host the static site and use a proxy like nginx to access.
This method is meant for those using a desktop device or single board computer with a minimum of 4GB of RAM such as a Raspberry Pi to run P-Stream on their home network for network connected devices.
-
Ensure you have docker installed. In a newly created directory called
P-Streamcreate a file calleddocker-compose.yaml. Paste the contents of the code block below into this file.version: "3.8"services:movieweb:build:context: https://github.com/p-stream/p-stream.git#production# args:# TMDB_READ_API_KEY: ""# CORS_PROXY_URL: ""# BACKEND_URL: ""ports:- "80:80"restart: unless-stopped -
Fill in the necessary environment variables (see code block comments above).
-
Start the container with
docker compose up -d.