• Posts

  • Joined

  • Last visited

1 Follower


  • Location

Recent Profile Visitors

506 profile views

DasNekuum's Achievements


Newbie (1/14)



  1. Got this Working by following the Nextcloud Docs and changed a few lines in the Proxy-confs for nextcloud inside Swag like this: # make sure that your dns has a cname set for nextcloud # assuming this container is called "letsencrypt", edit your nextcloud container's config # located at /config/www/nextcloud/config/config.php and add the following lines before the ");": # 'trusted_proxies' => ['letsencrypt'], # 'overwrite.cli.url' => 'https://nextcloud.your-domain.com/', # 'overwritehost' => 'nextcloud.your-domain.com', # 'overwriteprotocol' => 'https', # # Also don't forget to add your domain name to the trusted domains array. It should look somewhat like this: # array ( # 0 => '', # This line may look different on your setup, don't modify it. # 1 => 'nextcloud.your-domain.com', # ), server { listen 443 ssl http2; listen [::]:443 ssl http2; server_name yournextcloudsubdomain.*; add_header Strict-Transport-Security "max-age=15768000; includeSubdomains; preload;"; include /config/nginx/ssl.conf; client_max_body_size 0; location / { include /config/nginx/proxy.conf; resolver valid=30s; set $upstream_app nextcloud; set $upstream_port 443; set $upstream_proto https; proxy_pass $upstream_proto://$upstream_app:$upstream_port; } location ^~ /.well-known { # The following 6 rules are borrowed from `.htaccess` location = /.well-known/carddav { return 301 /remote.php/dav/; } location = /.well-known/caldav { return 301 /remote.php/dav/; } # Anything else is dynamically handled by Nextcloud location ^~ /.well-known { return 301 /index.php$uri; } try_files $uri $uri/ =404; proxy_max_temp_file_size 2048m; } }
  2. If you go like that you have to place the config file in the "passedthrough" conf folder. Then it should work. Just copy the conf file from github and paste it in your folder destination. the next thing is. In your Docker Edit you just mapped the wrong container volume/folders. The Container Path mostly does not match with the path you set for docker. E.g. Docker Path is /etc/nginx/ --> (mapped to) usr/mnt/appdata/rmtp/conf or so on I hope this is understandable.
  3. Hey there i'm glad you like this Tutorial. Yeah the Problem is indeed the config file. Just right after my Guide a update appeared. You have to change your config file name to "nginx.conf.template". Be sure there is no other config in the folder and then start your container. Now it should run and you have two conf files in your Directorie. If you want to do any changes in the config file, you have to do the changes in the nginx.conf.template and delete the "old" nginx.conf.
  4. Here are some impressions from my StreamingPlattform: Welcome Page with Autoplay Intro Video A Streamingwebsite with Menu
  5. ****Guide******How to make your own Streamingplattform like Twitch and Co. Project-Prolog: My Goal in this Project was to make a solid Streaming Server with a Website (in some kind of Twitch and Co.) that can only be accessed by my Friends and me and can handle up to 4 or more streams at once. So you may think thats absolut unnecessary and you are right but let‘s getting started anyway 🙂🤪 What the Heck do i need for this? 1. A good Server/Pc (in may case a Dell Poweredge R610 with Dual Xeon X5675@3GHZ and 40GB of RAM) 2. A solid Internetconnection 3. Of Course a Running Unraid OS 4. Two subdomains of your choice one for your website and the other for your streaming server (i used no-ip.com) 5. A Reverse Proxy with Let’s Encrypt ; SpaceinvaderOne has a Great Video Guide 6. Some Dockercontainers: MariaDB, Wordpress, nginx-rtmp by alfg (https://hub.docker.com/r/alfg/nginx-rtmp/) 7. Some Friends to Test 8. A lots of nerves and Time 9. Friends or yourself for some Desgin stuff for your cool website logo and images 10. Your choice of Drug to keep you calm like Coffee, Beer, Pizza etc. The First steps on Wordpress: First of all install MariaDB and make a Database for Wordpress ( i recommend to watch the Video Guide from SpaceInvaderOne How Setup up Nextcloud After you setup MariaDB proberly install Wordpress and Setup your admin account etc.. [I First started to build the website with serveral Wordpress-Plugins on my local network. But i recommend to go first with the setup of your Domain for your website via Letsencrypt] Then make your „Resverse Proxy Dockernet“ in Unraid and install Letsencrypt like seen in the Video Guide from SpaceinvaderOne. Enter your Domains in Letsencrypt Move to Wordpress --> Settings--> Generally and change the Wordpress-Adress and the Website-Adress to your domains name like: https://example.yourdomain.com (Dont worry if you cant access your Website after Save the changes and refresh; you can change this in the WP Config to your localhost/network back if something goes wrong) Move to the Letsencrypt Appdata Folder -->nginx-->proxy-confs (Here we have to setup a new config because at the time of writting this guide there was no Wordpress proxy-confs) Make a new text file and enter following: server { listen 443 ssl; listen [::]:443 ssl; server_name yoursubdomain.*; #change this to your subdomain include /config/nginx/ssl.conf; client_max_body_size 0; location / { include /config/nginx/proxy.conf; resolver valid=30s; set $upstream_app Wordpress; set $upstream_port 80; set $upstream_proto http; proxy_pass $upstream_proto://$upstream_app:$upstream_port; proxy_max_temp_file_size 2048m; } } Save the file and rename it to wordpress.subdomain.conf Put Wordpress and Letsencrypt in the same „reverse Proxy Dockernet“ and restart the docker containers. Now u should be able to access your webiste via your Subdomain with SSL Encryption. If you can acces your website the address bar in Firefox should be like this: [For sure you can make this all working without SSL but i strongly recommend to go with SSL for Security Reason and for accessability. Because some Browser will otherwise block the content of your website] The Second Steps or the „StreamingServer“ itself: Install the nginx-rtmp Docker Container by alfg via Community Apps (you have to enable the Docker Hub Repo in Unraid in order to find the Container). And Set it up like this: (Keep in Mind your Docker allocations to setup the ports correct to avoid conflicts) I think you don't need the Container Path „Certs“ since we are using Letsencrypt but i needed it for some testing. You will need the "Certs" Path. Just Copy the "Certs" Files for your Subdomain (StreamingServerDomain) from LetsEncrypt to this Folder and keep in mind to change the config below to your Certificate Files location and Name. Then pull and install the container. It is possibly that after your installtion the docker container wont run and you get some Errors. (mostly because a config is missing) To solve this Problem ove to your Appdata -->nginx-rtmp-->conf and create a new text file and paste the following: daemon off; worker_processes auto; error_log /dev/stdout info; events { worker_connections 1024; } rtmp { server { listen 1935; chunk_size 4000; application stream { live on; exec ffmpeg -i rtmp://localhost:1935/stream/$name -c:a libfdk_aac -b:a 128k -c:v libx264 -b:v 2500k -f flv -g 30 -r 30 -s 1280x720 -preset superfast -profile:v baseline rtmp://localhost:1935/hls/$name_720p2628kbs -c:a libfdk_aac -b:a 128k -c:v libx264 -b:v 1000k -f flv -g 30 -r 30 -s 854x480 -preset superfast -profile:v baseline rtmp://localhost:1935/hls/$name_480p1128kbs -c:a libfdk_aac -b:a 128k -c:v libx264 -b:v 750k -f flv -g 30 -r 30 -s 640x360 -preset superfast -profile:v baseline rtmp://localhost:1935/hls/$name_360p878kbs -c:a libfdk_aac -b:a 128k -c:v libx264 -b:v 400k -f flv -g 30 -r 30 -s 426x240 -preset superfast -profile:v baseline rtmp://localhost:1935/hls/$name_240p528kbs -c:a libfdk_aac -b:a 64k -c:v libx264 -b:v 200k -f flv -g 15 -r 15 -s 426x240 -preset superfast -profile:v baseline rtmp://localhost:1935/hls/$name_240p264kbs; } application hls { live on; hls on; hls_fragment_naming system; hls_fragment 3; hls_playlist_length 20; hls_path /opt/data/hls; hls_nested on; hls_variant _720p2628kbs BANDWIDTH=2628000,RESOLUTION=1280x720; hls_variant _480p1128kbs BANDWIDTH=1128000,RESOLUTION=854x480; hls_variant _360p878kbs BANDWIDTH=878000,RESOLUTION=640x360; hls_variant _240p528kbs BANDWIDTH=528000,RESOLUTION=426x240; hls_variant _240p264kbs BANDWIDTH=264000,RESOLUTION=426x240; } } } http { access_log /dev/stdout combined; ssl_ciphers HIGH:!aNULL:!MD5; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_session_cache shared:SSL:10m; ssl_session_timeout 10m; server { listen 80; # Uncomment these lines to enable SSL. # Update the ssl paths with your own certificate and private key. listen 443 ssl; ssl_certificate /opt/certs/example.crt; # Change the Filename to your pasted File from Letsencrypt ssl_certificate_key /opt/certs/example.key; # Change the Filename to your pasted File from Letsencrypt location /hls { types { application/vnd.apple.mpegurl m3u8; video/mp2t ts; } root /opt/data; add_header Cache-Control no-cache; add_header Access-Control-Allow-Origin *; } location /live { alias /opt/data/hls; types { application/vnd.apple.mpegurl m3u8; video/mp2t ts; } add_header Cache-Control no-cache; add_header Access-Control-Allow-Origin *; } location /stat { rtmp_stat all; rtmp_stat_stylesheet static/stat.xsl; } location /static { alias /www/static; } location = /crossdomain.xml { root /www/static; default_type text/xml; expires 24h; } } } Save it and rename it to „nginx.conf.template“. Then restart your „StreamingServer“. I if it starts you a ready to test the „Streaming Server“ itself. I recommend for Testing purpose to use OBS and VLC-Player. Go in OBS-->Settings-->Stream change Platform to Custom and enter: rtmp://yourlocalhostip:1935/stream As Streamkey you can go with anything you wish but you will need it to watch the stream later. So i will go for testing with 1234. Start streaming your Desktop. If you get no Errors from OBS and it looks like this: You are good to go. While you are streaming open VLC go to Media--> Open Networkstream and add the following: http://<server ip>:8083/live/yourstreamkey.m3u8 #change the port to your added Viewing Port If you see your stream we are ready for the Final steps. Make your Streamingserver reachable over WWW and SSL Encrypted So now if everything is working we need to make the Streamingserver reachable over the Internet so that your friends can push their streams all over the world to your server. Then we have to make the Streamingserver SSL Encrypted. Why u may ask? Because the most Browser will block your video streams over http in wordpress. So it happend to me and to find this out was a pain in the ***. Trust me …😉 First you have to forward the port 1935 on your Router. Then check, if you push your stream over your „Streamingserversubdomain“ comes through to your Streamingserver. In favor to do that change in OBS your „Server“ to: rtmp://subdomainforyourstreamingserver:1935/stream Stream and check via VLC like above if you see something. As next step we need to make the SSL encryption working: Go to the Letsencrypt Appdata Folder--> nginx-->proxy-conf and make a new text file and paste the following (since there is no subdomain.conf for the streaming dockercontainer i had to make my own): server { listen 443 ssl; listen [::]:443 ssl; server_name yourdomain.*; #change this to your subdomain for your streaming server include /config/nginx/ssl.conf; client_max_body_size 0; location / { include /config/nginx/proxy.conf; resolver valid=30s; set $upstream_app nginx-rtmp; set $upstream_port 443; set $upstream_proto https; proxy_pass $upstream_proto://$upstream_app:$upstream_port; proxy_max_temp_file_size 2048m; } } Save it and rename it to: nginx-rtmp.subdomain.conf. Set your nginx-rtmp alias your streaming server into the "Reverse Proxy Dockernet". Restart the Streamingserver and Letsencrypt. Now your video stream should be SSL encrypted. Start a Stream with OBS. To test, take your handy test tool VLC Player and open the following networkstream: https://yourstreamserversubdomain/live/yourstreamkey.m3u8 Congratulations ! If you see your stream everything is set up and ready to go. Now you can Design your Wordpress page. To Show the Streams on your webpage i recommend Playerjs (Wordpress-plugin). You only need your „watching“ link with the streamkey. Playerjs uses shortcodes. Here an example how the shortcode + your "watching" link should look like: Multiple Streams If you want that multiple streams can run and be watched you have to setup an individual streamkey for each stream. Some Infos: I tested this setup for hours with 4 People pushing theirs Streams at the same time while watching the streams and it worked great. My CPU Usage was at max. 35% -mostly lower-. All other Containers e.g. Nextcloud, Shinobi etc. worked perfect while streaming and watching. The Total RAM usage was by 40% ( with all Conatiners and two VMs -Ubuntu and WIN Server2019 – running). For some sort of security and restriction i used a Wordpress Plugin to give the website a Basic http Authentication before you can access the website. For that i used the WP-Plugin „ Frontend HTTP Authentication Protection“. On the Server-Side i recommend a 100Mbits Internetconnection with 40Mbit upload. On the Client-Side i recommend a 50Mbits Internetconnecntion with min 30 Mbit upload. THANKS FOR READING AND HAPPY STREAMING! PS.: If you have any further questions or need help feel free to contact me i will try my best to help you out. PS.: If you have any further questions or need help feel free to contact me i will try my best to help you out.
  6. So i got the Docker Container running. Just map the folder like above (without the files) and map the Port 1935. Than start the docker container, you may got an Error in Logs. Then move to your appdata folder e.g. /mnt/appdata/rtmpserver/nginx and make a text file. Rename it to nginx.conf . Open the "new" file with notepad and paste the following: user nginx; worker_processes auto; rtmp_auto_push on; events {} rtmp { server { listen [::]:1935 ipv6only=off; application live { live on; } } } Save and start the Container. Now it should run. You can test this with VLC Player just use rtmp://urserverip:1935/live/test For your Streaming Project: 1.Use OBS and the Plugin NDI for OBS. 2.Install OBS + NDI on each gaming machine. 3.Set up OBS on each Gaming Machine --> Tools --> NDI Output settings (give every Gaming VM a different NDI name) 4.Setup a new VM or use another PC an install OBS + NDI. --> Move to OBS and add an NDI Source (for every Gaming VM) --> Setup Streaming Settings pointing to your created RMTP Server (eg rmtp:// 5. now you can arrange your Gaming VM in some Sort of Split Screen 6. Hit Start Streaming and Have Fun If you want to push your RMTP stream to twitch or something like that you have to change your nginx.conf ( push rtmp://<other streaming service rtmp url>/<stream key>) Sources: https://obsproject.com/forum/resources/how-to-set-up-your-own-private-rtmp-server-using-nginx.50/ https://github.com/DvdGiessen/nginx-rtmp-docker Sorry for the long Post. I'm new in this Forum Stuff. Hoped i could helped.
  7. I like Unraid because of its simplicity. The Price-performance ratio is at its best. I'd like to see in 2020 a Backup Solution between two or more Unraid Setups. A big thanks to the Unraid Team and greetings from Germany.