A local web application for managing and cross-posting short-form video content (TikTok, YouTube Shorts, Instagram Reels) across multiple social media platforms from a single interface.
- Multi-Platform Posting: Upload videos to TikTok, YouTube Shorts, and Instagram Reels simultaneously
- Multi-Account Support: Connect and manage multiple accounts per platform
- Unified Interface: Single dashboard for creating posts with platform-specific options
- Upload History: Track all your uploads and their status
- OAuth Authentication: Secure YouTube authentication via Google OAuth 2.0
- Session Management: Persistent sessions for TikTok and Instagram
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Next.js Web App (3000) β
β React UI + API Routes β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββΌββββββββββββββββββββ
βΌ βΌ βΌ
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β TikTok Service β β YouTube Service β βInstagram Serviceβ
β (Port 8000) β β (Port 8002) β β (Port 8001) β
β FastAPI β β FastAPI β β FastAPI β
β Selenium/Chrome β β YouTube API v3 β β Instagrapi β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
- Docker and Docker Compose
- YouTube OAuth credentials (see YouTube Setup)
git clone https://github.com/yourusername/crossposting.git
cd crosspostingCopy your Google OAuth client_secret.json file to the YouTube service directory:
cp /path/to/your/client_secret.json services/youtube-uploader/client_secret.jsonSee YouTube Setup for instructions on obtaining these credentials.
docker compose up --buildThis will start:
- Web app at http://localhost:3000
- TikTok service at http://localhost:8000
- Instagram service at http://localhost:8001
- YouTube service at http://localhost:8002
Open http://localhost:3000 in your browser.
- Node.js 20+
- Python 3.11+
- Google Chrome (for TikTok service)
npm installEach service needs its own virtual environment:
# TikTok Uploader
cd services/tiktok-uploader
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
deactivate
cd ../..
# YouTube Uploader
cd services/youtube-uploader
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
deactivate
cd ../..
# Instagram Uploader
cd services/instagram-uploader
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
deactivate
cd ../..Open 4 terminal windows:
Terminal 1 - Next.js App:
npm run devTerminal 2 - TikTok Service:
cd services/tiktok-uploader
source venv/bin/activate
python main.pyTerminal 3 - YouTube Service:
cd services/youtube-uploader
source venv/bin/activate
python main.pyTerminal 4 - Instagram Service:
cd services/instagram-uploader
source venv/bin/activate
python main.pyYouTube requires Google OAuth 2.0 credentials:
- Go to the Google Cloud Console
- Create a new project or select an existing one
- Enable the YouTube Data API v3:
- Navigate to "APIs & Services" > "Library"
- Search for "YouTube Data API v3" and enable it
- Create OAuth 2.0 credentials:
- Go to "APIs & Services" > "Credentials"
- Click "Create Credentials" > "OAuth client ID"
- Choose "Desktop app" as the application type
- Download the credentials JSON file
- Rename the file to
client_secret.jsonand place it inservices/youtube-uploader/ - Add your Google account as a test user:
- Go to "OAuth consent screen"
- Under "Test users", add the email address you'll use to authenticate
TikTok uses session-based authentication via browser cookies:
- Log in to TikTok in your browser
- Press F12 to open Developer Tools
- Go to Application tab β Cookies β https://www.tiktok.com
- Find and copy the
sessionidvalue - In the app, go to "Accounts" and click "Connect TikTok Account"
- Paste the sessionid when prompted
Instagram uses username/password authentication:
- In the app, go to "Accounts" and click "Connect Instagram Account"
- Enter your Instagram username and password
- If 2FA is enabled, you'll be prompted for the verification code
Note: Using Instagram's private API may violate their Terms of Service. Use at your own risk.
- Go to the home page (Dashboard)
- Upload your video file (MP4, MOV, or WebM, max 500MB)
- Add a caption and hashtags
- Select which platforms and accounts to post to
- Click "Post" to upload to all selected platforms
- Go to the "Accounts" page
- Click "Connect Account" for each platform
- Follow the authentication flow for each platform
- Connected accounts will appear in the platform section
- Go to the "History" page
- View all past uploads with their status
- Filter by platform or status
crossposting/
βββ src/
β βββ app/ # Next.js App Router pages
β β βββ api/upload/ # API routes (proxy to Python services)
β β βββ accounts/ # Account management page
β β βββ history/ # Upload history page
β βββ components/ # React components
β β βββ dashboard/ # Post creation UI
β β βββ accounts/ # Account management UI
β β βββ history/ # History display UI
β β βββ ui/ # Radix UI components
β βββ lib/
β β βββ services/ # Platform service clients
β β βββ constants.ts # Platform configurations
β βββ types/ # TypeScript interfaces
βββ services/
β βββ tiktok-uploader/ # FastAPI service (port 8000)
β βββ youtube-uploader/ # FastAPI service (port 8002)
β βββ instagram-uploader/ # FastAPI service (port 8001)
βββ docker-compose.yml # Docker orchestration
βββ Dockerfile # Next.js Docker build
# Development
npm run dev # Start Next.js dev server
npm run build # Production build
npm run lint # Run ESLint
# Docker
docker compose up # Start all services
docker compose down # Stop all services
docker compose build # Rebuild imagesThe Next.js app uses these environment variables (with defaults for local development):
| Variable | Default | Description |
|---|---|---|
TIKTOK_SERVICE_URL |
http://localhost:8000 |
TikTok service URL |
YOUTUBE_SERVICE_URL |
http://localhost:8002 |
YouTube service URL |
INSTAGRAM_SERVICE_URL |
http://localhost:8001 |
Instagram service URL |
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature - Make your changes
- Run linting:
npm run lint - Commit your changes:
git commit -m 'Add my feature' - Push to the branch:
git push origin feature/my-feature - Open a Pull Request
- TypeScript with strict mode enabled
- ESLint with Next.js recommended rules
- Use
@/*path alias for imports fromsrc/ - Follow existing component patterns
- Session expired: TikTok sessions expire periodically. Re-export your sessionid cookie and update it in the app.
- Chrome not found: Ensure Google Chrome is installed. In Docker, Chrome is included in the image.
- Detection/Captcha: TikTok may detect automation. Try using a fresh Chrome profile.
- Token expired: The app automatically refreshes tokens, but if issues persist, disconnect and reconnect your YouTube account.
- Quota exceeded: YouTube API has daily quotas. Wait 24 hours or check your quota in Google Cloud Console.
- Video too short: YouTube Shorts must be between 15-60 seconds.
- Challenge required: Instagram may require verification. Log in via the official app to clear challenges.
- Rate limited: Wait a few hours before trying again.
- 2FA issues: Make sure you're entering the correct verification code.
- Port already in use: Stop other services using ports 3000, 8000, 8001, or 8002.
- Permission denied: On Linux, you may need to run Docker commands with
sudoor add your user to the docker group. - Build fails: Try
docker compose build --no-cacheto rebuild from scratch.
MIT License - see LICENSE for details.
This tool uses unofficial APIs for TikTok and Instagram. Using these services may violate their Terms of Service. Use at your own risk. The developers are not responsible for any account bans or other consequences.