Sharing Files with Clients
I have been recording standup comedy albums for a number of people since 2018. I have not, however, been involved heavily with the release of those albums. This is typically handled by a Record Label or self-released through a tool like TuneCore or DistroKid. While this post is not about those services, and I do have opinions about them, I am going to talk about sharing the album edits and cuts with the clients - the Comedian.
Current System
I use Google Drive to share audio files back and forth with the people I'm working with. I don't think this is acceptable in this day and age, despite it giving me a very easy interface for dealing with people who likely already use or have a Google account. I don't like Google and I don't like paying them $4 a month to get enough storage to store and share these files.
So I went looking for a self-hosting solution.
ProjectSend
I have this blog running on a server in my house, and connect it up to a VPS through wireguard, and then set up an NGiNX reverse proxy to deploy it to the greater internet. I decided I will do this same thing for ProjectSend.
I downloaded their docker-compose.yml file and set it up. However, once I
got the services up and running, I was getting CSP errors in my browser when
the application was looking for app.js and app.css over HTTP, instead of
HTTPS.
I decided to just copy the configuration I use for another service I expose to the World Wide Web:
location / { access_log off; proxy_pass http://local-service; # hidden for privacy proxy_set_header X-Real-Ip $remote_addr; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; }
This config was not right. As I mentioned above, it was trying to serve the resources for ProjectSend over HTTP, not HTTPS. So I did some digging and realized I need to add more headers to the Proxy Pass.
So I added:
poxy_http_versionproxy_set_header Upgradeproxy_set_header Connectionproxy_set_header X-Forwarded-Protoproxy_cache_bypass $http_upgrade
Which did the trick. Here is the final Reverse Proxy set up:
location / { access_log off; proxy_pass http://local-service; # hidden for privacy proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header X-Real-Ip $remote_addr; proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto https; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_cache_bypass $http_upgrade; }
I haven't started using the service yet, but its up and running and for my next client this is where the data will go. Stay tuned for me debugging and dealing with any issues that come from it.