this post was submitted on 28 Apr 2025
263 points (95.8% liked)

Selfhosted

46426 readers
759 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
263
What is Docker? (lemmy.world)
submitted 2 days ago* (last edited 2 days ago) by Jofus@lemmy.world to c/selfhosted@lemmy.world
 

Hi! Im new to self hosting. Currently i am running a Jellyfin server on an old laptop. I am very curious to host other things in the future like immich or other services. I see a lot of mention of a program called docker.

search this on The internet I am still Not very clear what it does.

Could someone explain this to me like im stupid? What does it do and why would I need it?

Also what are other services that might be interesting to self host in The future?

Many thanks!

EDIT: Wow! thanks for all the detailed and super quick replies! I've been reading all the comments here and am concluding that (even though I am currently running only one service) it might be interesting to start using Docker to run all (future) services seperately on the server!

top 50 comments
sorted by: hot top controversial new old
[–] Professorozone@lemmy.world 1 points 5 hours ago

Thank you for the thorough response. After looking carefully at what you wrote I didn't really see a difference between the term self-hosting and home network.

You said you have software that automatically downloads media. The way I see this using movies for instance, if I own the movies and have them on my machine, then I can stream them over my network and have full control. Whereas if I "own" them on Amazon and steam it from there, they can track the viewing experience, push ads, or even remove the content completely. I understand that.. But if I want a NEW movie, I'm back to Amazon to get it in the first place (or Netflix, or Walmart, etc. I get it). I'm fact, personally I've started actually buying disks of the movies/music I like most so that it can't really be taken away and I can enjoy it even without an Internet connection. Am I missing something? Unless of course the media you are downloading is pirated.

I know I'm asking what seems to be a huge question but I'm really only asking for a broad description, sort of an ELI5 thing.

[–] edifier@feddit.it 8 points 1 day ago

..baby don't hurt me.. No more..

[–] CodeBlooded@programming.dev 22 points 1 day ago* (last edited 16 hours ago)

Docker enables you to create instances of an operating system running within a “container” which doesn’t access the host computer unless it is explicitly requested. This is done using a Dockerfile, which is a file that describes in detail all of the settings and parameters for said instance of the operating system. This might be packages to install ahead of time, or commands to create users, compile code, execute code, and more.

This instance of an operating system, usually a “server,” is great because you can throw the server away at any time and rebuild it with practically zero effort. It will be just like new. There are many reasons to want to do that; who doesn’t love a fresh install with the bare necessities?

On the surface (and the rabbit hole is deep!), Docker enables you to create an easily repeated formula for building a server so that you don’t get emotionally attached to a server.

[–] Wytch@lemmy.zip 4 points 1 day ago

Thanks for asking this question. These replies are so much more helpful in understanding the basic premise than anything I've come across.

[–] grue@lemmy.world 88 points 2 days ago (25 children)

A program isn't just a program: in order to work properly, the context in which it runs — system libraries, configuration files, other programs it might need to help it such as databases or web servers, etc. — needs to be correct. Getting that stuff figured out well enough that end users can easily get it working on random different Linux distributions with arbitrary other software installed is hard, so developers eventually resorted to getting it working on their one (virtual) machine and then just (virtually) shipping that whole machine.

[–] anachrohack@lemmy.world 14 points 2 days ago (2 children)

Docker is not a virtual machine, it's a fancy wrapper around chroot

[–] grue@lemmy.world 7 points 1 day ago

I'm aware of that, but OP requested "explain like I'm stupid" so I omitted that detail.

[–] possiblylinux127@lemmy.zip 12 points 2 days ago (2 children)

No, chroot is kind of its own thing

It is just a kernel namespace

load more comments (2 replies)
load more comments (24 replies)
[–] Professorozone@lemmy.world 3 points 1 day ago (1 children)

Wow! Thank you all for the civilized responses. This all sounds so great. I am older and I feel like I've already seen enough ads for one lifetime and I hate all this fascist tracking crap.

