this post was submitted on 28 Jun 2023
21 points (95.7% liked)

Selfhosted

40134 readers
1145 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 1 year ago
MODERATORS
 

Or maybe a two click solution? :)

top 36 comments
sorted by: hot top controversial new old
[–] [email protected] 11 points 1 year ago (5 children)

Self hosting what?

In general

  1. Install docker
  2. Copy and paste docker run commands from the getting started guide
  3. Learn from mistakes
[–] [email protected] 2 points 1 year ago (1 children)

Also learn how to translate docker commands to docker-compose.yml

[–] [email protected] 1 points 1 year ago

docker-compose helped me wrap my head around docker. I can use run commands now, but prefer to either modify a compose file or create my own to spin things up.

[–] [email protected] 1 points 1 year ago

I agree but use docker-compose instead!

[–] [email protected] 1 points 1 year ago (1 children)

It's so easy to self host these days. I remember when you'd have to fuck around with Apache configs and fuck around with app config files etc. Now you just run docker. It's so great these days!

[–] [email protected] 2 points 1 year ago (1 children)

I'm still fucking with the apache configs (I fucking hate apache...). As someone with no docker experience whatsoever, are there any getting started guides you would recommend for someone looking to make the switch?

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago)

I don't have any specific guides in mind, but you'll want to use docker-compose as much as possible, also create /home/your_user/docker/app/ for each app, and keep your docker compose files. If you use docker run, keep a copy of the commands you use, because if you need to restart your services, it will be a lot easier than having to search up the command in your bash history again. You can just cat docker.txt | bash and it will recreate your docker containers for you. That's all i can really think of for getting started. Also, docker ps will be a godsend.

[–] [email protected] 1 points 1 year ago (2 children)

Okay. I keep reading about docker. What's the difference between a docker and just installing an app on rented server space?

Does each dock (?) have its own server? (Apache or nginx or whatever?)

Does each dock host a whole site, or do you have a dock for your database and a dock for your web app?

[–] [email protected] 2 points 1 year ago* (last edited 1 year ago)

What's the difference between a docker and just installing an app on rented server space?

Functionally? Not much. But people who selfhost typically want everything on computers they own. Whether it's for learning purposes, or to not have their stuff on "someone else's computer" selfhosting usually means you're running software on computers you own, almost always within your own house.

Does each dock (?) have its own server? (Apache or nginx or whatever?)

Each docker image usually has a web server built in. The philosophy of docker is that it contains everything needed to run the app. Even a small linux OS (LibELEC or Alpine are favorites for docker images). So while you're not managing the web server in a docker image each docker image will have its own web server if web access is needed

Does each dock host a whole site, or do you have a dock for your database and a dock for your web app?

Docker the program is what runs all the docker images on a computer. Each docker image is built as per the software's developer. Some docker images will have a web app and a database combined into a single image, while others will expect a separate database server running independent of the image (It won't care if the database server is a docker image or not; just that it has access)

[–] [email protected] 1 points 1 year ago (1 children)

Docker is basically a virtual machine image you write your software in. Then when you run the software you don’t need to worry about compatibility or having the right dependencies installed, it’s all included in the docker image.

Think of Docker as being Nintendo cartridges that you can take to any friends house, plug them in, and play. Servers can run more than one Docker container.

The approach greatly simplifies writing code and having it work on your server, reduces errors, and adds a layer of security.

[–] [email protected] 1 points 1 year ago

I've read and reread, listened and relistened to info on docker/containers and I still feel like I'm missing something tbh.

Let's say you have a docker container for something and it's for a Linux distro, that won't run on another OS, will it? Maybe not even a different Linux distro from the one it was made for (e.g. Ubuntu or Arch or Fedora or whatever).

