[Blog](https://deploywithox.com/blog) [Guides](https://deploywithox.com/blog#c-guides) # How to Self-Host Web Apps on Your Own VPS (2026 Guide) What you need to self-host a web app on a VPS: server, domain, HTTPS, database, backups. Four ways to set it up, their trade-offs, and how ox does it. Saurav Sharma Oct 15, 2026 8 min read On this page - [What does self-hosting a web app mean?](https://deploywithox.com/blog/self-host-web-apps-on-your-own-vps#heading-what-it-means) - [What does a self-hosted app need?](https://deploywithox.com/blog/self-host-web-apps-on-your-own-vps#heading-needs) - [What are the ways to self-host?](https://deploywithox.com/blog/self-host-web-apps-on-your-own-vps#heading-ways) - [Which way should you pick?](https://deploywithox.com/blog/self-host-web-apps-on-your-own-vps#heading-pick) - [How does ox self-host an app?](https://deploywithox.com/blog/self-host-web-apps-on-your-own-vps#heading-ox) - [Frequently asked questions](https://deploywithox.com/blog/self-host-web-apps-on-your-own-vps#faq) - [Next step](https://deploywithox.com/blog/self-host-web-apps-on-your-own-vps#heading-next) To self-host a web app on a VPS, you need a server, a domain pointed at it, HTTPS, something that keeps the app running, a database, backups, and security updates. You can wire these up by hand, with Docker Compose, with a panel like Coolify or Dokploy, or with a hosted tool like ox that sets them up on your server for you. This guide is for people who have built an app and want it live on a server they rent, not on a hosting platform that bills per app. It lists what a self-hosted app needs, compares the common ways to put the pieces together, and ends with how ox does it, including what ox does not do. **In this guide:** - [What does self-hosting a web app mean?](https://deploywithox.com/blog/self-host-web-apps-on-your-own-vps#heading-what-it-means) - [What does a self-hosted app need?](https://deploywithox.com/blog/self-host-web-apps-on-your-own-vps#heading-needs) - [What are the ways to self-host?](https://deploywithox.com/blog/self-host-web-apps-on-your-own-vps#heading-ways) - [Which way should you pick?](https://deploywithox.com/blog/self-host-web-apps-on-your-own-vps#heading-pick) - [How does ox self-host an app?](https://deploywithox.com/blog/self-host-web-apps-on-your-own-vps#heading-ox) - [Frequently asked questions](https://deploywithox.com/blog/self-host-web-apps-on-your-own-vps#faq) ## What does self-hosting a web app mean? Here it means your app runs on a server you rent and control, usually a VPS (virtual private server) from a company like Hetzner, DigitalOcean, Vultr or Linode. You pay one flat monthly price for the machine, and you can run several apps and their databases on it. Small servers cost about $5 to $24 a month. The other choice is a hosting platform such as Vercel, Render, Railway or Heroku. They run your app on their machines and charge per app, per database or per unit of usage. That is easier at the start. Once you run more than one or two apps, a server of your own usually costs less, and your data stays on a machine you can log in to. ## What does a self-hosted app need? Every way of self-hosting has to cover the same list. Hosting platforms do these for you, so it helps to see them laid out. | Piece | What it does | Common tools | | --- | --- | --- | | A server | The machine your app runs on | A VPS running Ubuntu LTS | | A domain and DNS | Sends visitors to your server's IP address | An A record at your DNS provider | | HTTPS | Encrypts traffic; browsers warn without it | Caddy, or Nginx with Certbot | | A reverse proxy | Takes requests on ports 80 and 443 and passes them to your app | Caddy, Nginx, Traefik | | A process manager | Starts the app on boot and restarts it when it crashes | systemd, Docker, Supervisor | | A database | Stores your data | PostgreSQL, MySQL, Redis | | Backups | Lets you undo a bad day | `pg_dump` on a timer, a copy in S3 | | Updates and security | Keeps the server patched and closed to attackers | A firewall, fail2ban, unattended upgrades, SSH keys only | | A deploy process | Gets new code live without breaking the old version | A script, a CI job, or a deploy tool | | Logs and alerts | Tells you what broke and when | `journalctl`, uptime checks, email alerts | The first few are a one-time setup. Backups, updates and deploys are the ongoing part, and they are what people forget until something goes wrong. ## What are the ways to self-host? ### 1. By hand: systemd and Caddy You install your language runtime, clone the repo, write a systemd unit that runs the app, and put Caddy in front for HTTPS. A minimal setup is two short files: INI ```ini [Unit] Description=myapp After=network.target [Service] User=myapp WorkingDirectory=/srv/myapp ExecStart=/srv/myapp/.venv/bin/gunicorn app:app --bind 127.0.0.1:8000 Restart=always [Install] WantedBy=multi-user.target ``` Code ``` example.com { reverse_proxy 127.0.0.1:8000 } ``` This is the lightest option: nothing runs on the server except your app, its database and the proxy. It is also the most work. You write the backups, the deploy script and the security setup yourself, and you repeat it for every app. Our [Django without Docker guide](https://deploywithox.com/blog/deploy-django-to-a-vps-without-docker) walks through every step, and [zero-downtime deploys with systemd and Caddy](https://deploywithox.com/blog/zero-downtime-deploys-systemd-caddy) shows how to update an app without dropping requests. ### 2. Docker Compose You describe the app, the database and a proxy in a `docker-compose.yml` file and run `docker compose up -d`. This is a good fit when your app already ships as a container image, or when you self-host an open-source app whose authors publish a Compose file. You still own backups, updates and deploys, and you now also maintain Docker itself, the images, and the volumes that hold your data. ### 3. A self-hosted panel: Coolify or Dokploy You install a control panel on your server and deploy from its web interface. Both are open source and build on Docker. [Coolify](https://coolify.io/docs/get-started/introduction) deploys from a Git repository, a Dockerfile, a Docker Compose file or a prebuilt image, and offers one-click services from Compose templates. [Dokploy](https://docs.dokploy.com/docs/core) builds on Docker and Traefik and deploys apps, Compose files and databases. Both can manage more than one server. The panel itself runs on your server, so it uses some of its memory and you keep it updated. As of October 2026, both also sell a hosted version of the panel. ### 4. A hosted deploy tool on your own server: ox The control panel runs somewhere else, and only a small agent runs on your server. You get a dashboard, push-to-deploy, backups and alerts, and your app still runs on your machine. ox is this kind of tool. It does not use Docker: each app runs as a plain systemd service behind Caddy, which is the by-hand setup above with the work done for you. ## Which way should you pick? | Way | Good when | Watch out for | | --- | --- | --- | | By hand | You want to learn, or you run one app and like full control | Every backup, update and deploy script is yours to write and test | | Docker Compose | Your app or the app you host already ships as images | Image updates, volume backups and Docker's own upkeep | | Coolify or Dokploy | You want a free, open-source panel you run entirely yourself, or you deploy containers | The panel's own memory use and upkeep; it is one more thing on the server | | ox | You want a small footprint on the server and no Docker, with backups and alerts set up for you | The panel is ox's hosted service and is not open source; no Docker images; one server per app | If you want every part of the stack open source and running on machines you own, a self-hosted panel is the honest answer, and ox is not that. If you would rather not run a panel at all, ox may fit. ## How does ox self-host an app? ox covers the list from earlier in four steps: 1. Rent a fresh server with the latest Ubuntu LTS. 2. Sign in to ox with GitHub and add the server. ox shows one command; you run it on the server once. It installs the ox agent and Caddy, turns on a firewall, fail2ban and automatic security updates, and allows SSH logins by key only. 3. Pick a repository. ox reads its files and shows a plan: the start command, the build, the services the app needs and the variables it is missing. 4. Press Deploy. ox builds the release on your server, starts it as a systemd service, and moves traffic to it only after its health check passes. Caddy gets the HTTPS certificate. When ox cannot guess something, you add an `ox.toml` file at the repo root. Most apps need a few lines at most: TOML ```toml domains = ["example.com"] [app] start = "npm run start" [services] postgres = {} ``` After that, every push to the branch deploys again. ox backs up your databases every day on the server, and to your own S3 bucket if you add one. It keeps the last three releases so you can roll back without a rebuild, shows live logs, and emails you when a deploy, a backup or the site fails. The [ox.toml reference](https://deploywithox.com/docs/config) lists every key, and the [stack guides](https://deploywithox.com/docs/guides) have a working setup for each framework, such as [Next.js](https://deploywithox.com/docs/guides/nextjs), [Django](https://deploywithox.com/docs/guides/django), [Rails](https://deploywithox.com/docs/guides/rails) and [Laravel](https://deploywithox.com/docs/guides/laravel). The agent opens the connection to ox, so your server needs no extra open port, and ox holds no SSH key. On a server with no apps yet, the agent stays under 40 MB of memory and Caddy under 50 MB. Caddy grows a little with each site it serves: our own servers measured 52 to 58 MB with 1 to 21 sites. Your code, variables, databases and backups stay on your server. If ox's service is down, your apps keep serving; deploys, backups and alerts wait until it is back ([what ox backs up, and how to leave](https://deploywithox.com/docs/operate/leaving)). What ox does not do: it does not run Docker images, it does not spread one app over several servers or autoscale, and it supports only the latest Ubuntu LTS. One person signs in to each account; there are no teams yet. ox is free for one project, and ox Pro is $10 a month or $80 a year for every project. You pay your server provider separately. More guides on running apps on your own server are in the blog's [Guides category](https://deploywithox.com/blog#c-guides). ## Frequently asked questions ### How much does it cost to self-host a web app? The server is the main cost: a small VPS runs about $5 to $24 a month and can hold several apps and their databases. A domain name costs extra each year. The tools can be free, like Caddy, systemd or a self-hosted panel, or paid, like ox Pro at $10 a month for every project after the first. ### How big a server do I need? It depends on your app and database. A small app with PostgreSQL often runs on 1 or 2 GB of memory, while a busy app or several apps want more. ox tests every release on servers with 4 GB of memory, and adds a 2 GB swap file on smaller servers that have none. ### Do I need Docker to self-host? No. Docker is one way to run apps, and Compose, Coolify and Dokploy use it. A plain setup runs your app as a systemd service with Caddy or Nginx in front, which is what ox does. Use Docker when your app only ships as a container image, since ox cannot deploy one. ### Is a self-hosted app secure? It can be, if the server is set up with care. Allow SSH logins by key only, run a firewall that opens only SSH, HTTP and HTTPS, ban repeated failed logins with fail2ban, turn on automatic security updates, and run each app as its own Linux user. ox sets all of this up when you add a server. ## Next step If you have a repo ready, the [quickstart](https://deploywithox.com/docs/quickstart) takes you from sign-in to a live app on your own server in five steps. New to running apps on your own server? [How ox self-hosts your apps](https://deploywithox.com/self-hosting) shows what ox sets up on your server. On this page - [What does self-hosting a web app mean?](https://deploywithox.com/blog/self-host-web-apps-on-your-own-vps#heading-what-it-means) - [What does a self-hosted app need?](https://deploywithox.com/blog/self-host-web-apps-on-your-own-vps#heading-needs) - [What are the ways to self-host?](https://deploywithox.com/blog/self-host-web-apps-on-your-own-vps#heading-ways) - [1. By hand: systemd and Caddy](https://deploywithox.com/blog/self-host-web-apps-on-your-own-vps#heading-ways-hand) - [2. Docker Compose](https://deploywithox.com/blog/self-host-web-apps-on-your-own-vps#heading-ways-compose) - [3. A self-hosted panel: Coolify or Dokploy](https://deploywithox.com/blog/self-host-web-apps-on-your-own-vps#heading-ways-panel) - [4. A hosted deploy tool on your own server: ox](https://deploywithox.com/blog/self-host-web-apps-on-your-own-vps#heading-ways-paas) - [Which way should you pick?](https://deploywithox.com/blog/self-host-web-apps-on-your-own-vps#heading-pick) - [How does ox self-host an app?](https://deploywithox.com/blog/self-host-web-apps-on-your-own-vps#heading-ox) - [Frequently asked questions](https://deploywithox.com/blog/self-host-web-apps-on-your-own-vps#faq) - [How much does it cost to self-host a web app?](https://deploywithox.com/blog/self-host-web-apps-on-your-own-vps#heading-faq-cost) - [How big a server do I need?](https://deploywithox.com/blog/self-host-web-apps-on-your-own-vps#heading-faq-size) - [Do I need Docker to self-host?](https://deploywithox.com/blog/self-host-web-apps-on-your-own-vps#heading-faq-docker) - [Is a self-hosted app secure?](https://deploywithox.com/blog/self-host-web-apps-on-your-own-vps#heading-faq-secure) - [Next step](https://deploywithox.com/blog/self-host-web-apps-on-your-own-vps#heading-next) Written by Saurav Sharma Builds ox. Writes about running apps on servers you own, without Docker and without a platform bill. [Older post A Coolify Alternative Without Docker, on Your Own VPS](https://deploywithox.com/blog/coolify-alternative-without-docker) ## Keep reading - Guides [A FastAPI App on Your Own Server with One Config File](https://deploywithox.com/blog/deploy-fastapi-to-your-own-vps) Put a FastAPI app with uvicorn, Postgres and Alembic on your own Ubuntu server, with HTTPS and no Docker, using one small ox.toml file you can copy. Saurav Sharma Oct 8, 2026 7 min read - Guides [Deploy Django Without Docker: Gunicorn, systemd and Caddy](https://deploywithox.com/blog/deploy-django-to-a-vps-without-docker) Deploy Django without Docker on your Ubuntu VPS: gunicorn under systemd, Caddy for HTTPS and PostgreSQL. Every step by hand, then the same deploy with ox. Saurav Sharma Oct 8, 2026 9 min read - Guides [Deploy Django and Vue.js on a VPS: Nginx, Gunicorn, Celery](https://deploywithox.com/blog/deployment-guide-for-django-vuejs-project-on-vps) Deploy a Django and Vue.js app on a VPS: Nginx serves the Vue build, Gunicorn runs Django, Celery and Redis under systemd, with HTTPS from Certbot. Saurav Sharma Jun 4, 2025 14 min read ## Deploy to a server you own ox sets up systemd, Caddy and PostgreSQL on your Ubuntu server and deploys on every push. Free for your first project. [Sign up with GitHub](https://deploywithox.com/login/github) [Read the docs](https://deploywithox.com/docs)