How to deploy a simple Axum app to a VPS using Kamal — DeepSeek Blog | Neura Market
    Neura MarketNeura Market/DeepSeek
    ChatGPTChatGPTClaudeClaudeGeminiGeminiCursorCursorGrokGrokPerplexityPerplexityDeepSeekDeepSeek
    CoPilotCoPilotStable DiffusionStable DiffusionMidjourneyMidjourney
    View All Directories
    OverviewRulesPromptsMCPsAgentsBlogVideosGuidesCoursesCommunityTrendingGenerate
    DeepSeekBlogHow to deploy a simple Axum app to a VPS using Kamal
    Back to Blog
    How to deploy a simple Axum app to a VPS using Kamal
    rust

    How to deploy a simple Axum app to a VPS using Kamal

    Marc Cámara January 14, 2026
    0 views

    Deploy Axum fast and cheap on a VPS using Kamal. Skip Kubernetes early, keep ops simple, scalable, and production-ready.

    --- title: "How to deploy a simple Axum app to a VPS using Kamal" description: "Deploy Axum fast and cheap on a VPS using Kamal. Skip Kubernetes early, keep ops simple, scalable, and production-ready." tags: ["rust", "systemdesign"] date: "2026-01-10" cover_image: https://kamal-deploy.org/assets/images/kamal.webp # Use a ratio of 100:42 for best results. published: true published_at: 2026-01-14 12:45 +0000 --- When we first deploy a small or medium-sized [Axum](https://github.com/tokio-rs/axum) app, the priority is to get it running as fast and as cheaply as possible but starting with a complex infrastructure for a project that is still not live or is not big enough is usually a waste of time and resources. Tools or platforms like Kubernetes, AWS, Google Cloud, Terraform... they all have a learning curve and usually come with a high cost. In this article, I will show you how to deploy to your own VPS, which is a great option for small or medium-sized projects. It’s cheap, easy to set up, and can be scaled up or down as needed. For this example, we will use [Hetzner](https://www.hetzner.com/) as our VPS provider, but you can use any VPS provider you like (DigitalOcean, Vultr, Linode...) as long as it supports SSH access. ### What is Kamal? [Kamal](https://kamal-deploy.org) is a deployment tool created by [DHH](https://x.com/dhh), the creator of [Ruby on Rails](https://rubyonrails.org). As stated in their website: > Kamal offers zero-downtime deploys, rolling restarts, asset bridging, remote builds, accessory service management, and everything else you need to deploy and manage your web app in production with Docker. Originally built for Rails apps, Kamal will work with any type of web app that can be containerized. Many people dismiss Kamal because it was originally built as a deployment tool for Rails apps. However, when inspected more closely, it’s a powerful tool that can be used for any type of web application that can be containerized. It’s a great option for small or medium-sized projects that need a simple, easy-to-use deployment tool, regardless of the framework or language used. ### Quick note from the developer > You are looking at one of the articles on my [personal blog](https://marccamara.com), please support me by visiting it, thanks! ### Before we start, let's talk about the scope we will cover This is not an article about replacing Kubernetes or Terraform. Kamal is not trying to solve the same problems as Kubernetes, and this post is not arguing that you should abandon complex platforms for large or highly distributed systems. Kubernetes, Terraform, and similar tools exist for good reasons and are the right choice in many scenarios. This article focuses on a different problem: deploying a small or medium-sized web application in a simple, cost-effective way, without taking on unnecessary operational complexity before it’s actually needed. ### Let's get started For this article there will be some assumptions: - You have a Hetzner account and have created a VPS. The cheapest server will work. At the time of writing, the cheapest option is the CX23, which costs less than $5/month and includes 4GB of RAM, 40GB of SSD, and 2 vCPU cores, more than enough for our tests. - You have Docker installed. By default, Kamal uploads your Docker images to Docker Hub publicly. If you want to change to a different container registry or keep your images private on Docker Hub, you can find a guide [here](https://kamal-deploy.org/docs/configuration/docker-registry/#using-docker-hub-as-the-container-registry). - You have a bare Axum app ready to deploy (or any other web application that can be containerized). I have an example [here](https://github.com/mcamara/kamal-axum-example). - The project you want to deploy has a valid Dockerfile. You can see an example [here](https://github.com/mcamara/kamal-axum-example/blob/main/Dockerfile). For the Axum app, any application will work as long as it exposes a health endpoint. We will use Kamal’s default (`"/up"`), but any other endpoint can be used if it’s correctly configured in the `kamal.yml` file. Let’s start by running the following commands from the root of the project: ```bash gem install kamal kamal init ``` These commands create a `config/deploy.yml` file and a `.kamal/secrets.yml` file with the default configuration (we will ignore hooks for now). Your `.kamal/secrets.yml` file can read secrets from environment variables or a password manager (it works with 1Password by default). For this example, we will use environment variables, but keeping your secrets in a password manager is the recommended approach. We will keep the image private on Docker Hub, so we’ll uncomment the following line in the file: ```bash # Option 1: Read secrets from the environment KAMAL_REGISTRY_PASSWORD=$KAMAL_REGISTRY_PASSWORD ``` The fun starts in the `config/deploy.yml` file. Let’s start editing the parts we need for this example. First, we need to define the service name, the image name, and the IP of the server we want to deploy to: ```yaml service: axum-post-example # -> The name of your service, just use the same name you have on your Cargo.toml file image: my-docker-hub-user/axum-post-example # -> The username on Docker Hub and the name of the image that will be created and stored servers: web: - 116.111.111.111 # -> The ip of the server created on your VPS platform ``` Then, we need to define the URL where the application will be deployed: ```yaml proxy: ssl: true host: example.marccamara.com # -> The url where you want your app to be deployed, remember to setup the DNS records healthcheck: path: /up # -> /up is the default endpoint, so no need to add this line ``` After that, we need to define where the newly created image will live, along with the password (if you want your images to be private): ``` yaml registry: username: my-docker-hub-user password: - KAMAL_REGISTRY_PASSWORD ``` And that's all! ### Deploying Now that everything is ready, we can do our first deployment by running: ```bash kamal setup ``` Wait for the deployment to finish, then check if everything is working by visiting `https://your-website.com/up`. Subsequent deployments can be done by running: ```bash kamal deploy ``` As you may have noticed, Kamal has handled the SSL certificate and proxy configuration for us, which is pretty cool. ### Finishing up We’ve successfully deployed our application. While this setup looks simple, Kamal can do much more: it can deploy databases, deploy to multiple servers, perform zero-downtime deploys, and support multiple environments (for example, by adding a `.config/deploy.staging.yml` file), among other things. I’m currently using Kamal for two different projects: one medium-sized setup with Postgres, Valkey and two servers in different locations, and this very personal page running on Leptos with caching. I may talk about these setups in a future post, but for now, I hope you enjoyed this article and learned something new.

    Tags

    rustsystemdesign

    Comments

    More Blog

    View all
    How I'm using ASTs and Gemini to solve the "Codebase Onboarding" problem 🧠ai

    How I'm using ASTs and Gemini to solve the "Codebase Onboarding" problem 🧠

    Hi everyone! 👋 I’m Tara, a Senior Software Engineer and Consultant. Over the years, I've jumped...

    T
    tworrell
    Local AI Will Save Us All (The Math Says So, Trust Me)ai

    Local AI Will Save Us All (The Math Says So, Trust Me)

    Every few weeks a take goes viral in tech circles making the case for ditching cloud AI and running...

    S
    Sebastian Schürmann
    Lost in the AI Hype, I Started Smallai

    Lost in the AI Hype, I Started Small

    And it helped me get back into tech without drowning TL;DR at the end Coming back to...

    R
    Rohini Gaonkar
    Building a Replay-Tested Interactive Brokers Client in Gogo

    Building a Replay-Tested Interactive Brokers Client in Go

    I wanted an IBKR library that felt like Go and had testing I could trust. So I wrote one.

    T
    Thomas Marcelis
    Playwright in Pictures: Fully Parallel Modeplaywright

    Playwright in Pictures: Fully Parallel Mode

    Playwright’s fullyParallel mode is often treated as a simple performance switch. In practice, it...

    V
    Vitaliy Potapov
    Designing a CLI for Both Humans and Agentscli

    Designing a CLI for Both Humans and Agents

    Learn how Alpic designed its CLI for both human developers and AI agents — covering tradeoffs like polling, context windows, interactivity, and statelessness.

    J
    Julien Vallini

    Stay up to date

    Get the latest DeepSeek prompts, rules, and resources delivered to your inbox weekly.

    Neura Market LogoNeura Market

    Discover the best AI prompts, plugins, and resources for DeepSeek and more.

    Content Types

    • Rules
    • Prompts
    • MCPs
    • Agents
    • Guides

    Platforms

    • ChatGPT Directory
    • Claude Directory
    • Gemini Directory
    • Cursor Directory
    • Grok Directory
    • Perplexity Directory
    • DeepSeek Directory
    • CoPilot Directory
    • Stable Diffusion Directory
    • Midjourney Directory
    • All Directories

    Resources

    • Blog
    • Documentation
    • Help Center
    • Marketplace

    Legal

    • Privacy Policy
    • Terms of Service

    © 2026 Neura Market. All rights reserved.

    |

    Not affiliated with any AI platform vendors.