To go off your example, Docker's not like an expansion module to make your Switch games work on a PlayStation or Xbox...Right? There seems to be some kind of mixed messaging on this, the way they're so readily recommended (which seems to be related to a presumption of familiarity that often isn't there toward those inquiring).

I guess I've also been confused because like...Shouldn't old installers handle bundling or pulling relevant dependencies as they're run? I'd imagine that's where containers' security benefits come into play though, alongside being virtualized processes if I'm not mistaken.

[–] [email protected] 1 points 1 year ago

To be fair thats pretty much the IT gig in general, not the docker part but the rest copy/paste run commands, then learn from whatever you screw up couple of years later you might very well end up working in IT

[–] [email protected] 4 points 1 year ago

I think Unraid is a good place to start. Have a look through SpaceInvader One's channel and IBRACORP'S channel. Lots of great resources here.

[–] [email protected] 4 points 1 year ago* (last edited 1 year ago) (1 children)

Depends on what you want to self-host. In general, I would advise against self-hosting anything before you familiarise yourself with the basics of *nix, networking and cyber security.

You at least need to know enough to make sure that whatever you host is only available within your local network and is inaccessible from the outside.

Once that’s ensured, go nuts, experiment, learn, evolve.

In terms of how to start, really depends on your budget, what hardware you can spare, how much space you have at your place etc.

For the most basic playground it’s enough to have a raspberry pi or similar, or a very old laptop / desktop computer.

For something more swanky you can get old Dell servers (e.g. R420) online for around 100$ or so. They are quite power hungry though. Or you can get yourself a NUC and use that.

If all of this sounds like too much work, just get yourself QNAP / Synology NAS and see what it can do for you (it is way more limited in terms of options, but easier to setup and you can still have your Plex / file sharing / docker containers).

[–] [email protected] 1 points 1 year ago

I would like to self host a lemmy instance.

I know enough to have setup an ubuntu server with docker containers and servers on my local network, but except a minecraft server never exposed any kind of server to the web.

[–] [email protected] 3 points 1 year ago

tl;dr:

Go to search.brave.com

Search for "docker cheat sheet"

Write it down

Then search "How to install docker on (Your current OS)"

Click on whatever link appears first, blindly follow the step by step

Then search "Best things to self-host"

Check the first two links, see if something tickles your fancy

Then search for "How to install (ticklyfancy stuff) on docker"

Once again, blindly follow the step by step

Congrats! You are now a pro docker user.

[–] [email protected] 3 points 1 year ago (1 children)

I think you should just choose whatever software or project you want to selfhost, read how to do it, and learn by doing.

I'm a complete idiot but I learned how to self host from trying to set up a Jellyfin server on my Windows desktop. Now I host game servers, Matrix with bridges, Discord bots, and this Lemmy instance that I'm in. I (re)learned how to use Linux and fell in love with it too.

It's all about reading the manual I guess.

[–] [email protected] 1 points 1 year ago

This is how I got a career in Software Engineering, literally had a strong motivation to build a clan website for my Counter-Strike 1.6 crew and I just ended up learning by maintaining self-hosted websites, forums, and voip. Kept doing it over and over by building other projects and then realized people pay for this skill...

[–] [email protected] 2 points 1 year ago

Hmm maybe Unraid with the community store? When you got unraid running its just a matter of selecting an app from the store and hop: it runs. Kinda..

[–] [email protected] 2 points 1 year ago (1 children)

What about renting a server and running it there?

[–] [email protected] 1 points 1 year ago (1 children)

So you "self"host elsewhere?

[–] [email protected] 1 points 1 year ago (2 children)

Well, it's still selfhosting

[–] [email protected] 1 points 1 year ago
[–] [email protected] 1 points 1 year ago
[–] [email protected] 1 points 1 year ago* (last edited 1 year ago) (1 children)

For a two click solution: YunoHost

Disclaimer: I didn't try it out myself.

[–] [email protected] 1 points 1 year ago (2 children)

I am currently using yunohost.

I report that it works out of the box within the local network.

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago) (1 children)

Is it basicly a docker alternative?

[–] [email protected] 1 points 1 year ago

In some way yes, but Docker is containerization engine, which can be used to selfhost stuff. Yunohost is special OS for selfhosting and only selfhosting. Apps installed using Yunohost are not containerized, and they are made for easy deployment.

[–] [email protected] 0 points 1 year ago (1 children)

it is easy to use outside the network too. I use Yunohost for more than a 1 year

[–] [email protected] 0 points 1 year ago (1 children)

currently struggling to make use of zerotier to do that.

all the DNS stuff is like magic for me.

Did you take the route via a fixed IP and a bought domain?

[–] [email protected] 1 points 1 year ago

Yunohost provides free domains (nohost.me, ynh.fr or noho.st) with Dynamic DNS, but i bought domain in Gandi. I use this simple script https://github.com/cichy1173/yunoDnsUpdater to update DNS if IP changes. I am thinking about buying fixed IP, but it is additional cost every month.

[–] [email protected] 1 points 1 year ago

https://www.youtube.com/c/SpaceinvaderOne

This guy got me from 0 to having a bunch of useful internet facing services.

[–] [email protected] 1 points 1 year ago

You could through the following route:

  • purchase something like a small Synology NAS and learn how to set up the networking/firewall bits
  • buy/repurpose a used desktop/laptop, install something like yunohost/unraid
  • buy parts for your own server, put it together, use the same own server but install proxmox, setup VMs/containers
  • use the same own server but install debian, play around with docker/docker-compose/ansible

If you don't have the means to get new hardware, you can use hyper-v or virtualbox for free on Windows or virtualbox/virt-manager on Linux on existing hardware.

Simple project to start with: install pihole and configure it as your DNS adblocking filter at home

  • install iphole on a VM/PC/raspberry pi that is connected to your home LAN
  • configure your PC or router to use the pihole host as DNS server
  • test various websites you know that have ads before and after using pihole

While doing things like these, keep notes what you do by day, using those notes, put together your own howto manuals. Do not be afraid to fail, sleep over it and try again, don't be afraid to ask specific questions here or on other forums, IRC.

[–] [email protected] 1 points 1 year ago

I got started (with minimal knowledge and a love for tinkering) by installing proxmox on an old computer (i3 with 8gb of ram) and then using Proxmox Helper scripts https://tteck.github.io/Proxmox/. I run home assistant in a vm within proxomox and have a docker instance running in a container in proxmox. It's all been fairly easy so far, although I'm not sure I'd call it a one- or two- click solution. I got started from the home assitant community, and I'm new to the self hosted community, so I may do things a little differently from others around here.

[–] [email protected] 0 points 1 year ago (1 children)

What would be the point of self hosting then?

Generally speaking installing stuff on a raspberry pi with docker and accessing it over a vpn is pretty safe and already straightforward.

load more comments
view more: next ›