[Script Info] Title: [Events] Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Hi everyone, welcome back Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,So today we're going to try\Nsomething a little bit different. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,We're gonna start a new video series Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,about all the different ways to\Nexpose or access our homelab Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,from the internet. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,The reason is mainly because\Nthere's tons of options out there, Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and I feel like it's not talked enough about on YouTube. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Especially the security part Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,which is most important. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Almost everyone just assumes it's secure, which isn't always the case, Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so make sure to hit the Like button Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Subscribe and Share Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and let's get started. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Okay so how to do it, Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,to expose our homelab\Nthere are five main ways Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,1. Secure Tunnels like Cloudflare Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,2. Reverse proxies like Nginx Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,3. Traditional VPNs like Wireguard\Nor OpenVPN protocols Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,4. Mesh VPNs like ZeroTier and Tailscale Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and lastly 5. the old classic \Nport forwarding or NAT Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,So let's break down each one of them\Nquickly to understand the differences. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,First secure tunnels like Cloudflare. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,This is often defined as secure tunnels to \Naccess your app without exposing your IP Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,making remote access easy. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,It's also fairly easy to setup, Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,however, by default it's not secured enough Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and solely [relies] on your app security Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,but this can be improved. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,We'll cover this later in another video. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Next, reverse proxies Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,like nginx. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,It's a server that sits in the middle and forward requests to your homelab Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,helping you manage multiple services under one domain. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,While adding another layer of protection, Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,you will have more control over your services Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and how to contr-\Nmanage them. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,However, it exposes your IP and you must open a port on your router to access it. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Next, traditional VPNs like Wireguard or OpenVPN. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,It creates an encrypted tunnel between your device and Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,your homelab Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,making it feel like you are on the same local network. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,It's good for privacy and security Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,but only useful when you are the only user because Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,it's impossible to share access without sharing your private key Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,to other users. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Next, mesh VPNs Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,like ZeroTier or Tailscale Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,this is similar to normal VPNs except it connects devices between each other Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,instead of connecting them to a central server. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,It has more control over normal VPNs in the way that you can choose which devices to share Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,but you must manually join the network Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,each time for each devices you want to give access to. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Finally NAT this is a classic way of opening specific ports on your router Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,to expose your homelab. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,It's simple but it also carries high security risk if you rely on it alone. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Keep in mind NAT often gets used with other Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,methods like previously showed, Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,but going purely [on it's own] port forwarding is a no-go for secure setups. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Now, you may be wondering, Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,what's the most secure setup Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,to expose your home lab? Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Actually, [it] depends on your apps and what you want to do? Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,In my opinion, it's not about which method you use Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,but more about how you combine between them. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,The best setup is to mix them\Nand make them work all together Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,, Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,to have the perfect setup. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Okay so first let's go to cloudflare.com Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Go to "Sign Up" Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and free at the website. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,And let's create a new account now. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,After that if you already have [a]\Ndomain [previously purchased] Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,enter it here Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,or for me I'm just going to create a new domain. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,For some reason I got an error Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,when trying to pay Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,So I'm just going to import an existing domain Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Just going to type it here. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Okay, so then go down Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and choose the free package. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Next click on continue to activation. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Confirm. Next we need to \Ndo some modifications Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,, Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,We need to modify, the current name servers Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,with Cloudflare nameservers Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,to allow Cloudflare to control the domain. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,To do that, Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,we go to the domain provider Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,in my case it's NameCheap. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,So in my case Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,I'm gonna do custom DNS Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and then I copy.... Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,the nameservers Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and then I save. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,It tells you that it can take \Nup to 48 hours Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,But it's not true it [can take] just a few seconds Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,or a few minutes max Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,But, just in case Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,If it take a long time to update Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Uh, this is normal so Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,just wait Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,There is no other choice Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Okay, so after a while, Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,We get this page this means everything is good Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Now we go to access page Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and then NetZero Trust. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,We choose our account Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Next you go to access Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Next we choose teamname Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Just anything Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Then we choose the free package of course Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,There is zero payment Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Next we go to Networks Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Tunnels Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,And we add a tunnel Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,We choose this one Cloudflared Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,We name our Tunnel Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Homelab uh test Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Next it will ask you to choose your environment Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,In this case you just uh Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,You just choose docker Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and then we just copy the comment Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,because we just need the token. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,We don't need to run anything docker Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Then we go back to TrueNAS Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and we install Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,the Cloudflared app. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,This one Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,And here we['ve] got [to just]\Npaste what we had Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,, Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and we just keep. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Remove everything, we just keep the token. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,So anything before this goes. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,That's it. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,We don't need to setup anything else. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Even storage, it's not necessary. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,And we install. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Okay now it's up and running. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Let's go back to Cloudflared profile. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Now we need to wait until we get uh Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,something here in connectors. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,It will automatically search. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Alright here we go Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,It's connected. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,So now we can continue. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Next Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Now we're ready to add our first service. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Let's start by adding TrueNAS itself. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,So let's just copy the IP Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Then we choose the subdomain Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,TrueNAS Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and choose the domain Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,then we choose HTTP Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and then the IP Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,There is nothing specific to add there. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,That's save. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,To test this I'm going to disconnect from the VPN Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Because i'm not at home I'm connected to my home VPN. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,So i'm just going to deactivate it Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and try this. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,To show that likely if I try to go to the same IP Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,, Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,It's not going to work, Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,because I disconnected from the VPN. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,And if I try Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,a domain, Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,new domain. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,It works. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,So now Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,TrueNAS is accessible Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,from the outside. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,But this is not recommended of course. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,If you want to expose something Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,just expose the apps individually Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,don't expose the whole thing. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,So now I'm just going to delete it Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and then I'm gonna add something else. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Okay now I want to add another service. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Maybe, Proxmox Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Let's go to add the public hostname Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Proxmox Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,same thing Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,here's we're going to choose HTTPS instead of HTTP Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and then the IP Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,as well as the port which is 8... Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,8006 Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and then we go to Additional Settings > TLS Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and we enable No TLS verify. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,It will not check certificates. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Now let's save. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Let's try again now. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,NIce! Now it works. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,And we'll disconnect the VPN Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and refresh Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and it still works. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Okay now before we're finishing the video Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,let's do Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,one last service which is Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Paperless. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Since we already covered this in a previous video, Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,we're going to see how to expose this Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Why did I choose Paperless because Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,it's a bit tricky to setup Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,it's not as simple as Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,adding the hostname. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,So, let's see first we just add the hostname of course Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,same thing as always, Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,HTTPS, and then we take the URL Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,which is IP and Port Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,It chooses HTTP not HTTPS Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Service name Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,So first it's gonna work normally Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,ff I try to access. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Alright Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Uh, but the problem is when you Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,try to login Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,You get this Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,error. CSRF verification failed. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Why? Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,We need to change some settings Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,to make it accessible. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,According to the documentation Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,we need to set this environment variable (PAPERLESS_URL) Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,uh and uh, set it to the domain name Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,we used in Cloudflare. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,So let's do that Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,go to Paperless > Edit Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and let's just add it as an environment variable here Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,PAPERLESS_URL Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,set it to paperless.yourdomain Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,make sure to add HTTPS to the beginning Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and that's it. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Update. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,In case you got stuck in deploying Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,which was the case for me Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,I'm not sure why but the container Paperless Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,just stuck like this for a long time Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,So what I did is stop this instance Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and create another instance Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,using the already created datasets. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,So you're not going to lose anything Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,of your files. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,So let's start another instance Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Let's call it paperless-cloudflare. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,We can change password if you want. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,By the way you can choose any secret key Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,you want. Just want some random stuff Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,You don't need to remember it. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Okay, add an email Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,just a fake email. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Password. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Now we add again environment variable Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,PAPERLESS_URL Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,HTTPS Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,paperless… Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,dot Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,your domain Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and then we add the other host path Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,paperless this is the data Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,let's copy this Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,And now Media Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and then Consume Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and Trash Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,this is postscript Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Make sure to check "Automatic Permissions" Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Then we hit install Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Let's wait [a] little bit Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,It works but it takes some time Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Okay now it's running Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Let's start it Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,First let's get the IP Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,I mean let's get the part-- IP is the same Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Go back to cloudflare Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Hit it Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Going to put the new port Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Save Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Let's try now Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Okay, now new password Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,And now it works. We don't got the error Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,the previous error. Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,And as you can see we still have the documents Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,as a before we didn't lost anything Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,We still got all our documents Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Open them Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,And uh, everything works fine Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,That's it Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Basically this is how to Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,expose your services on the cloud Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,To recap Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,when you want to expose your app Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,this is how it works Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,we don't access the app directly Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,but rather you access the cloudserver Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,cloudflare server. Cloudflare will make exchanges Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,with your Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,LAN network through Cloudflare Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and then Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,It will give access to your app Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,This way you don't Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,access your app directly Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,which means you don't expose your Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,IP and you don't go through the NAT Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,you don't need to open a port Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,but be careful if your habit is insecure Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and you get hacked. You directly expose Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,all of your homelab Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,It doesn't matter if you use Cloudflare Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,or not Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,Like and Share if you made it this far Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,See you in the next video