This will have been the third build of my IPFS server, first one I installed Apache with nginx and could not get the Apache part off so I reformatted.
On the second attempt I got the Uploader working but found larger videos could not upload using my server. As I was running out of memory when running ffmpeg causing a 504 error and halting the upload. Since I was running an OpenVZ type of VPS I could not add a swap file and seems 2GB of memory was not enough for the server to fulfill its needs. So I had to leave Time4VPS and find a new host.
Decided to go with SynergyServers after reading reviews on HostAdvise. They are only a few hours away from Times4VPS so still in a geographically needed area for the IPFS d.tube network. I think im the only Dtube server in Lithuania.
I am now on the third build of this server, and things are going real smooth now. I moved to a KVM VPS which supports swap, which basically means when I run out of memory on the machine it starts using the hard drive as a virtual hard disk. I did have some troubles with the uploader at first, getting 504 errors again. But then I found the missing configuration lines in nginx and added the below.
client_header_timeout 9000; client_body_timeout 9000; fastcgi_read_timeout 9000; fastcgi_buffers 8 128k; fastcgi_buffer_size 128k; proxy_send_timeout 9000; proxy_read_timeout 9000; send_timeout 9000; fastcgi_send_timeout 9000; client_max_body_size 3G;
Since this time around when uploading I did not see my memory usage max and then get the 504 I figured there may be another issue other than ffmpeg on this server. Going through google posts I found a great guide on 504 errors and they suggest adding the needed lines above to the nginx file, and sure enough now I can successfully upload.
I can upload alot faster, about 12 megabits on my home connection which is about the max speed my cable modem can handle. When I upload using d.tube I tend to get 1-2 megabits so this is a big increase for me.
Though my new favorite feature of my server has to be the Public IPFS Gateway @techcoderx helped me set up. With a change to my IPFS configuration I enabled my IP address to be a public gateway to videos I pin though my server.
You may have seen me add at the bottom of my video descriptions "If the video has trouble playing, please use my IPFS Gateway instead of D.tube's by following this link".
Going to this link you are skipping d.tube as a video playback platform and using my servers resources instead. I can scale as my video views grow but for right now a single server is serving my videos without issue. My plans are to containerize and use Kubernetes for container orchestration if I do see a large increase in traffic.
I am super stoked that I can now just send people links to my server with my IPFS hash and they can play videos, without using d.tube as a platform as many of us know it has troubles sometimes playing video. This is huge to me and I really get a good feeling hosting my videos on my own servers, along with hosting my photos on my server as well using Spee.ch and LBRY.
Special thanks to the whole #onelovedtube community.. And to the members that helped me set up the server @techcoderx @vaultec @gray00 and @d00k13 and other users such as @cityofstars @makinstuff @apshamilton and @deepsouthpiddlin for the positive encouragement to keep trying three times, over many hours of typing away in a terminal.
If you want to have your dtube videos run better I suggest you stop by the onelovedtube community and talk to them about setting up your own community node. If that is too much for you, there is always an option to pay for a subscription for about $10 a month and #onelovedtube will pin your videos and increase their availability on the network for playback.
Link to their discord https://discordapp.com/invite/Sc4utKr
Donation addresses below to support my projects, infrastructure and other needs for building decentralized resources.
thanks @nevlu123 for the animation