• 0 Posts
  • 22 Comments
Joined 1 year ago
cake
Cake day: June 16th, 2023

help-circle







  • First of all, this might now answer your question fully, but…

    spotify-dl uses youtube music to download stuff, and if you have youtube premium you can get higher quality downloaded, I think it does opus 128 or 156 kbit, and the sound is quite good.

    tidal, deezer, or qobuz have cd or hi-res quality songs, and there are utils that help you get stuff from their service. qobuz-dl's the one I have been experimenting with. Obviously you need subscription for it, but spotify is generally shit.

    Apart from that I used few other sources to get my music.




  • I’d say, what kind of security are you talking about? Apart from standard HTTPS to keep things encrypted, there are other layers if you want to keep your service exposed to the internet.

    Also how things are installed and if they are correct, proper file permissions. nothing different than having it on the server somewhere. You just need to keep thing up to date and you’ll be fine.









  • I’m running both, via docker.

    Here’s the basic setup:

    NGiNX is standard installation, using certbot to manage the SSL certificates for the domains. Setup is via Nginx virtual hosts (servers), separate for Lemmy and Mastodon. Lemmy and Mastodon run each in their Docker containers, with different listning ports on localhost.

                      lemmy.domain.tld+------------------------+
                   +------------------+                        |
                   |                  |         Lemmy          |
                   |                  |         127.0.0.1:3000 |
                   |                  +------------------------+
                   |
    +--------------+----+
    |NGiNX with SSL     |   mastodon.domain.tld
    |and separate VHOSTS+--------------+-----------------------+
    |                   |              |          Mastodon     |
    +-------------------+              |          127.0.0.1:3001
                                       +------------------------
    
    

  • No problem. I’ll just go with a oversimplification.

    The idea is that you just take whatever traffic hits port 443 and use iptables rules to route the traffic elsewhere, or in this case

    Client --> [port 443] --> [iptables] --> [ port 443 home server]

    So, it’s basically just traffic forwarding from the VPS directly to your home server, being directly to your ISP IP address, or via wireguard IP address.

    So all the traffic you are sending back from the VPS is in its original state, and the actual processing happens on your local/home server.

    On the home server you have a Web Server of your choice listening on port 443 with, loaded with your SSL certificates. So, request is made to the VPS IP address, iptables just forward the packets to your home server, and there is where the SSL/TLS termination happens. The client negotiates the TLS connection directly with your home server, and web server on your home server then sends the request where you tell it to ( reverse proxy to a docker container, or it serves the content directly).

    With this, you basically turn the VPS into a passtrough for traffic.

    Here’s a quick test I did… the two servers are connected with Wireguard mesh.

    On the VPS you need have net.ipv4.ip_forward=1 .

    net.ipv4.ip_forward=1
    

    Your iptables rules should be. Obviously on the home server you can run the webserver on any port you like, doesn’t have to be 443. But let’s keep it 443 for the sake of argument.

    iptables -t nat -A PREROUTING -p tcp --dport 443 -j DNAT --to-destination HOME_SERVER_IP:443
    iptables -t nat -A POSTROUTING -j MASQUERADE
    

    If you want to drop the rules:

    iptables -t nat -F