{"id":31642449,"url":"https://github.com/tameronline/setup_peertube","last_synced_at":"2025-10-07T03:59:33.941Z","repository":{"id":312492994,"uuid":"1047681188","full_name":"TamerOnLine/setup_peertube","owner":"TamerOnLine","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-31T03:22:05.000Z","size":30,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-31T03:28:14.860Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TamerOnLine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-31T01:11:43.000Z","updated_at":"2025-08-31T03:22:07.000Z","dependencies_parsed_at":"2025-08-31T03:28:16.906Z","dependency_job_id":"3628477c-2708-44ea-91c8-de79cba20a25","html_url":"https://github.com/TamerOnLine/setup_peertube","commit_stats":null,"previous_names":["tameronline/setup_peertube"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/TamerOnLine/setup_peertube","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TamerOnLine%2Fsetup_peertube","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TamerOnLine%2Fsetup_peertube/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TamerOnLine%2Fsetup_peertube/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TamerOnLine%2Fsetup_peertube/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TamerOnLine","download_url":"https://codeload.github.com/TamerOnLine/setup_peertube/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TamerOnLine%2Fsetup_peertube/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278717436,"owners_count":26033542,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-07T03:59:29.125Z","updated_at":"2025-10-07T03:59:33.933Z","avatar_url":"https://github.com/TamerOnLine.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PeerTube Auto Installer 🚀\n\nThis repository provides a **one-click installer** for [PeerTube](https://joinpeertube.org/) on **Ubuntu 22.04 / 24.04** servers.  \nIt automates the full setup:\n\n- Install required packages (Node.js 20, Yarn, PostgreSQL, Redis, ffmpeg, Nginx)\n- Create `peertube` system user and PostgreSQL database\n- Clone the official [PeerTube repo](https://github.com/Chocobozzz/PeerTube)\n- Build frontend/backend using Yarn\n- Auto-generate `config/production.yaml` from environment file (`pt.env`)\n- Configure Nginx reverse proxy (with WebSocket \u0026 optional HTTPS via certbot)\n- Create \u0026 enable `systemd` service\n- Open firewall (80/443)\n\n---\n\n## 📂 Repository Structure\n\n- **`install_peertube.sh`** → Bootstrap script (stops apt locks, installs Python, runs `setup_peertube.py`).  \n- **`setup_peertube.py`** → Main Python installer. Handles packages, DB, Git, Yarn build, config, Nginx, systemd.  \n- **`pt.env`** → Environment configuration file for PeerTube (domain, DB, SMTP, etc.).  \n- **`setup_peertube.yaml`** → Optional cloud-init file (for Hetzner / cloud providers).  \n\n---\n\n## ⚙️ Requirements\n\n- Fresh **Ubuntu 22.04 or 24.04** server\n- Root access (`ssh root@your-server-ip`)\n- Minimum **2 GB RAM** (+swap will be added automatically if needed)\n- Optional: Domain name (recommended for federation \u0026 OAuth)\n\n---\n\n## 🛠️ Installation\n\n### Option 1: Cloud-init (auto at first boot)\nCopy the contents of `setup_peertube.yaml` into your cloud provider's **user-data**.  \nOn first boot, PeerTube will be installed and started automatically.\n\n### Option 2: Manual Installation\n1. Clone the repo:\n   ```bash\n   git clone https://github.com/\u003cyour-org\u003e/setup_peertube.git\n   cd setup_peertube\n   ```\n\n2. Edit `pt.env`:\n   ```ini\n   PT_DOMAIN=\"videos.example.com\"   # or leave empty → will fallback to server IP\n   PT_HTTPS=true                    # enable HTTPS if domain is used\n   PT_DB_PASS=\"your-strong-password\"\n   PT_INSTANCE_NAME=\"MyTube\"\n   PT_INSTANCE_DESC=\"Public PeerTube instance\"\n   PT_LANGUAGES=\"en,de,ar\"\n   PT_RESOLUTIONS=\"720p,1080p\"\n   PEERTUBE_REF=\"v7.2.3\"\n   ```\n\n3. Run installer:\n   ```bash\n   bash install_peertube.sh\n   ```\n\n---\n\n## 🔑 Post-Install\n\n- Check status:\n  ```bash\n  systemctl status peertube\n  journalctl -u peertube -n 100 --no-pager\n  ```\n\n- Default URL:\n  ```\n  http://\u003cyour-domain-or-ip\u003e\n  ```\n\n- If you set `PT_HTTPS=true` and domain → installer tries automatic **Let's Encrypt** via `certbot`.  \n- If no domain → PeerTube will run on your **IP**, but federation \u0026 OAuth features may be limited.\n\n---\n\n## 📌 Notes\n\n- **Swap**: If build fails with exit code 137 (out-of-memory), installer creates a **4G swapfile** automatically.  \n- **Nginx**: Adds `websocket_map.conf` to support WebSockets. If your `/etc/nginx/nginx.conf` doesn’t include `conf.d/*.conf`, add manually:\n  ```nginx\n  http {\n    include /etc/nginx/conf.d/*.conf;\n  }\n  ```\n- **SMTP**: Configure `pt.env` for email notifications (optional). Without SMTP, PeerTube runs but cannot send mails.\n\n---\n\n## 🧹 Management\n\n- Restart PeerTube:\n  ```bash\n  systemctl restart peertube\n  ```\n- Logs:\n  ```bash\n  journalctl -u peertube -f\n  ```\n- Nginx reload:\n  ```bash\n  systemctl reload nginx\n  ```\n\n---\n\n## 🤝 Credits\n\n- [PeerTube](https://github.com/Chocobozzz/PeerTube) (original software)  \n- This installer is maintained by **TamerOnLine**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftameronline%2Fsetup_peertube","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftameronline%2Fsetup_peertube","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftameronline%2Fsetup_peertube/lists"}