13 ms·
CapRover: Build your own PaaS
- Nextgrid 6y agoCurious as to how this compares to Dokku (http://dokku.viewdocs.io/dokku/ http://dokku.viewdocs.io/dokku/)?
- vincent_s 6y agoDokku is best if you only need a single repo support, caprover if you will have multiple apps, and or multiple servers.
- dblock 6y agoHow so? I use dokku on A DigitalOcean server for a dozen apps. AFAIK cluster support is different (it exists). What else?
- MrCheese 6y agoCapRover has support for multi-server deployments using Docker Swarm. It also has a nice dashboard with built-in monitoring and such. There is a marketplace of sorts with single-click deployment for certain applications. Dokku on the other hand has support for buildpack deployment as well as Procfile support for running multiple processes. I prefer Dokku. The main reason is that I only need a single server for my apps and running Docker Swarm adds complexity. I wrote about some other differences in my blog: https://www.mskog.com/posts/heroku-vs-self-hosted-paas/ https://www.mskog.com/posts/heroku-vs-self-hosted-paas/
- josegonzalez 6y agoDokku supports multi-server deployment via Nomad and Kubernetes as well. - https://github.com/dokku/dokku-scheduler-kubernetes https://github.com/dokku/dokku-scheduler-kubernetes - https://github.com/dokku/dokku-scheduler-nomad https://github.com/dokku/dokku-scheduler-nomad
- StavrosK 6y agoDo these work well? I've never heard of either.
- sequoia 6y agoFantastic write-up, thanks!!
- dgb23 6y agoTheir copy writing is funny and honest, I like it! When it comes to operations I often feel overwhelmed, even though I've done DevOps and automation work in the past. Most of the things I'm working on professionally don't need the "scale" part, but the "robustness" and especially "ergonomics" parts. When I look at most infrastructure solutions, then I often get a combination of "this is too complex" and "I don't need this". So I was drawn to solutions like Heroku at some point, but there you cannot even do the most basic thing: persistently writing to the filesystem. So you are forced to introduce system level complexity and coordination for such a fundamental feature. Naturally I tend to prefer simple tools that enable things rather than constrain them. Side note: I think when the "code has to run on some computer" problem is finally solved, then we likely see an explosion in productivity in our industry.
- coffeeri 6y agoThere is someone working recently on swarmlet (https://github.com/swarmlet/swarmlet https://github.com/swarmlet/swarmlet) - a Dokku inspired Docker swarm solution. Swarmlet seems to be very young and not production ready. Still, I am exited to see how this project will evolve with time.
- gnud 6y agoCapRover was mentioned in the thread about the coinbase stack [1] - I guess that's why it's popping up here now. As I said in that thread - this looks interesting, but the installation instructions put me off a bit. Open a port on your server, and don't change the default password `captain42` - then run a cli tool from your dev machine. 1: https://news.ycombinator.com/item?id=23460066 https://news.ycombinator.com/item?id=23460066
- monkeydust 6y ago(non dev) looking to run my own installation of https://github.com/excalidraw/excalidraw https://github.com/excalidraw/excalidraw for team. Could I use this app? Straightforward to do? How would I estimate the costs?
- lapnitnelav 6y agoAs long as you have a (sub) domain you can use and a bit of free time, you could go to your favourite cheap 'cloud' provider, i.e. Digital Ocean, Scaleway, ... Spin up a cheap instance (DO has a preconfigured image ready to go), git pull and caprover deploy to test. I am pretty sure even the cheapest ones will be able to run that.
- xu6ahb8E 6y agoFor those who have even simpler needs (like side projects, or 1 dev projects), I found using simply docker and git to be plenty enough. Basically, you can create a bare git repository on your server (`git init --bare`), and put a `hooks/post-receive` script within it that will clone sources in a temporary directory, build the docker image and rotate containers. That way, you can `git push` to build and deploy, and it's easy to migrate server. The added bonus is that you now have a central git repos that can act as backup, so you don't need github or gitlab. The main painpoint, which I find dokku interesting for (and I assume caprover too) is zero-downtime deployment. But well, if this is critical, you probably need something more extensive.
- xu6ahb8E 6y agoHere is an example of post-receive script I use for that: #!/usr/bin/env bash export APP=appname export DOCKER_OPTS="" unset GIT_DIR rm -rf /home/username/apps/$APP cd /home/username/apps && \ git clone /home/username/git/$APP && \ cd $APP && \ echo building image && \ docker build -t $APP . if [[ "$?" != "0" ]]; then echo "error while building image." exit 1 fi echo "Stopping previous container..." docker stop $APP echo "Starting new container..." sleep 1 docker run -d --name $APP --rm $APP
- dugmartin 6y agoFYI, you can avoid the $APP directory removal and clone by doing: GIT_WORK_TREE=/home/username/apps/$APP git checkout master
- rcarmo 6y agoShameless plug: If you don't want to use containers or are using resource-constrained Linux boxes, have a go at https://github.com/piku https://github.com/piku :)
- onion2k 6y agoSlightly nitpicky, but is something a PaaS if you run it yourself? Anything as a Service isn't a service if you're running it yourself. It's just ... infrastructure.
- ashnehete 6y agoI was just thinking the same thing - maybe we can call it self-hosted PaaS.
- baq 6y agomaybe you want to decouple sysadmins from devops? sufficiently large orgs with sufficiently large on-prem infra have these kinds of problems.
- idoby 6y agoI just read it as short for "cloud infra project with controls modeled after popular PaaS products"
- vincent_s 6y agoYeah, it's more like a PaaS alternative
- bomdo 6y agoNot nitpicky at all - this is an important distinction to highlight for pointy-haired decision makers. This product is undoubtedly the P in PaaS, but there is no service behind it. If your company uses this as an alternative to a real Heroku/AWS/xyz PaaS, you must have engineers at hand for 24/7 ops, scaling servers and fixing bugs. In my opinion, this is quite risky for anything running in production and should not survive a cost-benefit analysis.
- 1337shadow 6y ago> should not survive a cost-benefit analysis I completely disagree, the difference of price between dedicated servers and even EC2 instances is completely amazing. This is what you get for less than $200/month with a dedicated server: 1× AMD EPYC 7281 CPU - 16C/32T - 2.1 GHz, 2 × 1 To NVMe, 96 Go DDR4 ECC, unmetered 750 Mbps In one of my companies the AWS bill is just completely insane, we have like half that hardware, with a really small bandwidth, which is metered, for more than $800/month, which is fine while we're on free credits. I love working for cloud companies, it's a lot of fun, but when it comes to my money then I never go for anything but a dedicated server.
- fullito 6y agoI can recommend in getting in k8s with something like microk8s from ubuntu: You will learn k8s and you will get the same thing as they do but with open components, industry standards and a whole industry moving in this direction. I have already microk8s running at home with argocd. I have never had IaC that quick and that simple setup. With traefik you can have your domains as well. Then just go to gitlab (or now to github, haven't checked out yet if i wanna migrate back) and register your microk8s cluster as a buildrunner. Thats it you are set. Quite future proof setup, modern, stable, easy to use.
- MrCheese 6y agoHow does the deployment process differ from CapRover/Dokku? Deploying a simple app with a database with Dokku is something like: 1. Run command to create a database of your choice(Postgres, MySQL, Redis etc) 2. Run command to create application 3. Run command to link the database to the application 4. Push to the Dokku repo to deploy the application.
- battery423 6y agoBoth can solve the same issue and both are similiar as they orchestrate your platform. Kubernetes is just the future, used by much more people and you have the additional benefit of learning kubernetes which might help you in your job/day to day business etc. If you are already thinking of operating CapRover/Dokku, i would strongly considering using kubernetes instead.
- zerubeus 6y agoDon't bother k8s is like the lvl of the dragon in front of something like dokku, If you don't really look for auto scaling, or you are running a business alone, don't go for k8s
- hardwaresofton 6y agoAnother great alternative in this space is dokku[0]. Haven't tried CapRover recently but it looks fantastic. [0]: https://github.com/dokku/dokku https://github.com/dokku/dokku
- viraptor 6y agoI've recently learned about exoframe as well, but haven't tried it yet. https://github.com/exoframejs/exoframe https://github.com/exoframejs/exoframe
- Longwelwind 6y agoI've been using Dokku for a side-project, and it's a really nice tool! My only gripe with it is that it's not easy to deploy an existing docker image. You have to pull it, then transmit it over ssh with "docker save" and "docker load".[1] Migrating the docker image building from the dokku server to a CI would be easier to do without this. On top of that, deploying an existing software into your machine would be easier. [1] http://dokku.viewdocs.io/dokku/deployment/methods/images/#deploying-an-image-from-ci http://dokku.viewdocs.io/dokku/deployment/methods/images/#de...
- xu6ahb8E 6y agodokku is also meant to build a custom image on deploy : rather than using heroku's buildpacks, you can put a Dockerfile at the root of your project and it will be used instead. So basically, you could put a Dockerfile file container just FROM and MAINTAINER, referring the image you want to use in the FROM, and dokku will download and execute it on `git push` (provided it can access to the image repository).
- Longwelwind 6y agoThis is good at first, but I deployed on a very small machine, that couldn't handle the live application + the Docker image being built, thus why I wanted to build the image in my CI pipelines.
- explodingcamera 6y agoDoes Caprover support multiple "ingresses"? In that I can have an external load balancer balancing between my clusters servers? I can't seem to find any info on that in their docs.
- mromanuk 6y agoShould be possible it uses Docker Swarm, which can handle multiple ingress. https://docs.docker.com/engine/swarm/ingress/ https://docs.docker.com/engine/swarm/ingress/ You can expose some ports on different nodes and point your external LB (for ex. cloudflare)
- wilsonfiifi 6y agoCaprover is a great tool to have in one's kit but coming from Dokku [0] i think it lacks a certain flexibility when deploying applications with worker processes. You can get around this by creating multiple "captain-definition" files in your project but i prefer Dokku's adherence to Heroku's "Procfile" approach. However Caprover's web admin/dashboard and docker swarm features are a nice touch. [0] https://github.com/dokku/dokku
- danr4 6y agoI'm using CapRover on a personal server of mine and it's pretty awesome. I use it for side projects and tinkering and tooling (analytics, bitwarden). it's very stable with lots of "one click app deploys" of popular open source software. Combined with portainer (which u can install with caprover) I'm improving my docker knowledge. I'd recommend it for someone starting out with containers and "home labs".
- dan_can_code 6y agoThis tool looks really cool. The section where it listed reasons for using it really struck a chord with me. I am not the most comfortable using all the Linux tools when it comes to setting up servers / system administration. This product looks to be a really good bridge between devs who dev primarily, and those with skills in deployment. Super cool. Thanks for sharing, I will be using this!
- esquire_900 6y agoIsn't that a setup waiting for disaster to happen? Everything is happily running up to a serious production problem, at which point you miss the experience to debug and fix it.
- JackFr 6y agoWell, I wouldn’t say I miss it ....
- Nextgrid 6y agoThere's also the issue of security. How do you know there's not a big security hole and it's just a matter of time before your data gets stolen or your server becomes part of a botnet or starts serving illegal content? The same thing applies with these turnkey admin panels like cPanel or Plesk and which is why I don't recommend getting anywhere near those.
- deleted 6y ago[deleted]
- dan_can_code 6y agoThen I will have to learn then. I feel most productive and comfortable working on a hobby project if I don't need to spend all of my time dotting the i's and crossing the t's with cli and configuration files. I just want to build. I don't see the value investing my time learning the ins and outs of tooling that I will use maybe a few times when it makes minimal impact, as it comes with an opportunity cost for me elsewhere. That's just me though, I have no gripes with people who love to tinker with their set ups. It just isn't my thing.
- deleted 6y ago[deleted]
- vincent_s 6y agoBackground info: https://www.freecodecamp.org/news/how-i-cut-my-heroku-cost-by-400-5b9d0220ce13/ https://www.freecodecamp.org/news/how-i-cut-my-heroku-cost-b...
- omk 6y agoLooks solid. I am all set for the wave of fully controlled PaaS solutions coming our way. Most of the innovation has stayed locked behind closed rooms at AWS, Microsoft or one of the major cloud companies. This brings in more control and an extra dimension to optimize.
- Legogris 6y agoI can not not read this as CA Prover and thinking it has something to do with PKI.
- pinfisher 6y agoIs there anything like this for non web based applications? Looking for hosting for some Python apps pre-procssing data before delivery to clients.
- dabeeeenster 6y agoYou could probably use something like this or dokku? They don't only host web based apps.
- rcarmo 6y agoHave a look at piku (https://github.com/piku https://github.com/piku). I built it especially for that kind of thing.
- julianwachholz 6y agoThe web-app integration is completely optional and you can disable it for each app individually. E.g. your database can be an app that doesn't have any web frontend.
- mromanuk 6y agoCaprover can run non-web too, from databases to apps
- wiradikusuma 6y agoCan I say it's a poor man's Kubernetes?
- zerubeus 6y agoSort of yes, for personal projects and small business I would go for something like this or dokku and try to split services as much as I can, rather than managing k8s in my own
- wiradikusuma 6y agoBut if the K8s cluster is managed by cloud (e.g. AWS, Google, even DO), is this/Dokku still worth it (easier)?
- zerubeus 6y agoYes dokku still worth it https://news.ycombinator.com/item?id=23460066 https://news.ycombinator.com/item?id=23460066 and most importantly much easier
- harpratap 6y agoK8s does not deal with CI/CD of your source code, nor can it automagically package your code out of the box. You need to compile your source and bundle it in the form of a docker image, host it and provide access to K8s to pull it. K8s is like Linux kernel, it's not usable for most people unless you package it with GNU utilies and other components people expect out of a distro.
- zerubeus 6y agoahaha I like how this comes after the thread about k8S https://news.ycombinator.com/item?id=23460066 https://news.ycombinator.com/item?id=23460066
- netmonk 6y agoI find it surprising that they choose nginx as routing/reverse proxy while Traefik does the job very seamless in a matter of minute with benefit of docker container tag for live configuration. and with full integration of letsencrypt.
- sandGorgon 6y agothis makes me so happy - to see a PAAS on Docker Swarm! However, I wish the caprover had built this experience on top of kubernetes (or k3s) instead of Swarm. The future of Swarm is really unknown and the ecosystem is undoubtedly behind k8s.
- mromanuk 6y agobut swarm is much more simpler, I'm concerned about future too.
- chris_st 6y agoI'd be interested to know how people who use this kind of thing (or Dokku, etc.) keep their OS, database, applications, etc. up to date, for security reasons if nothing else.
- progx 6y agoYou update your image, stop the container, start the container (with the new image). That's all. You can create complex containers that could update with security fixes without restarting. But it is easier to update an image e.g. once per week/day and auto restart the containers.
- mikepurvis 6y agoI've been using portainer for managing a handful of basic containers on my home server (zoneminder, deluge, jellyfin, unifi controller). Overall I really like it, but some kind of feature to do this is probably the #1 thing I'm missing. It even lets you launch "stacks" from a compose file in a git repo, but doesn't have any facility to remember that info or do a redeploy, so you're basically starting from scratch every time: https://github.com/portainer/portainer/issues/1753 https://github.com/portainer/portainer/issues/1753
- chris_st 6y agoCool, thanks for the info! I wonder about the underlying instance's OS, though... in the past, for home servers, I've set up cron jobs to get OS updates and reboot, but that seems wrong for a web server I'd like to be always up. Maybe create a new instance, update the OS, install the app, switchover? Is there automation for this kind of thing?
- bovermyer 6y agoI like the idea, but I will not support the use of nginx.
- jchook 6y agoCare to elaborate on this? Which http server do you use?
- CSMastermind 6y agoHAProxy is what we switched over to at work. I'm not informed enough to give you the pros and cons of each.
- bovermyer 6y agoSee my other comment for my reasoning. On the second point, I vary between Caddy and Traefik, depending on the use case.
- naavis 6y agoIs there something wrong with nginx?
- bovermyer 6y agoI can't trust something that may now be under the control of the Russian state.
- risyachka 6y agoCan I deploy apps on different machines with this? E.g. can I run my app on 3 servers with a load balancer?
- mromanuk 6y agoYes, that is easy and work right out of the box. You should deploy it with 3 nodes and lat the manager work as the LB (is a single point of failure, though). A more complex solution would be deploying it with an external LB EDIT: Rephrased
- lessname 6y agoI wonder what happens if something (like mysql) crashes for some reason or something like that happens, would something like that be easier to handle?
- julianwachholz 6y agoit will restart the container if the docker healthchecks fail
- 97-109-107 6y agoQuick tip on messaging on the homepage - replace _a developer who..._ with the feature highlighted (ie simplicity, batteries included, etc)
- julianwachholz 6y agoI have been using CapRover for about half a year now on my personal server running multiple projects. It does what you'd expect and the configuration format is pretty easy to use, using any docker image directly works without any extra steps, just enter the image name and it'll do the rest. I'm pretty happy with it and will probably stay with it for the time being. It's not the best for hosting many static pages, as you'll need a HTTP server for each site anyway. But my main gripe is that there is only single factor authentication and you can't easily secure it more other than using a strong password and a hidden subdomain. (because of webhooks, acme, etc. I guess)
- liotier 6y agoHow does it handle upgrades ?
- mromanuk 6y agofor me it was seamlessly and I needed to jump a few minor versions.
- 867-5309 6y ago> you'll need a HTTP server for each site isn't that what virtualhosts are for?
- znpy 6y agohe's still in the early 90s
- 867-5309 6y agoawaiting TIL..
- julianwachholz 6y agoCapRover creates virtual hosts for each "app" which is then proxy_pass'ed to the container for said app. You could try and mount the static site's container files to the local filesystem and serve from there I suppose, but there's currently no easy way to do so.
- yig 6y agoWhat does PaaS stand for? The website doesn't say. Platform? Product?
- chasd00 6y agoPlatform as a service. It's like a step up in abstraction from IAS, infrastructure as a service. The lines begin to blur near the edges though, it's a marketing thing really. Just like "cloud" means many different things to many different people but it's a simple one syllable word perfect for brochures.
- deleted 6y ago[deleted]
- deleted 6y ago[deleted]
- Aeolun 6y agoSince someone was happy with this before, I’d like to recommend https://github.com/exoframejs/exoframe https://github.com/exoframejs/exoframe again for a more console oriented way of doing this same thing.
- unixhero 6y agoLooks like an open, free, very very early re-implementation of a solution such as Cloudron.io . Very cool!
- deleted 6y ago[deleted]
- 0xbadcafebee 6y agoCan some developers explain to me why they don't want to set things up themselves? If you already know how to do it, it's not very time consuming. If you don't yet know how to do it, learning how it all works only benefits your understanding of the service you're providing, and empowers you to fix it. It's almost like learning a new trade, and can give you a new perspective how your code runs. Maybe it's because there's so much arduous research required to finally figure out what magic commands to run to get something to work. Would having a set of HOWTOs that just explain the steps to set up each component work as well for you as a turn-key solution? (It would be great if we could start a trend of people writing a HOWTO.md after writing their README.md)
- thrownaway954 6y agoit isn't about how time consuming it is, it's about consistency with the deploys and consistency with the environments. you want your development and production environments to match.
- filmgirlcw 6y agoI mean, speaking for myself — I know how to set things up for myself and have done it plenty of times, but sometimes for side projects and playing around, I just don’t want to go through that process. I like having a dashboard I can login to, I like having to install one thing rather than having to setup my environment from scratch the same way every time. And I like that if I have to let someone else have access to something, I can give them something without having to pray they don’t break something or teach them. Honestly, I do a lot of the setup work for my actual job — including documenting/creating demos and examples for others — when I’m doing my own side stuff, I really just don’t want to bother, especially if it isn’t in production and it’s just on the home lab. To use a crude analogy, I could build my own robust NAS with hardware components and a BSD or Linux distro optimized for storage and acting as a home server with better performance at a lower price than a Synology system. Or I could continue to use my 8-bay Synology NAS (that I really want to upgrade), because the appliance nature is worth the extra cost and pure performance deficits. There was a time I took great pleasure in maintaining all that stuff myself but honestly, I just want to plug it in and know it’ll work with all my machines without having to think about it.
- ryanmarsh 6y agoA friend often tells me “you’re only ever one CloudFormation template away from your ideal PaaS”.
- jaggs 6y agoI can see exactly why this exists. It won't suit hard core roll your own developers - any more than WordPress theme generators suit DIY web developers - but for those who may be light on skills and time, this could be a superb way to get an MVP going really quickly and easily. Very nice tool to fill a gap.
- appleflaxen 6y agothis is a bit like sandstorm.io, which is also an open source platform for web applications. I've used it for a couple of years, and love it. It's cool to see other people exploring the same software space.
- ev0xmusic 6y agoGive a try to Qovery (qovery.com) for a very simple Container as a Service platform for developers
- Smerity 6y agoI have been using CapRover and love it. I donate to their OpenCollective[1]. For those noting "why don't you just use Linux / k8s / ...", that feels close to the original complaints re: Dropbox on Hacker News[2]. I've run clusters hundreds of nodes in size myself but CapRover gives me the pleasure of not having to sweat the small details. You can get this from other platforms but usually there's a dollar cost tied to each option. When I'm experimenting I don't want to have a dollar cost attached. Deploys are trivial. The default nginx setup is most of what I'd want to do. LetsEncrypt is a single button click. Monitoring is included by default. If I need to scale up, everything I'm pushing is Docker containers. If I want to experiment, there's great fun in looking at the included "One click apps / databases" and just playing around. CapRover is just a lovely freeing experience that will do what you need :) [1]: https://opencollective.com/caprover https://opencollective.com/caprover [2]: https://news.ycombinator.com/item?id=8863 https://news.ycombinator.com/item?id=8863
- GordonS 6y agoHave you used Dokku before, or did you look at it before settling on CapRover? (I'm just starting to look at both)
- gavinray 6y agoI have experience with Dokku, Flynn (also look at this if you're looking at Dokku), CapRover, k8s, and a tiny bit of Nomad. I think CapRover has the best experience out of the Dokku/Flynn/CapRover "group". Not a huge Dokku fan. Would use Flynn over Dokku again, but I'd rather use CapRover over both. https://flynn.io/ https://flynn.io/ If you're intent on using Dokku, there's a useful web console: https://github.com/palfrey/wharf https://github.com/palfrey/wharf
- filmgirlcw 6y agoI would agree with that. I’ve used most of the various options for a DIY PaaS and also prefer CapRover. CloudRon [1] is actually really great, but its pricing is prohibitive (and changes frequently) for side-projects, which is when I most want to use something like this rather than just deploying/managing the k8a myself. [1]: https://cloudron.io/ https://cloudron.io/
- ecoqba11 6y agoIs there something similar and user friendly, but built on top of kubernetes? I like the one-click app approach.
- umaar 6y agoA few weeks ago I mentioned on HN [1] I was looking for something where I can take a $5 VPS and install a bunch of Node.js apps easily. I did this with DigitalOcean + CapRover and it was extremely smooth. Initialising the app, enabling SSL, deploying - everything just worked. It was great. I was hoping to move over, but I won't just yet. Was hoping for two factor auth support [2]. The dashboard was publicly facing and only guarded by a password. There was also an issue which concerned me: 'netdata image in use is spyware' [3] - however I have not digested that thread and its related discussions to understand if it's a genuine issue yet. Finally, I was hoping to understand more about the motivations of the project. Who's funding this project? The OpenCollective [4] page shows an annual budget of $529.55 USD? What are the long term goals? How can they sustain themselves? I use PM2 for running some of my Node.js apps, but I can see there's also PM2 Plus and PM2 Enterprise [5] which helps me understand how they're able to sustain the free version. I don't mean to be pessimistic towards a piece of software which actually works extremely well. Just want to better understand its long-term suitability for deploying production-grade applications. [1] https://news.ycombinator.com/item?id=23278095 https://news.ycombinator.com/item?id=23278095 [2] https://github.com/caprover/caprover/issues/493 https://github.com/caprover/caprover/issues/493 [3] https://github.com/caprover/caprover/issues/553 https://github.com/caprover/caprover/issues/553 [4] https://opencollective.com/caprover https://opencollective.com/caprover [5] https://pm2.io/pricing https://pm2.io/pricing
- greaber 6y agoHow does CapRover work with databases? Does it replace something like RDS?
- shuringai 6y agohow is this any different than setting up grapahana, nginx-proxy with letsencrypt companion etc with docker-compose and just replace my app image?
- ecoqba11 6y agoI was thinking the same. I guess it has a user friendly UI and monitoring features at the same time?
- ComplexSpidey 6y agoAwesome.
- mleonhard 6y agoDoes CapRover support all configuration via files? Can I use it for cattle servers not pet servers?