System requirements
PlayTubeVideo is a Node.js and React/Next.js application backed by MySQL-compatible storage. Install and manage it on a VPS, dedicated server or a managed Node.js host.
| Component | Requirement | Notes |
|---|---|---|
| Node.js | 22.x or newer |
Matches the engines requirement in
package.json.
|
| Database | MySQL-compatible server | Use a dedicated database, user and password for production. |
| Web server | HTTPS + reverse proxy | Point your domain to the Node process and enable TLS. |
| Media tools | FFmpeg (recommended) | Required for video processing, system videos and selected ad/media workflows. |
| Storage | Local disk or cloud object storage | Amazon S3, DigitalOcean Spaces and Wasabi are supported configurations. |
Install MySQL and create the application database
These commands are for Ubuntu/Debian servers. If you use a managed database, create the database and user in that provider's control panel and continue with the connection test.
Install and start MySQL
sudo apt update
sudo apt install mysql-server
sudo systemctl enable --now mysql
sudo mysql_secure_installation
Confirm the service is running before creating the PlayTubeVideo database.
Create a dedicated database and user
sudo mysql
CREATE DATABASE playtubevideo
CHARACTER SET utf8mb4
COLLATE utf8mb4_unicode_ci;
CREATE USER 'playtube_app'@'localhost'
IDENTIFIED BY 'CHANGE_THIS_TO_A_LONG_PASSWORD';
GRANT ALL PRIVILEGES ON playtubevideo.*
TO 'playtube_app'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Verify the connection
mysql -h 127.0.0.1 -u playtube_app -p playtubevideo
If your release includes a database SQL file, import it after the database is created:
mysql -h 127.0.0.1 -u playtube_app -p playtubevideo < /path/to/playtubevideo.sql
If the package installer manages the schema, leave the database empty and complete the installer instead. Do not import the same schema twice.
Configure Nginx as a reverse proxy
Nginx should receive public HTTP/HTTPS traffic and forward requests to the Node.js process. The configuration below also supports Socket.IO/WebSocket upgrades, long media requests and large uploads.
Install Nginx
sudo apt update
sudo apt install nginx
sudo systemctl enable --now nginx
Create the virtual host
Replace example.com with your real domain and save this file as /etc/nginx/sites-available/playtubevideo:
server {
listen 80;
listen [::]:80;
server_name example.com www.example.com;
client_max_body_size 2G;
location / {
proxy_pass http://127.0.0.1:4000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 600s;
proxy_send_timeout 600s;
}
}
Enable and test the site
sudo ln -s /etc/nginx/sites-available/playtubevideo \
/etc/nginx/sites-enabled/playtubevideo
sudo nginx -t
sudo systemctl reload nginx
Enable HTTPS with Let's Encrypt
sudo apt install certbot python3-certbot-nginx
sudo certbot --nginx -d example.com -d www.example.com
After HTTPS is active, update the production environment values and restart Node:
NODE_ENV=production
PORT=4000
PUBLIC_URL=https://example.com
DBHOST=127.0.0.1
DBPORT=3306
ADMIN_SLUG=/video-admin
proxy_set_header Upgrade and Connection lines are required for real-time chat, notifications and calling features. If your Node process uses a different port, update proxy_pass and PORT together.Purchase and license
Download the package from your Envato Market downloads page and keep the purchase code available for installation verification and support.
- Sign in to your Envato account.
- Open Downloads.
- Download the main item package and the license certificate/purchase code.
- Use one valid license for each production domain according to the applicable Envato license.
Environment configuration
Copy the appropriate environment file for your deployment and replace every placeholder. Never commit production secrets to a public repository.
Development example
NODE_ENV=development
PORT=4000
DBUSER=your_database_user
DBPASSWORD=your_database_password
DBNAME=your_database_name
DBHOST=127.0.0.1
DBPORT=3306
ADMIN_SLUG=/video-admin
PUBLIC_URL=http://localhost:4000
SECRETKEY=replace_with_a_long_random_secret
JWT_SECRET_KEY=replace_with_a_long_random_jwt_secret
TZ=utc
ANTMEDIASERVER=true
Production values to review
-
NODE_ENV=productionand a public HTTPSPUBLIC_URL. - Database credentials, host, port and pool size.
-
Unique
SECRETKEYandJWT_SECRET_KEY. -
ADMIN_SLUGif you want a non-default admin URL. - CDN/static resource URL and upload/storage provider settings.
- Timezone and any Ant Media/Agora/live-streaming configuration.
Install, build and run
Upload the application
Upload the project files to your server, excluding local-only folders such as development caches. Make sure the Node process can read the application and write configured upload directories.
Install dependencies
cd /path/to/video-script
npm install
Use the lockfile provided with the package when your hosting workflow supports deterministic installs.
Prepare the database
Create an empty database and user, then complete the included installer or import the SQL package supplied with your release. Confirm the database name in your environment file matches the created database.
Build for production
npm run build
The project also provides a production start script. For a process manager, use your provider's Node application runner or a process manager such as Forever.
Start the application
npm run dev # local development, normally port 4000
npm run start # production workflow provided by the package
Open your configured PUBLIC_URL and finish the
installer/admin setup. In development, the repository
environment uses http://localhost:4000.
First admin checks
After installation, sign in with the administrator account and review these areas before inviting users:
- Settings: site name, URL, email, login, signup, reCAPTCHA and storage.
- Payments: default currency, gateways, commission rules, packages and wallet recharge.
- Member roles: permissions for video, live, chat, stories, community posts, events, products and AI.
- Languages and menus: create the public navigation and translation defaults.
- Moderation: approval rules, reports, comments, blocks and adult-content settings.
- Mail templates: configure SMTP before enabling transactional email.
PUBLIC_URL + ADMIN_SLUG; the
default development value is
http://localhost:4000/video-admin.
Platform configuration
Video & audio
Configure upload limits, FFmpeg path, player options, thumbnails, playlists, channels, audio and moderation from the Videos/Audio administration areas.
Stories & community
Set story duration and permissions. Enable text, image, poll, link and paid community posts with privacy and moderation controls.
Events & ticketing
Configure online/offline events, ticket pricing, attendee access and community feeds on event pages.
Live streaming
Review provider credentials, stream limits, moderation and creator permissions before going live.
Monetization checklist
- Set a default currency and configure supported currencies.
- Enable and test PayPal, Stripe, Razorpay, Cashfree or other required gateways in sandbox mode first.
- Configure wallet recharge, subscriptions, ticket sales, paid messages, paid posts, gifts, products and creator payouts.
- Set admin commission type/value for each revenue stream.
- Run a low-value end-to-end test and verify the transaction, wallet, notification and email records.
AI, storage and PWA
- AI: configure OpenAI credentials, enable the required level permissions and set image/text pricing if enabled.
- Storage: start with local storage, then configure S3-compatible credentials and test upload/download before switching production traffic.
- PWA: set app name, short name, description, theme/background colors and all required icon sizes.
- CDN: configure static resource/CDN values only after the origin URLs work correctly.
Operations and maintenance
- Use a process manager or hosting Node application runner to keep the service online.
- Schedule database and upload backups; test restoring them.
- Monitor Node memory, disk capacity, database connections and media-processing queues.
- Review admin analytics, earnings, reports, moderation queues and failed email/payment logs.
- Keep Node, OS, database and npm dependencies patched according to your hosting policy.
Production security
- Use HTTPS everywhere and set the correct public URL.
- Replace every sample secret and restrict database access to the application server.
-
Do not expose
.env, purchase codes, OAuth secrets, payment secrets or JWT keys. - Restrict upload directories and use the application's validation/processing pipeline.
- Use strong admin credentials, least-privilege roles and a separate support/demo account.
- Back up before changing payment, storage, database or upgrade settings.
Upgrade checklist
For every release, read the release-specific README and change
log inside the Upgrade directory.
- Put the site in maintenance mode or schedule a short downtime.
- Back up files, database, environment files and uploaded media.
- Review the release notes and required SQL changes.
- Replace application files without overwriting your environment or uploads.
- Apply the release SQL in the documented order.
-
Run
npm installandnpm run build. - Restart the Node process, clear caches and test login, uploads, payments, email, live, chat and admin access.
Support
For support, include your purchase code privately, website URL, exact error, affected page, steps to reproduce, server/Node version and relevant sanitized logs. Never send passwords, payment keys or full environment files.
Support email: softwareservitium@gmail.com. Response time can be up to two business days. Support covers product questions, reported bugs and feature guidance; custom hosting work may require a separate installation service.