(This is a repost of this reddit post https://www.reddit.com/r/selfhosted/comments/1fbv41n/what_are_the_things_that_makes_a_selfhostable/, I wanna ask this here just in case folks in this community also have some thoughts about it)

What are the things that makes a selfhostable app/project project good? Maybe another way to phrase this question is, what are the things that makes a project easier to self-host?

I have been developing an application that focuses on being easy to selfhost. I have been looking around for existing and already good project such as paperless-ngx, Immich, etc.

From what I gather the most important thing are:

  • Good docs, this is probably the most important. The developer must document how to self-host
  • Less runtime dependency–I’m not sure about this one, but the less it depends on other services the better
  • Optional OIDC–I’m even less sure about this one, and I’m also not sure about implementing this feature on my own app as it’s difficult to develop. It seems that after reading this subreddit/community, I concluded that lots of people here prefer to separate identity/user pool and app service. This means running a separate service for authentication and authorization.

What do you think? Another question is, are there any more good project that can be used as a good example of selfhostable app?

Thank you


Some redditors responded on the post:

  • easy to install, try, and configure with sane defaults
  • availabiity of image on dockerhub
  • screenshots
  • good GUI

I also came across this comment from Hacker News lately, and I think about it a lot

https://news.ycombinator.com/item?id=40523806

This is what self-hosted software should be. An app, self-contained, (essentially) a single file with minimal dependencies.

Not something so complex that it requires docker. Not something that requires you to install a separate database. Not something that depends on redis and other external services.

I’ve turned down many self-hosted options due to the complexity of the setup and maintenance.

Do you agree with this?

  • 𝘋𝘪𝘳𝘬@lemmy.ml
    link
    fedilink
    English
    arrow-up
    10
    arrow-down
    4
    ·
    13 days ago

    To me the number one thing is, that it is easy to setup via Docker. One container, one network (ideally no network but just using the default one), one storage volume, no additional manual configuration when composing the container.

    No, I don’t want a second container for a database. No I don’t want to set up multiple networks. Yes, I already have a reverse proxy doing the routing and certificates. No, I don’t need 3 volumes for just one application.

    Please just don’t clutter my environment.

    • traches@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      11
      arrow-down
      4
      ·
      13 days ago

      I disagree with pretty much all of this, you are trading maintainability and security for easy setup. Providing a docker-compose file accomplishes the same thing without the sacrifice

      • separate volumes for configuration, data, and cache because I might want to put them in different places and use different backup strategies. Config and db on SSD, large data on spinning rust, for example.
      • separate container for the database because the official database images are guaranteed to be better maintained than whatever every random project includes in their image
      • separate networks because putting your reverse proxy on a different network from your database is just prudent
    • hono4kami@slrpnk.netOP
      link
      fedilink
      English
      arrow-up
      6
      ·
      13 days ago

      No, I don’t want a second container for a database.

      Unless you’re talking about using SQLite:

      Isn’t the point of Docker container is to only have one software/process running? I’m sure you can use something like s6 or other lightweight supervisor, but I feel like that’s seems counterintuitive?

      • 𝘋𝘪𝘳𝘬@lemmy.ml
        link
        fedilink
        English
        arrow-up
        1
        ·
        12 days ago

        To me, the point of Docker is having one container for one specific application. And I see the database as part of the application. As well as all other things needed to run that application.

        Since we’re here, lets take Lemmy for example. It wants 6 different containers with a total of 7 different volumes (and I need to manually download and edit multiple files before even touching anything Docker-related).

        In the end I have lemmy, lemmy-ui, pictrs, postgres, postfix-relay, and an additional reverse proxy for one single application (Lemmy). I do not want or need or use any of the containers for anything else except Lemmy.

        There are a lot of other applications that want me to install a database container, a reverse proxy, and the actual application container, where I will never ever need, or want, or use any of the additional containers for anything else except this one application.

        So in the end I have a dozen of containers and the same amount of volumes just to run 2-3 applications, causing a metric shit-ton of maintenance effort and update time.

        • Zeoic@lemmy.world
          link
          fedilink
          English
          arrow-up
          2
          ·
          12 days ago

          I agree with this. If you are going to be using multiple containers for a single app anyways, what is the point of it being in multiple containers? Stick all of it in one container and save everyone the hassle.

          • schizo@forum.uncomfortable.business
            link
            fedilink
            English
            arrow-up
            1
            ·
            12 days ago

            It’s because of updates and who owns the support.

            The postgres project makes the postgres container, the pict-rs project makes the pict-rs container, and so on.

            When you make a monolithic container you’re now responsible for keeping your shit and everyone else’s updated, patched, and secured.

            I don’t blame any dev for not wanting to own all that mess, and thus, you end up with seperate containers for each service.

        • traches@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          1
          ·
          12 days ago

          I can see why editing config files is annoying, but why exactly are two services and volumes in a docker-compose file any more difficult to manage than one?

          • 𝘋𝘪𝘳𝘬@lemmy.ml
            link
            fedilink
            English
            arrow-up
            1
            ·
            12 days ago

            See it in a broader scope. If I’d only host Lemmy with is multiple mandatory things, I couldn’t care less, but I already have some other applications that I run via Docker. Fortunately I was able to keep the footprint small, no multiple containers or volumes for one application, but as said: those exist. And they would clutter the setup and make it harder to maintain an manage.

            I also stand by my point that it is counter-intuitive to have multiple containers and volumes for just one single application.

            • traches@sh.itjust.works
              link
              fedilink
              English
              arrow-up
              1
              ·
              12 days ago

              Ok but is there room for the idea that your intuitions are incorrect? Plenty of things in the world are counter-intuitive. ‘docker-compose up -d’ works the same whether it’s one container or fifty.

              Computer resources are measured in bits and clock cycles, not the number of containers and volumes. It’s entirely possible (even likely) that an all-in-one container will be more resource-heavy than the same services split across multiple containers. Logging from an all-in-one will be a jumbled mess, troubleshooting issues or making changes will be annoying, it’s worse in every way except the length of output from ‘docker ps’

              • 𝘋𝘪𝘳𝘬@lemmy.ml
                link
                fedilink
                English
                arrow-up
                1
                ·
                12 days ago

                docker ps or Portainer as a nice web-UI wrapper around the Docker commands are the two main use cases with Docker I have have on a regular basis.

                No, thank you. I am not going to maintain fifty containers and fifty + X volumes for just a handful of applications and will alway prefer self-contained applications over applications that spread over multiple containers for no real reason.

    • ÚwÙ-Passwort@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      13 days ago

      I prefer this, but if the options are available its shows me that soneone actually thought about it while creating the software/conatiner

    • silmarine@discuss.tchncs.de
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      1
      ·
      13 days ago

      I came here to basically say this. It’s especially bad when you aren’t even sure if you want to keep the service and are just testing it out. If I already have to go through a huge setup/troubleshooting process just to test the app, then I’m not feeling very good about it.