Show HN: A CLI tool I made to self-host any app with two commands on a VPS
Sidekick is a command-line tool for deploying applications on a VPS, offering features like zero downtime deployment, automatic SSL, and secure secret management, aimed at developers seeking production-ready solutions.
Read original articleSidekick is a command-line tool designed to facilitate the deployment of applications on a Virtual Private Server (VPS). It simplifies the hosting of side projects and aims to make them production-ready, akin to services like Fly.io but utilizing a personal VPS. Key features include a one-command VPS setup with Docker, Traefik, SOPS, and Age; the ability to deploy applications from a Dockerfile; zero downtime deployment; high availability and load balancing; automatic SSL certificate configuration; domain management; and integration with SOPS for secure environment secret management. Installation requires Go, followed by the command `go install github.com/mightymoud/sidekick@latest`. Users can set up their VPS by running `sidekick init`, launch applications with `sidekick launch`, and deploy updates using `sidekick deploy`. Additionally, preview environments can be created with `sidekick deploy preview`. Future enhancements may include improved zero downtime deployments, support for Docker Compose, firewall management, and a text user interface for monitoring. Overall, Sidekick offers a robust solution for developers seeking to efficiently manage their applications on a VPS.
- Sidekick simplifies VPS application deployment and management.
- Key features include zero downtime deployment and automatic SSL configuration.
- Installation requires Go and a simple command.
- Future updates may enhance functionality and user experience.
- It is designed for developers looking for a production-ready hosting solution.
Related
Show HN: I built a simple, open-source tool to manage servers and SSH keys
Viking is a tool for managing SSH keys and remote machines, allowing users to add, generate, and copy keys, execute commands, and customize configuration directories. It is open-source under the MIT License.
Coolify’s rise to fame, and why it could be a big deal
Coolify is an open-source, self-hostable platform gaining popularity as an alternative to Heroku and Vercel, simplifying application deployment and reflecting a trend towards self-hosted software and COSS models.
Dokku: My favorite personal serverless platform
Dokku is an open-source PaaS enabling users to create a serverless platform on a VPS. It features automatic SSL, basic authentication, Docker deployment, and supports GitHub Actions for automatic deployments.
Kamal-skiff: Deploy static sites using Nginx
Skiff is a tool for deploying static sites with nginx and SSI, supporting Ruby installation or Docker. It updates from git every 10 seconds and is licensed under MIT.
[Deploying a basic React site pt 1] Setting up a self-hosted Kubernetes cluster
The article describes setting up a Kubernetes cluster on a home server to deploy a React application, utilizing Dynamic DNS, Cloudflare for security, and K3s for lightweight management.
- Many users express excitement about the tool's simplicity and features, particularly its automatic SSL management and zero downtime deployment.
- Several commenters compare Sidekick to other tools like Dokku, Kamal, and Docker, discussing their experiences and preferences.
- Concerns are raised about the tool's claims of being production-ready, especially regarding high availability and multi-app support on a single VPS.
- Users seek clarity on specific features, such as database management and the necessity of using a Docker registry.
- There is a common desire for better long-term maintenance documentation and support for various deployment scenarios.
1) I see Kamal was an inspiration; care to explain what differs from it? I'm still rocking custom Ansible playbooks, but I was planning on checking out Kamal after version 2 is released soon (I think alongside Rails 8).
2) I see databases are in your roadmap, and that's great.
One feature that IMHO would be game changer for tools like this (and are lacking even in paid services like Hatchbox.io, which is overall great) is streaming replication of databases.
Even for side projects, a periodic SQL dump stored in S3 is generally not enough nowadays, and any project that gains traction will need to implement some sort of streaming backup, like Litestream (for SQLite) or Barman with streaming backup (for Postgres).
If I may suggest this feature, having this tool to provision a Barman server in a different VPS, and automate the process of having Postgres stream to it would be game changer.
One barman server can actually accommodate multiple database backups, so N projects could do streaming backup to one single barman server.
Of course, there would need to be a way to monitor if the streaming is working correctly, and maybe even help the user with the restoration process. But that effectively brings RTO down to near 0 (so no data loss) and can even allow point in time restoration.
I'll concede there's probably a little more hands on work doing things this way, but I do like having a good grip on how things are working rather than leaning on a convenient tool. Maybe you could convince me Sidekick has more advantages?
Also, all of these tools have great documentation on getting up and running, but SIGNIFICANTLY LESS INFO ON HOW TO MAINTAIN OVER THE LONG TERM. If I was going to start using a tool like Sidekick, Kamal, or Dokku I would want clear answers to the following:
- How do I keep my VPS host up and running with latest security updates? - How do I update to more recent versions of Docker? - How do I update services that maintain state (eg. update to a new Postgres version) - How do I seamlessly migrate to a new host (perhaps as a way to solve the above)? - How should I manage and serve static resources & user media? (store on host or use cloud storage?) - How do I manage database migrations during an update, and how do I control that process to avoid downtime during an update?
I just spent an entire evening transferring a side project to a new VPS because I needed to update Postgres. The ideal self-hosting solution would make that a 20 min task.
One thing I’ve noticed is the prevalence of Docker for this type of tool, or the larger self-managed PaaS tools. I totally get it, and it makes sense. I’m just slow to adapt. I’ve been so used to Go binary deployments for so long. But I also don’t really like tweaking Caddyfiles and futzing with systemd unit files, even though the pattern is familiar to me now. Been waffling on this for quite a while…
https://news.ycombinator.com/item?id=41358020
I wrote up my own experiences too (https://blog.notmyhostna.me/posts/selfhosting-with-dokku-and...) and I can only recommend it. It is ~3 commands to set up an app, and one push to deploy after that.
I'll definitely be trying it out, although I do have a pretty nice setup now which will be hard to pull away from. It's ansible driven, lets me dump a compose file in a directory, along with a backup and restore shell script, and deploys it out to my server (hetzner dedicated via server auction).
It's really nice that this handles TLS/SSL, that was a real pain for me as I've been using nginx and automating cerbot wasn't the most fun in the world. This looks a lot easier on that front!
I'm somewhat surprised not to see this more often. I'm guessing supporting multiple linux versions could get unwieldy, I focused on Ubuntu as my target.
Differences that I see.
* I modeled mine on-top of docker-plugins (these get installed during the bootstrapping process)
* I built a custom plugin for deploying which leveraged https://github.com/Wowu/docker-rollout for zero-downtime deployments
Your solution looks much simpler than mine. I started off modeling mine off fly.io CLI, which is much more verbose Go code. I'll likely continue to use mine, but for any future VPS I'll have to give this a try.
Here’s a bash script I posted a while back on a different thread that does similar thing if of interest for anyone. It’s probably less nice than op’s for ex it only works with digitalocean (which is great!) - but it’s simple small and mostly readable. also assumes docker - but all via compose, with some samples like nginx w auto-ssl via le.
Docker != app. Perhaps it'd be more accurate to say, "to host any Docker container"?
Does this only support a single app?
Nice project but the claims (production ready? Load balance on a single server?) are a bit ridiculous.
I would love for it to support docker-compose as some of my side projects needs a library in python but I like having my service be in go, so I will wrap the python library in a super simple service.
Overall this is awesome and I love the simplicity, with the world just full of serverless, AI and a bunch of other "stuff". Paralysis through analysis is really an issue and when you are just trying to create a service for yourself or an MVP, it can be a real hinderance.
I have been gravitating towards Taskfile to perform similar tasks to this. God speed to you and keep up the great work.
i’m building https://www.plainweb.dev and i’m looking for the simplest way to deploy a plainweb/plainstack project.
looks like sidekick has the same spirit when it comes to simplicity.
in the plainstack docs i’ve been embracing fly.io, but reliability is an issue. and sqlite web apps (which is the core of plainstack) can’t have real zero downtime deployments, unless you count the proxy holding the pending request for 30 seconds while the fly machine is deployed.
i tried kamal but it felt like non-ruby and non-rails projects are second class citizens.
i was about to document deploying plainstack to dokku, but provisioning isn’t built-in.
my dream deployment tool would be dokku + provisioning & setup, sidekick looks very close to that.
definitely going to try this and maybe even have it in the blessed deploy path for plainstack if it works well!
Considering the ease of setup the README purports, a few hours of dealing with this might save me a couple hundred bucks a month in service fees.
As a side note, any reason why you decided against using docker in swarm mode as it should have all these features already built it?
I wonder, though. Why Ubuntu? Why not Debian?
With all due respect to Cannonical, Ubuntu is not really suitable. It is not aimed at developers
Unless it has changed since I left it in a fury, it takes too much control away from you with the Snap system.
docker-compose with a load balancer (traefik) is fairly straightforward and awesome. the TLS setup is nice but I wildcard that and just run certgen myself.
The main thing I think that's missing is some sort of authentication or zero trust system, maybe vpn tunnel provisioner. Most services I self host I do not want to be made public due to security concerns.
I'm going to have to look into this pterm thing.
I now run more than one app into one single VPS.
Very cool stack.
But does anyone have a resource or link that explains the idea to make a service which OP shared here?
Because frankly, I'd feel lost reading the code from one file at a time without knowing where to start.
Plus it's written in Go which I have I am not familiar with.
Related
Show HN: I built a simple, open-source tool to manage servers and SSH keys
Viking is a tool for managing SSH keys and remote machines, allowing users to add, generate, and copy keys, execute commands, and customize configuration directories. It is open-source under the MIT License.
Coolify’s rise to fame, and why it could be a big deal
Coolify is an open-source, self-hostable platform gaining popularity as an alternative to Heroku and Vercel, simplifying application deployment and reflecting a trend towards self-hosted software and COSS models.
Dokku: My favorite personal serverless platform
Dokku is an open-source PaaS enabling users to create a serverless platform on a VPS. It features automatic SSL, basic authentication, Docker deployment, and supports GitHub Actions for automatic deployments.
Kamal-skiff: Deploy static sites using Nginx
Skiff is a tool for deploying static sites with nginx and SSI, supporting Ruby installation or Docker. It updates from git every 10 seconds and is licensed under MIT.
[Deploying a basic React site pt 1] Setting up a self-hosted Kubernetes cluster
The article describes setting up a Kubernetes cluster on a home server to deploy a React application, utilizing Dynamic DNS, Cloudflare for security, and K3s for lightweight management.