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
The major think noobs tend to mess up with docker is not setting up volumes properly so when you get rid of the instance, you lose all of your data.
I also highly recommend docker-compose for ease of use.
Id recommend looking up security best practices for docker as well. Things like setting a user id & gid for the containers add an additional layer of security.
Oh and make sure you get your containers from trustworthy sources.
exactly, when for example the nextcloud documentation says:
is not exactly clear that all the data will be 100% lost when the docker container is closed
And when it says more down in the docs "just use volumes to persist data" - yeah how to backup those volumes? No mention at all...
Should tell to mount a directory rather than a volume. Backup a directory is easy and everyone can do it, backup a docker volume, good luck, your data has an invisible time bomb
Docker volumes are just directories in /var/lib/docker/volumes
yes but does a noob know that? A directory placed where he typed the command first is much easier to find
@Moonrise2473 @cybersandwich I both agree and disagree... but always use named volumes. Easier to manage/monitor your volumes then use an <backup-container>, maybe rclone, that shares the same volume and sends the data to some safe place
or, if you still prefer, in your named volume section tell docker to use a custom path.
volumes:
myvolume:
driver: local
driver_opts:
type: none
o: bind
device: /host/path/to/volume
I immediately started with using docker-compose because I was playing with a “playground” server from my provider and I wanted to be able to move my setup to the “production” server after setting things up. It’s much easier than the long docker run commands some docs suggest.
One question about the UID and GID, I’ve run into some trouble because the official Caddy image runs as root, so I had to set php-fpm also as root because otherwise it was causing problem. So what do you suggest to do with all my containers (I do not mean Caddy and php right now)? Should I run everything as the same UID and GID, or every container with it’s own user?
I would not recommend docker-compose for a begginer. As first, one should learn basics, then optionally switch to docker-compose to automate stuff he already know. Also bind mount volumes are a better solution for long term storage than default volumes, since docker will never delete those, and their path in host system is configurable.