1. 4

Context: I maintain a fairly straightforward piece of forum software. It was originally only intended to host the little community I wrote it for, but over the years it’s become more mature and folks have asked about running their own instances for other purposes. It’s always a bit of an awkward situation because it has to start with “well, how familiar are you with server provisioning?”, and the answer is usually “not at all”. It’s not complicated software by professional standards, but the way I’ve hosted it was to rent out some VPSs, install a DB, nginx, uwsgi, and point these things to each other, install the tools for the build pipeline manually, and have a shell script that can rebuild and bounce servers. And there’s a bunch of small but important details that have nothing to do with the application around setting up iptables and directory perms and which user each process runs as and so on and so forth. If you’ve done this before it probably takes 30 minutes, but generally people asking haven’t and I can’t realistically expect them to figure it out having probably never used SSH before.

Given that I’d love to hear what folks to do make their self-hostable software user friendly for hosting. The holy grail in my mind would have the following:

  • Host agnostic (e.g. takes in hosts and SSH keys and provisions as necessary, or at least lets users choose between a few “cloud providers”)
  • Dependency free, that is someone can provision an instance with installing any special tooling on their machine (a web interface would probably be ideal, but something that runs with bash/python/other things you can reasonable expect to already be on a desktop linux/OSX machine would be pretty good)
  • Allow a reasonable level of guided customization before/during provisioning (in my case I’d like to create a superuser, misc site policies, and set up subforums during the setup process. Almost everything I’ve ever hosted has had a “go edit some config file somewhere” step and that’s a pretty big ask for someone who doesn’t look at config files often/ever)
  • Provides the same basic programming metaphor as a dedicated server/VPS hosting, e.g. a filesystem, processes that can live beyond the request/response cycle
  • Allows provisioning/coordinating multiple servers in one shot

What do you do to help people who aren’t highly technical self-host your software?

  1.  

  2. 5

    Thorough, up-to-date, step-by-step documentation and run books, with clear “do this and this should happen”.

    People who are motivated are almost always happy to step through incantations even if they’re “non-technical”, provided the incantations work.

    1. 4

      Provides the same basic programming metaphor as a dedicated server/VPS hosting, e.g. a filesystem, processes that can live beyond the request/response cycle

      Sounds to me like you’re about to re-invent two-thirds of a 90s OS, only without 30 years of security fixes. I don’t recommend it as something you then suggest other people use in anger. If you were just doing it for fun, sure. But as a solution to make things “easier” on third parties, just go with Docker.

      1. 2

        I’m not really proposing re-inventing anything. Docker does provide the the primitives I’m looking for here, and I think it’s like 90% of what I want. Docker in and of itself doesn’t really solve the issue of “I have some software I want someone who’s not super technical to be able to provision” though. Actually arranging a docker image to be run somewhere and orchestrated with other services isn’t trivial. docker-compose and k8s manage orchestration this but handing config files for those tools to someone looking to self-host isn’t a frictionless experience either, they aren’t really a tool meant to be used by non-programmers. I do think docker would be a great foundation to use since images are most of what I’m looking for, but it seems like there needs to be a (end-user friendly) layer on top of docker if you want a piece of software to be deployable by someone who isn’t experienced with software development and/or ops stuff.

        1. 4

          Every cloud provider has varying degrees of DIY marketplaces that make it pretty easy for tech-savy, non-developers to get an application up quickly. Linode has stack scripts, AWS has an actual marketplace, and so on.

          1. 1

            There are several such layers, from cloud providers. It’s pretty much the definition of “the value add” and that’s why they charge for it.

        2. 4

          This goes against your first stated goal (host agnostic) but I am a huge fan of Heroku’s deploy button: https://devcenter.heroku.com/articles/heroku-button

          Heroku as a platform tends to already do a lot of the work to abstract things away. I think the main tradeoff for you is you would have to constrain some options and fit some of their patterns (such as preferring configuration via environment variables.)

          I recently deployed the Klaxon project using it and while the instructions were slightly outdated overall it was an incredibly easy experience and one I wouldn’t hesitate to send to a non-dev: https://github.com/themarshallproject/klaxon

          1. 3

            I’m honestly thinking you’re trying to solve the wrong problems.

            People who CAN do this will have no problems reading detailed instructions, or run a docker-compose setup or run ansible.

            People who can’t do this will be angry if something stops working and they understand nothing at all anyway.

            But maybe I’m just old and grumpy and have experienced too many years of explaining absolutely basics to users who want to install software and not having a clue at all. It was actually a lot easier if all they had to do was upload a bunch of PHP files and input DB credentials.

            On the other hand I’ve had my fair share of problems with people providing Docker images that won’t fit into my infra at all (imagine simple things like hardcoded paths for webapps so you couldn’t either run them as /foo or not run them without /foo/).

            1. 2

              It was actually a lot easier if all they had to do was upload a bunch of PHP files and input DB credentials.

              On the other hand I’ve had my fair share of problems with people providing Docker images that won’t fit into my infra at all (imagine simple things like hardcoded paths for webapps so you couldn’t either run them as /foo or not run them without /foo/).

              Yes! In the world of web forums PHP is king and the thing that makes it difficult to say “hey, use my software” is that uploading a zip of PHP files to shared hosting and plugging in DB credentials that the host gives to you is just simple and easy for users. One of the beautiful things about it is that users don’t have to install some deployment tool intended for professionals to make it work.

            2. 1

              Docker images and support for something like sandstorm.io?

              Or write an ansible playbook that can create a droplet on digital ocean and set up the service there. And write the one page of instructions to use it. If someone wishes to not use digital ocean, they can read the steps in the ansible playbook and implement them in another way. Find a consultancy that can do the setup for a certain price. Or provide that service yourself.

              Self-hosting is not just about setting up, but also running. Security patches, backups, upgrades, etc…

              1. 1

                I might be biased but if your dependencies are already packaged then a package would be what you need. Installing a package not only install the software and its dependencies but it also can put configuration in place and you can save custom values in a database like dpkg to generate your configuration from templates. Also dpkg has a curses interface so you can put a lot of information to guide people who are not tech savy.

                For anything fancier than put this file in this directory I would provide a web-ui where your admin can click things and save it to the database/config.