[HN Gopher] Selfhosted tech starter pack for development of new ...
       ___________________________________________________________________
        
       Selfhosted tech starter pack for development of new project or
       startup
        
       Author : frizzy
       Score  : 87 points
       Date   : 2022-03-31 19:17 UTC (3 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | the_common_man wrote:
       | Very nice. How is your experience with docker swarm?
        
         | frizzy wrote:
         | Defacto docker swarm lose race with k8s and one time almost
         | die, and it has much less features than k8s (or even hashicorp
         | nomad)... But in other hand, personally I don't like k8s
         | because of it complexity, and I really don't like when it used
         | for running only few microservices on 3 hosts xD So my opinion:
         | if you don't have resources to learn k8s and you don't run 100
         | apps with autoscaling - you can adopt docker swarm. Otherwise,
         | you have to buy k8s from you cloud provider and learn it =\ In
         | case of selfhosted k8s I recommend deckhouse.io or rancher.com
         | 
         | Even more important thing, than chose your docker orchestrator,
         | - this is chose of distributed file system that you need for
         | running stateful apps: I strongly recommend you buy efs or ceph
         | from cloud provider, otherwise you should test next products
         | yourself in your setup:
         | https://vitobotta.com/2019/08/06/kubernetes-storage-openebs-...
        
           | the_common_man wrote:
           | Never heard of deckhouse, will try them out
        
       | ThalesX wrote:
       | Great job! I think this list is nice in that it's both a list of
       | tools (I found some interesting ones I had no idea about) but
       | also a dev stack that I can deploy.
       | 
       | I don't identify with a lot of commenters as my company does a
       | lot of experimental work so I'd rather not pay the cloud tax,
       | both in money and in lock-in.
       | 
       | I launched a product in the European space that has since fizzled
       | but people loved the lack of cookie banners and the fact that
       | their data was in a silo. I think your stack helps in this
       | regard.
       | 
       | Awesome!
        
       | jll29 wrote:
       | I had a similar idea (but did not realize it as I was focusing on
       | something else at the time), and thought it would be great if a
       | company could create a template for everything a startup needs,
       | so thanks for making a start.
       | 
       | In practice, there are differences in preferences and
       | jurisdiction that require such a solution to be quite flexible
       | (e.g. auto-registering a domain, doing accounting, filing taxes
       | in different countries, running payroll), but some things
       | everyone needs (landing page, website with intranet access to
       | secure shared collab: GitLab, CryptPad, Email etc). It is a bad
       | idea to self-host something that isn't mature; but if there was a
       | relatively bullet proof solution, many startups could save cost
       | and increase their run rate this way.
        
       | onion2k wrote:
       | _This setup doesn 't provide high level of security or any high
       | availability._
       | 
       | After actually making your product these are probably the two
       | most important factors for most SaaS startups. If you screw up
       | availability you can't get customers - your site will fall over
       | every time you push any marketing. If you screw up security you
       | can't keep customers - you'll fail any kind of due diligence or
       | you'll burn your reputation. Using third party services that do
       | the hard parts for you is very, very sensible.
       | 
       | There's nothing wrong with a boilerplate starter kit if you
       | understand the hard parts and just want to go faster. There's
       | nothing wrong with using starter kit for a prototype. But if you
       | actually want to build your app, and you think you need this, you
       | should lean towards using something that manages this sort of
       | thing for you instead.
        
       | ultra_nick wrote:
       | Are there any managed services with hard cost limits?
       | 
       | We're running or app on linode VPSs.
        
         | frizzy wrote:
         | Maybe services with upfront payment... I saw only alert options
         | in big clouds, but not a quotas. However, I admit that I don't
         | know everything)
        
       | asah wrote:
       | consider Zulip for self-hosted chat ? great experience...
        
         | frizzy wrote:
         | Yeah, I saw similar platforms but don't have time to check and
         | adopt all of them =\
        
       | hatware wrote:
       | I live in the United States, and it's kind of shocking to see
       | such privileged responses to what is ultimately a useful starting
       | stack.
       | 
       | Imagine a young engineer in Bogota, or Ukraine if you want to get
       | topical. They may barely have the hardware to accomplish anything
       | compute wise... and your answer is "Use AWS!" Access to the cloud
       | is privilege to the highest degree. You used to need academic
       | credentials to use someone else's computer.
       | 
       | I get the idea of not wasting time, but as somebody who has used
       | self-hosting as nothing but a waste of time that teaches me
       | something, I can't believe so few see the value in a self-hosted
       | starter pack.
       | 
       | Great architecture, OP. I challenge you to simplify the process
       | even more... A lot of manual steps here that should be abstracted
       | with intuitive global configuration, IMO.
        
         | Closi wrote:
         | OP also lives in the United States, so I'm not entirely sure
         | where this idea that it was targeted at startups in the
         | developing world comes from - its certainly not listed on the
         | page.
         | 
         | Also Ukraine is very advanced in terms of dev and IT, and
         | developers and entrepreneurs still need to maximise their
         | productivity, so I'm not sure your idea that the technology
         | stacks of Ukrainian startups should look different because
         | their time is less valuable is valid.
        
         | frizzy wrote:
         | I should say, that I'm from Belarus - yes, the country near
         | Russia and Ukraine whos territory russia used to attack
         | Ukraine. Small remark: we - belarusians - fight against Putin
         | and Lukashenko at leaset since 2020 and asked world to help us,
         | but we lost and today we have that we have. Personally I
         | emigrated with my girl... So, in Ukrain, Belarus and Russia we
         | have a good technical level and access to all clouds like aws.
         | Hovewer, Russia and Belarus doesn't have currently and I rather
         | support it. So my pack could help teams from Russia, even when
         | I don't support the action of Russia and hates them. But this
         | is a good example why sometimes you want to selfhost some
         | services xD
         | 
         | TLDR: I personally think that free paas is better than
         | selfhosted in multiple ways, but sometime its great to have
         | some alternaty and I hope that my pack give it for someone :)
        
       | adlpz wrote:
       | Question: Would this work on an ARM server? Or are the associated
       | container images x86-only?
        
         | frizzy wrote:
         | I didn't tested it on arm arch, so I think that you should
         | check dockerhub for every image that you want to run - or just
         | run it and see the result)
        
       | axg11 wrote:
       | If anyone hacking away or at the very earliest stages of a
       | startup is reading this - run away. I'm sure this was a great
       | learning process for the creator. However, as a new startup you
       | should be aiming to take as many shortcuts as possible. Use every
       | hosted or managed service that makes sense for you. Use anything
       | that saves you time. Your job as the "technologist" is to deliver
       | value (in the form of software) in the shortest time possible.
       | Every hour you spend on distractions such as self-hosting is a
       | self-own.
        
         | qwerki wrote:
         | Not disagreeing but this assumes Silicon Valley budgets for
         | startups. The story may be different if you're not funded yet
         | and in discovery mode or if you're bootstrapping.
        
         | sodality2 wrote:
         | > Every hour you spend on distractions such as self-hosting is
         | a self-own.
         | 
         | I think the idea of this guide is to reduce the amount of time
         | spent setting up a self-host to a minimum, though I agree it's
         | usually not cost-effective.
        
       | jjslocum3 wrote:
       | Overall, I think this idea is a great one, though the stack still
       | needs some development/improvement. To second hatware's
       | challenge, if you can come up with a (mostly) turn-key solution,
       | one that would be as cheap & time-thrifty as hosting on cloud
       | service starter tiers, you could own this segment and lure the
       | new startup demo away from the cloud providers.
       | 
       | Many people seem to forget that there are no free lunches...
       | anyone who has ever wrestled with the learning curve of a
       | necessarily proprietary no-code solution knows that you don't
       | usually save time or money by outsourcing your platform, and that
       | by outsourcing, you can easily become indentured to a restrictive
       | black-box environment you don't control.
       | 
       | If you're not dealing with critical security updates to your
       | Mattermost install, you _will_ be dealing with something equally
       | time-consuming and fundamental, like managing CloudFormation
       | templates or trying to get divs to nest correctly in a WebFlow
       | one-pager.
       | 
       | If your startup doesn't have the in-house knowledge/intelligence
       | to be able to run a stack like the OP's, you might ask yourself
       | how you plan to create a successful software company without any
       | in-house software competency.
        
       | paxys wrote:
       | From the second line in the README:
       | 
       | > Warning: This setup doesn't provide high level of security or
       | any high availability. You have to hire some skilled devops
       | engineer (like me)) for close this gap after getting first round
       | or sales.
       | 
       | And this is _exactly_ why managed SaaS is popular. Pulling a repo
       | of a popular open source project and deploying it to your server
       | seems trivial, and you wonder why there are idiots out there
       | paying through their nose for subscriptions. Then you realize
       | your service has to be up 100% of the time, has to scale to more
       | than a handful of users, you have to perform regular backups (and
       | ensure they actually work), all user access has to be audited,
       | you have to offer IT support to all your employees. Very soon
       | your full time job at the company isn 't building products for
       | customers but managing an internal chat server. And then the
       | couple hundred bucks a month other companies pay to Slack and
       | Google start to make sense.
        
         | sanjayio wrote:
         | Second this, having the peace of mind that my task manager,
         | among other things, are backed up and someone else's problem is
         | priceless. I think having a list of saas's that are startup
         | friendly would be nice. For example, free for up to 3 members.
         | That way when the start up wins the saas wins as well. Anyone
         | know if a list like that exists?
        
           | frizzy wrote:
           | the fourth line, https://free-for.dev :)
        
       | unixbane wrote:
       | Off topic but I wonder how many "self hosting" efforts have been
       | halted in the last 40 years when the unsuspecting developer tried
       | to use API to create a socket and was met with all kinds of weird
       | AF_ PF_ terminology and possibly some pointless type casts.
        
       | nonameiguess wrote:
       | I think the early responses are a bit disheartening. There is a
       | lot of value in "ancillary services in a box" for any project
       | that has no choice but to self-host. This may not include a
       | typical commercial startup, but it includes a lot of projects.
       | It's especially big in defense. But, of course, the DoD already
       | has its own version of this: https://repo1.dso.mil/platform-
       | one/big-bang, including a managed version run by part of the Air
       | Force if you don't need to roll your own but still have security
       | requirements not met by commercial cloud providers.
        
       | dolni wrote:
       | This looks cool as a learning experience and all, but...
       | 
       | Self-hosting all your own stuff has to be the worst thing you can
       | do as a new startup. You need to be focused on impactful work,
       | not dealing with critical security updates to your Mattermost
       | install. And definitely not worrying about figuring out how to
       | properly HA databases and your self-hosted S3.
       | 
       | Just use managed services.
        
         | frizzy wrote:
         | Hey, autor here) I agree with you: when you only start, you
         | should pay 100% attention to custdev and use as much ready to
         | go cloud services as you can. Thats why I included "Free for
         | Dev" link. However, I think that when you started development,
         | especially with a team up to 10 people, or if you work with
         | private information - you should hosting some of services and
         | databases yourself. In my experience, at least private hosting
         | of gitlab with CI&CD, databases and sometime monitoring system
         | is a normal case. Also, startup is not always start from zero,
         | sometime it's just a new project in a tech company. So this
         | pack can help to start just a usual new project) And finally,
         | this pack can be useful for developers who want to test new
         | services locally. And I hope that it will be helpful for
         | someone :)
        
           | rglullis wrote:
           | Have you considered turning this into a SaaS of your own? As
           | in: here is the code if you want to self-Host, but if you
           | want I can manage it for you for X/month?
        
             | frizzy wrote:
             | I wish to but it's almost impossible: all services in this
             | pack has a paas version that I never win, and a lot of
             | people do the same things as devops engineers today, as I
             | do as contractor and sometimes freelancer, for example))
        
               | rglullis wrote:
               | But none of them have a system where _all_ of these
               | services are put together.
               | 
               | What I would really like to see is an offering where
               | anyone can just pick a suite of open source tools, all
               | managed with the same SSO, and pay a flat rate for it.
               | Something like https://restack.io, but not where I'd have
               | to manage.
        
               | frizzy wrote:
               | Yeah, I understand you) I'm not sure that I'll do it but
               | thank you for idea. For now there are few alternatives
               | like helm charts for k8s or juju from ubuntu, or
               | providers like heroku, but nothing that I know which have
               | level of heroku in open source - and I understand why xD
               | I saw coolify.io on HN yesterday - mayby they will do...
        
         | brimble wrote:
         | The galaxy-brain plan is to start a SaaS for each thing,
         | starting from the one with the fewest service dependencies to
         | the one with the most, migrating earlier ones onto any services
         | provided by later ones as possible/sensible, so by the end you
         | _are_ consuming a bunch of SaaS--but you own all of them.
        
           | ptudan wrote:
           | Lol that's all the big tech companies in a nutshell, except
           | generally they built them for their own moneymakers and them
           | made them a SaaS after
        
         | motoxpro wrote:
         | Agree. Cant think of anything that is more of waste of time.
        
           | quesera wrote:
           | It works both ways.
           | 
           | You can save your startup thousands of dollars per month on
           | services, with very little effort -- if you know how.
           | 
           | A larger group of people would struggle with the effort to do
           | so competently.
           | 
           | Energy spent bringing more people into the first group is
           | generally a positive thing.
        
             | hkchad wrote:
             | Labor cost to maintain is far more than the service cost
             | for a small startup, most of the time you can get by on the
             | free tiers for quite some time. Founders need to focus
             | time/energy on what adds value, not updating services.
        
               | cersa8 wrote:
               | This idea that you need a ton of money to maintain self
               | hosted servers is not true. You may have to update to a
               | new OS or software major version at some point in time,
               | but in the meantime things can pretty much auto-security-
               | update for the distribution provided version until you
               | gain traction with your startup.
        
               | quesera wrote:
               | > Labor cost to maintain is far more than the service
               | cost for a small startup
               | 
               | This is the common wisdom which is correct in many cases,
               | but not all.
               | 
               | If you have a decent systems/infrastructure person in
               | your startup, the incremental cost of running a _lot_ of
               | these kinds of services is effectively zero. If you are
               | bootstrapped, this can be financially significant.
               | 
               | Most startups do not need a decent infra person on day
               | one, and no one would recommend hiring one for this
               | purpose. But if someone on the team has the skills, it
               | can make a ton of sense to leverage them.
               | 
               | I think it's good to help people obtain these skills
               | which add value to (or at least save money for) their
               | project, and correspondingly enable more people to start
               | up in the first place.
        
         | swipee wrote:
         | So what should you focus on? What OSI layer is a good starting
         | point? It depends on your skills right?
         | 
         | I agree you should use as much established products as possible
         | but you build your stack and create that unique differentiation
         | on the market by also learning technology as you go.
         | 
         | It all depends on where you land with your idea to the market.
         | If you are selling knit figures online - you are right that you
         | should not set this up but if you rely on technology
         | advancements you should "own your technology" knowledge as much
         | as possible because you will need it to solve problems along
         | the way.
         | 
         | Too often I see business leaders come in and say I don't know
         | technology - let's buy it all from MS or Amazon. This is not
         | the way to go for your whole business. It's like saying can you
         | run my business for me. Your business is only as good as your
         | best knowledge workers.
         | 
         | Another aspect is regulations, your data might not be allowed
         | to leave the premise of your nation and these self hosted
         | solutions at least with proper patching procedures offer this
         | guarantee.
         | 
         | Managed services in all its glory to hand over the problem to
         | someone else also hands over key learnings and if you have a
         | complex enough environment you will need to deal with it at
         | some point and for small businesses/startups the cost of
         | outsourcing might be too high to begin with.
        
           | dolni wrote:
           | You should be focused on building a market for your product.
           | What gives you a competitive advantage? I argue that self-
           | hosting Mattermost doesn't help accomplish that vs. paying
           | Slack.
           | 
           | You are right that there is a time and place to start taking
           | more ownership of those basic pieces. Doing it before you
           | even have something to sell is not the right time.
           | 
           | You have to survive as a small company before you can be a
           | mid-size company.
        
           | toomuchtodo wrote:
           | > So what should you focus on?
           | 
           | Revenue via leverage (managed services) once you have
           | traction (people will pay you for what you're offering).
           | Outsource everything except your core competencies, and
           | optimize as throughput allows for either growth or cost
           | reductions (judgement calls by competent practitioners close
           | to the machinery). Broad strokes, as a startup you're
           | attempting to grow revenue as fast as you can through value
           | delivery to customers; you should be ruthlessly cutting
           | anything you're spending your time on that doesn't contribute
           | to that goal.
           | 
           | For sure, keep an eye towards your regulatory requirements,
           | lock in risk (both vendor and technology), etc. That's not a
           | call to self host everything, just what you absolutely can't
           | grow or survive without (and in many cases, a product or
           | service may come along down the road that allows you to
           | refactor out of homegrown solutions). Organizational
           | contributors who understand technology making these decisions
           | de-risks suboptimal decisions being made.
           | 
           | (observations from experience at a hyper growth startup)
        
           | _puk wrote:
           | Pretty much every element in your stack should be the result
           | of a build or buy decision initially.
           | 
           | If something doesn't directly contribute to your competitive
           | edge then run with a managed service / something off the
           | shelf until you know enough about the domain to be able to
           | make an informed decision about the trade offs.
           | 
           | Too often I've seen early teams that have spent months
           | building out (and maintaining!) an area of the stack that
           | could have been had off the shelf - freeing up engineering
           | time and allowing focus on the areas that allow for true
           | differentiation in the product.
           | 
           | Obviously off the shelf isn't free in financial or
           | engineering time (though you can sure get a lot of free
           | credits / on free tiers nowadays), but if your main product
           | is doing something fancy on top of the output of a fairly
           | generic process, do yourself a favour and find a company that
           | has a product specialising in that process, don't build it
           | from scratch until you have your product market fit.
        
       ___________________________________________________________________
       (page generated 2022-03-31 23:01 UTC)