 Tom here from Lawrence Systems. We're going to talk about updating and backing up Bitwarden. If you want to learn more about me and my company, head over to LawrenceSystems.com if you would like to hire us for a project or say hire us button up at the top. If you want to support this channel in other ways, some affiliate links down below to get your deals and discounts on products and services we talk about on this channel. And I've talked about Bitwarden a few times. I'm using the self-hosted version. So all of this is specifically about the self-hosted. Bitwarden lives in my XCPNG system here. So we'll go ahead and run the backup. And okay, would you like to back up Bitwarden? Yes. And it's a pretty simple straightforward way to back it up. You know, back up the entire virtual machine. Obviously, if you do this, it's not, well, it's not efficient. So backing it up, it doesn't take long, but backing it up all the time on an entire virtual machine just for some data kind of seems like overkill. Great idea to do as far as before you do one of these updates. I do recommend it. And it's nice to have the full virtual machine just to restore. But what about backing up the data itself? And what about the updates? So let's start here. So if we look over here and we see that I'm on the current version server latest, how do we get to the admin dashboard? What kind of magic is this? This is something specifically for these health-hosted version of Bitwarden. The way you get to the on-premise dashboard, and we'll start there actually, it's actually option six here. And they use a really simple setting. Under the admin settings, you decide who the admin is. This is part of your environment variables. And then you just put the users that you want to have access to this, and then they send, they go to the your self-hosted agents slash admin, and you get a magic link essentially. So the admin portable uses a means of password list authentication. When a user attempts to log in admin portal, a secure link is sent to email. The user can click this temporary link, continue logging into the admin portal. The link is active for 15 minutes. This lets you get to the portal, and you can make some adjustments and do some testing on the portal there. Back over here, backing up your data. So before we do any updates, let's make sure we have backups. And like I said, backing up a whole virtual machine just to back up some data may not make as much sense. But that's all right. They've got a solution for that. You go over to the BWData directory, MySQL slash data. That's where the database is. The core attachments are located in our BWData core slash attachments. And then you have the environment. Now they also have a backup folder in there. And this every night, it creates a backup of the database with, I believe there's 30 days rollback you can do on these. So that data gets dropped in there. Now from there, you can use whatever tool you want SSH and R sync, maybe even sync thing. I've covered that on a channel before to look at that folder and go, All right, I want to synchronize that folder and back it up. So as those data files get created, which are not very big, even for as many passwords and users as we have, they're pretty small. And you just back those up and it as needed basis. And of course, you could always get in and probably customize it. I don't have a guide on this. I'm daily backing it up, but you could probably customize it to backup more than daily, maybe several times a day, depends on how many passwords you're changing and what your risk factor is on that. Now it does use Docker. And one thing about using Docker is they've done a great job at Butte Warden for both their updates and for the way it treats data. Nothing is stored in the Docker image. And that's the proper concept for Docker where the application is completely ephemeral, can be destroyed and updated as needed. And your data is kept in a completely separate folder. So as you update this, it pulls down the new Docker images and I'll replace them, which I'll show you how to do that real quick. They have the restore functions in here as well, which is nice because I've seen processes that have backup operations. But if they don't document the restore operation, putting the data back is not always easy. So let's go over here, updating yourself, host it, install. Really straightforward, there's a command line script you can run in Linux or PowerShell, depending on how you've configured this, but update self and update. Update self, updates the update script, and then update is just pull all the updates and pulls a new Docker image. And I grabbed a screenshot of the last time I updated. This is what it looks like. It goes out, stops the service, grabs and pulls all the newest versions of the Docker images. And it takes care of everything else because it just points it back to that BWD directory. So it pulls away your installation. Now, as best I can tell, and I've run into this problem with other projects built on Docker, if they weren't built well, sometimes they don't connect to the right data pass. That's one buggy problem I've run into. The other buggy problem is when they don't prune Docker images. So each new Docker images pulls new Docker, but leaves sometimes a version backwards of the old one. That sounds good until it never has a purge method. And they just expect you to prune it yourself. And I've seen people over time build images and they keep forgetting not to prune the old ones. Therefore, you run out of disk space because it has every copy from the very beginning, and that's not necessarily effective sometimes. So not a big deal, though, in updating it. It seems to prune it properly. It starts and stops the services, even has all the proper pauses in there waiting for the different databases to spin up so it goes active again. So we've gone through a couple updates of Docker images from Bitwarden, and they've all gone really smooth. I haven't had any problems, no hangups, corrupted data, everything logs right back in perfectly fine. All the applications work. Now, because we are using this self-hosted, but not publicly exposed, that creates a challenge. If you're trying to use Let's Encrypt, I will mention that a solution and a workaround for that that does work perfectly fine is HA Proxy, because you do want to have a signed certificate. And I've covered how to do wildcard certificates with HA Proxy and PF Sense, for example. But you can really use it with whatever reverse proxy you want so long as you have the certificates. But if you want this not publicly exposed, it does require some type of reverse proxy, because the Bitwarden does have the built-in Let's Encrypt, which is awesome if I wanted to host it. Let's see in a digital ocean droplet. But we wanted this behind a VPN and only accessible, either from VPN inside the building or based on limited access rules that we have for our network. So I will throw that out there. The last comment I'll have is, yes, I'm aware there is a competing Bitwarden. It's a kind of a fork. It's pulled from some of the same data. I believe it's called Bitwarden RS Rust. I don't have an interest in using it. I like the official ones. And the reason I use the official ones is because we're using all the paid bells and whistles. And to my understanding of it, the Bitwarden RS one does not have all the features that you get with the official Bitwarden. I also trust the official Bitwarden because my problem is whenever there's not a business, it's just some random Docker images or whatever being done. Not to say that those texts may not be brilliant. When you have an entire company behind it, I trust the images getting on there. If someone else is doing it and it's their hobby, when they just get busy or something happens and they get bored with the project and there's no business model around it, it can be very tricky getting updates or having the latest versions on there. So that's one reason I've been using this officially because we do use it for business. And like I said, I did buy the enterprise or commercial licenses from Bitwarden. So those are my thoughts on Bitwarden backup and restore and updating. So far it's gone well for us. We haven't had any issues and I'll continue using it. Thanks. And thank you for making it to the end of the video. If you like this video, please give it a thumbs up. If you'd like to see more content from the channel, hit the subscribe button and hit the bell icon. If you'd like YouTube to notify you when new videos come out. If you'd like to hire us, head over to laurancesystems.com, fill out our contact page and let us know what we can help you with and what projects you'd like us to work together on. If you want to carry on the discussion, head over to forums.laurancesystems.com where we can carry on the discussion about this video, other videos, or other tech topics in general. Even suggestions for new videos, they're accepted right there on our forums, which are free. Also, if you'd like to help the channel out in other ways, head over to our affiliate page. We have a lot of great tech offers for you. And once again, thanks for watching and see you next time.