Selfhosted
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:
-
Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.
-
No spam posting.
-
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.
-
Don't duplicate the full text of your blog or github here. Just post the link for folks to click.
-
Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
-
No trolling.
Resources:
- selfh.st Newsletter and index of selfhosted software and apps
- awesome-selfhosted software
- awesome-sysadmin resources
- Self-Hosted Podcast from Jupiter Broadcasting
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
view the rest of the comments
One of the main advantage of podman is that, it respects the firewall rules. Docker don't do that. Also having rootless podman means if somehow the container went rogue, it cannot have access to your root directory and perform malicious actions.
Also podman is a drop in replacement for docker. It does not need much configurations to setup. If you need compose, you might need to install podman-compose as well.
I always hear podman is a drop in replacement, but every time I try most of my stack doesn't work. Permissions seem to be the issue most of the times, even when I create new volumes. I will try again in a few years probably, but I'm not holding my breath
Look into podman quadlets. Its containers as systemd services, and its excellent. They run as root by default, but can be run at a user level pretty easily. Ive had no permissions issues as long as you define the user/group in the config and ensure they habe the correct rights to the required folders.
It does take translation from docker compose files, but it's entirely doable. Most of the environmental variables translate straight across.
You need to add
:Z
to the end of your volume lines, or lowercasez
for shared volumes.I'm running 50+ containers, probably most of the popular ones, and all working fine.
You made me try again, and I again failed. For example, Navidrome has this issue: https://github.com/navidrome/navidrome/issues/2967
It seems aside from :z i have to remap the user namespace, which I remember trying in the past too and getting mixed results (some worked, some still didn't). I get this is not a podman issue (also affects rootless docker), but given the default behavior of docker is root, I am not having this issue.
The others didn't seem to fail at creation, which is a good thing, but I recall some had issues interacting with each other (files created by one not being readable by another and such). Might try with some other navidrome image (or equivalent subsonic server) but unless it's as easy as adding :z, I don't think ill be able to continue Thanks in any case :)
Here's my Navidrome config. This is running on uCore version of CoreOS, with rootless Podman and SELinux. I made no configuration changes to Podman out-of-the-box, and this is the full compose file.
Note: I have not done this. What are you running Podman on? Perhaps there is some config issue with the host, since you're having issues with many containers?
To be fair, maybe just go with docker if it's causing that much pain. But again, mine is working OOTB without making any changes to the Podman setup on ucore, and using the config below.
I don't necessarily agree with it, but there's the third option of just disabling SELinux and removing the frustration entirely.
How would a rogue container be able to access the root directory of the host? Wouldn't it just be able to access the data on the docker volumes? Thank you.
~~With root permission you can do chroot.~~
Edit, I did some digging and found that its not the normal files that they can access but can modify kernel parameters and can mount devices and access their files etc. If you want to learn more check https://stackoverflow.com/questions/36425230/privileged-containers-and-capabilities
Can you provide the required arguments for chroot? I've just opened the bash shell of a running container (docker exec -it mycontainer bash) and tried to "break out" using "chroot /". I can't access any files of the host.
https://stackoverflow.com/questions/36425230/privileged-containers-and-capabilities
Thank you, but this only applies to priviledged containers (which are normally not used and should not be used)
In an ideal world, sure, but all software has bugs (example vulnerabilities here). Proper security design doesn't ask "how can X happen?" but "what if X happens?" If you break out of a docker container, you have root access to the system because the docker daemon runs as root.
With podman, there is no root docker daemon, so you'd also need privilege escalation in addition to breaking out of the container.