But how does that work? Is it just a network on which you store your stuff in a way that you can download it anywhere or can it do more? I mean, to me that's just a home network. Hosting sounds like it's designed for other people to access. Can I put my website on there? If so, how do I go about registering my domain each year. I'm not computer illiterate but this sounds kind of beyond my skill level. I'll go search Jellyfin, weird name, and see what I can find. Thanks again!

[–] y0kai@lemmy.dbzer0.com 7 points 1 day ago* (last edited 1 day ago)

You're asking a lot of questions at one time and will be better served understanding you're knocking at the door of a very deep rabbit hole.

That said, I'll try to give you the basic idea here and anyone who can correct me, please do so! I doubt I'll get everything correct and will probably forget some stuff lol.

So, self hosting really just means running the services you use on your own machine. There's some debate about whether hosting on a cloud server - where someone else owns and has physical access to the machine - counts as self hosting. For the sake of education, and because I'm not a fan of gatekeeping, I say it does count.

Anyway, when you're running a server (a machine, real or virtualized, that is running a program connected to a network that can - usually - be accessed by other machines connected to that network), who and what you share with other machines on your network or other networks, is ultimately up to you.

When using a "hosted" service, which is where another entity manages the server (not just the hardware, but the software and administration too, and is therefore the opposite of self hosting. Think Netflix, as opposed to Jellyfin), your data and everything you do on or with that service on that network belongs to the service provider and network owners. Your "saved" info is stored on their disks in their data center. There are of course exceptions and companies who will offer better infrastructure and privacy options but that's the gist of non-self-hosted services.

To your specific questions:

But how does that work?

Hopefully the above helps, but this question is pretty open ended lol. Your next few questions are more pointed, so I'll try to answer them better.

Is it just a network on which you store your stuff in a way that you can download it anywhere or can it do more?

Well, kind of. If you're hosting on a physical machine that you own, your services will be accessible to any other machine on your home network (unless you segment your network, which is another conversation for another time) and should not, by default, be accessible from the internet. You will need to be at home, on your own network to access anything you host, by default.

As for storage of your data, self hosted services almost always default to local storage. This means, you can save anything you're doing on the hard-drive of the machine the server is running on. Alternatively if you have a network drive, you can store it on another machine on your network. Some services will allow you to connect to cloud storage (on someone else's machine somewhere else). The beauty is that you decide where your data lives.

I mean, to me that's just a home network. Hosting sounds like it's designed for other people to access. Can I put my website on there?

Like almost anything with computers and networking, the defaults are changeable. You can certainly host a service on the internet for others to access. This usually involves purchasing the rights to a domain name, setting that domain up to link to your private IP address, and forwarding a port on your router so people can connect to your machine. This can be extremely dangerous if you don't know what you're doing an isn't recommended without learning a lot more about network and cyber security.

That said, there are safer ways to connect from afar. Personally, I use a software called Wireguard. This software allows devices I approve (like my phone, or my girlfirend's laptop) to connect to my network when away from home though what is called an "encrypted tunnel" or a "Virtual Private Network (VPN) ". These can be a pain to set up for the first time if you're new to the tech and there are easier solutions I've heard of but haven't tried, namely Tailscale, and Netbird, both of which use Wireguard but try to make the administration easier.

You can also look into reverse proxies, and services like cloudflare for accessing things away from home. These involve internet hostng, and security should be considered, like above. Anything that allows remote access will come with unique pros and cons that you'll need to weigh and sort for yourself.

If so, how do I go about registering my domain each year.

Personally, I use Porkbun.com for cheap domains, but there are tons of different providers. You'll just have to shop around. To actually use the domain, I'm gonna be linking some resources lower in the post. If I remember correctly, landchad.net was a good resource for learning about configuring a domain but idk. There will be a few links below.

I'm not computer illiterate but this sounds kind of beyond my skill level.

It was beyond my skill level when I started too. It's been nearly a year now and I have a service that automatically downloads media I want, such as movies, shows, music, and books. It stores them locally on a stack of hard drives, I can access them outside of my house with wireguard as well. Further, I've got some smaller services, like a recipe book I share with my girlfriend and soon with friends and family. I've also started hosting my own AI, a network wide ad-blocker, a replacement for Google photos, a filesharing server, and some other things that are escaping me right now.

The point is that it's only a steep hill while you're at the bottom looking up. Personally, the hike has been more rejuvenating than tiresome, though I admit it takes patience, a bit of effort, and a willingness to learn, try new things, and fail sometimes.

Never sweat the time it takes to accomplish a task. The time will pass either way and at the end of it you can either have accomplished something, or you'll look back and say, "damn I could've been done by now."

I'll go search Jellyfin, weird name, and see what I can find. Thanks again!

Also check these out, if you're diving in:

YouTube:

Guides:

Tools:

Hopefully this helps someone. Good luck!

[–] Black616Angel@discuss.tchncs.de 85 points 2 days ago (1 children)

Please don't call yourself stupid. The common internet slang for that is ELI5 or "explain [it] like I'm 5 [years old]".

I'll also try to explain it:

Docker is a way to run a program on your machine, but in a way that the developer of the program can control.
It's called containerization and the developer can make a package (or container) with an operating system and all the software they need and ship that directly to you.

You then need the software docker (or podman, etc.) to run this container.

Another advantage of containerization is that all changes stay inside the container except for directories you explicitly want to add to the container (called volumes).
This way the software can't destroy your system and you can't accidentally destroy the software inside the container.

[–] entwine413@lemm.ee 21 points 2 days ago (1 children)

It's basically like a tiny virtual machine running locally.

[–] folekaule@lemmy.world 33 points 2 days ago (1 children)

I know it's ELI5, but this is a common misconception and will lead you astray. They do not have the same level of isolation, and they have very different purposes.

For example, containers are disposable cattle. You don't backup containers. You backup volumes and configuration, but not containers.

Containers share the kernel with the host, so your container needs to be compatible with the host (though most dependencies are packaged with images).

For self hosting maybe the difference doesn't matter much, but there is a difference.

[–] fishpen0@lemmy.world 13 points 2 days ago (2 children)

A million times this. A major difference between the way most vms are run and most containers are run is:

VMs write to their own internal disk, containers should be immutable and not be able to write to their internal filesystem

You can have 100 identical containers running and if you are using your filesystem correctly only one copy of that container image is on your hard drive. You have have two nearly identical containers running and then only a small amount of the second container image (another layer) is wasting disk space

Similarly containers and VMs use memory and cpu allocations differently and they run with extremely different security and networking scopes, but that requires even more explanation and is less relevant to self hosting unless you are trying to learn this to eventually get a job in it.

load more comments (2 replies)
[–] LovableSidekick@lemmy.world 11 points 1 day ago (1 children)
[–] lando55@lemmy.world 4 points 1 day ago

+1 for Techworld with Nana

[–] DieserTypMatthias@lemmy.ml 5 points 1 day ago

It's the platform that runs all of your services in containers. This means they are separated from your system.

Also what are other services that might be interesting to self host in The future?

Nextcloud, the Arr stack, your future app, etc etc.

[–] InvertedParallax@lemm.ee 12 points 1 day ago* (last edited 1 day ago) (1 children)

This thread:

Jails make docker look like windows 11 with copilot.

[–] possiblylinux127@lemmy.zip 6 points 1 day ago

Those are Apples and Oranges

[–] Cenzorrll@lemmy.world 18 points 2 days ago (1 children)

EDIT: Wow! thanks for all the detailed and super quick replies! I've been reading all the comments here and am concluding that (even though I am currently running only one service) it might be interesting to start using Docker to run all (future) services seperately on the server!

This is pretty much what I've started doing. Containers have the wonderful benefit that if you don't like it, you just delete it. If you install on bare metal (at least in Linux) you can end up with a lot of extra packages getting installed and configured that could affect your system in the future. With containers, all those specific extras are bundled together and removed at the same time without having any effect on your base system, so you're always at your clean OS install.

I will also add an irritation with docker containers as well, if you create something in a container that isn't kept in a shared volume, it gets destroyed when starting the container again. The container you use keeps the maintainers setup, for instance I do occasional encoding of videos in a handbrake container, I can't save any profiles I make within that container because it will get wiped next time I restart the container since it's part of the container, not on any shared volume.

[–] InvertedParallax@lemm.ee 1 points 7 hours ago

Worst part about docker: insane volume management.

[–] zer0squar3d@lemmy.dbzer0.com 4 points 1 day ago

Now compare Docker vs LXC vs Chroot vs Jails and the performance and security differences. I feel a lot of people here are biased without knowing the differences (pros and cons).

[–] Ozymandias88@feddit.uk 14 points 2 days ago

I don't think I really understood docker until I watched this video which takes you through building up a docker-like container system from scratch. It's very understandable and easy to follow if you have a basic understanding of Linux operating systems. I recommend it to anyone I know working with docker:

https://youtu.be/8fi7uSYlOdc

Alternative Invidious link: https://yewtu.be/watch?v=8fi7uSYlOdc

[–] echutaaa@sh.itjust.works 27 points 2 days ago

It’s a container service. Containers are similar to virtual machines but less separate from the host system. Docker excels in creating reproducible self contained environments for your applications. It’s not the simplest solution out there but once you understand the basics it is a very powerful tool for system reliability.

Docker is a set of tools, that make it easier to work with some features of the Linux kernel. These kernel features allow several degrees of separating different processes from each other. For example, by default each Docker container you run will see its own file system, unable to interact (read: mess) with the original file system on the host or other Docker container. Each Docker container is in the end a single executable with all its dependencies bundled in an archive file, plus some Docker-related metadata.

[–] xavier666@lemm.ee 13 points 2 days ago

Learn Docker even if you have a single app. I do the same with a Minecraft server.

  • No dependency issues
  • All configuration (storage/network/application management) can be done via a single file (compose file)
  • Easy roll-backs possible
  • Maintain multiple versions of the app while keeping them separate
  • Recreate the server on a different server/machine using only the single configuration file
  • Config is standardized so easy to read

You will save a huge amount of time managing your app.

PS: I would like to give a shout out to podman as the rootless version of Docker

[–] Professorozone@lemmy.world 9 points 2 days ago (6 children)

I've never posted on Lemmy before. I tried to ask this question of the greater community but I had to pick a community and didn't know which one. This shows up as lemmy.world but that wasn't an option.

Anyway, what I wanted to know is why do people self host? What is the advantage/cost. Sorry if I'm hijacking. Maybe someone could just post a link or something.

[–] sugar_in_your_tea@sh.itjust.works 20 points 2 days ago* (last edited 2 days ago)

It usually comes down to privacy and independence from big tech, but there are a ton of other reasons you might want to do it. Here are some more:

  • preservation - no longer have to care if Google kills another service
  • cost - over time, Jellyfin could be cheaper than a Netflix sub
  • speed - copying data on your network is faster than to the internet
  • hobby - DIY is fun for a lot of people

For me, it's a mix of several of reasons.

[–] Kirk@startrek.website 12 points 2 days ago

People are talking about privacy but the big reason is that it gives you, the owner, control over everything quickly without ads or other uneeded stuff. We are so used to apps being optomized for revenue and not being interoperable with other services that it's easy to forget the single biggest advantage of computers which is that programs and apps can work together quickly and quietly and in the background. Companies provide products, self-hosting provides tools.

[–] irmadlad@lemmy.world 12 points 2 days ago (1 children)

Anyway, what I wanted to know is why do people self host?

Wow. That's a whole separate thread on it's on. I selfhost a lot of my services because I am a staunch privacy advocate, and I really have a problem with corporations using my data to further bolster their profit margins without giving me due compensation. I also self host because I love to tinker and learn. The learning aspect is something I really get in to. At my age it is good to keep the brain active and so I self host, create bonsai, garden, etc. I've always been into technology from the early days of thumbing through Pop Sci and Pop Mech magazines, which evolved into thumbing through Byte mags.

load more comments (1 replies)
load more comments (3 replies)
load more comments
view more: next ›