How to host your own website - Rocketeers app

  [ Rocketeers ](/)   

[Login](https://rocketeersapp.com/login) 

 On this page

 Knowledge
---------

How to host your own website
============================

### [\#Hosting](https://rocketeersapp.com/knowledge/hosting)

Hosting a website yourself means turning a bare server into a secure, fast, production-ready machine. Here is the full picture — every step, in order, with a guide for each one.

 Published by [Mark van Eijk](https://rocketeersapp.com/author/mark-van-eijk) on June 30, 2026 · 3 minute read

1. [1. Get and secure a server](#content-1-get-and-secure-a-server)
2. [2. Install the web server](#content-2-install-the-web-server)
3. [3. Install PHP](#content-3-install-php)
4. [4. Install a database](#content-4-install-a-database)
5. [5. Install Node.js](#content-5-install-nodejs)
6. [6. Point your domain and add SSL](#content-6-point-your-domain-and-add-ssl)
7. [7. Deploy your code](#content-7-deploy-your-code)
8. [8. Make it production-ready](#content-8-make-it-production-ready)
9. [9. Verify before you launch](#content-9-verify-before-you-launch)
10. [So… should you do all this yourself?](#content-so-should-you-do-all-this-yourself)
11. [Let Rocketeers handle it](#content-let-rocketeers-handle-it)

"Just get a server and put your site on it" hides a surprising amount of work. A fresh Ubuntu box is a blank machine: no web server, no PHP, no database, no certificate, no firewall, no backups. Turning it into something you'd trust with real traffic is a sequence of steps, each with its own pitfalls. This is the whole map, in order, so you can see what hosting your own site actually involves — and follow a dedicated guide for each part.

[\#](#content-1-get-and-secure-a-server "Permalink")1. Get and secure a server
------------------------------------------------------------------------------

Start with a virtual server from a cloud provider — DigitalOcean, Hetzner, Vultr, AWS, or similar — running a current Ubuntu LTS. Before anything else, lock it down:

- [Connect over SSH](/connect-to-server-ssh-command) using a key, and disable password login.
- Disable root login and consider [changing the SSH port](/change-ssh-port-ubuntu).
- Enable a firewall (`ufw`) that allows only SSH, HTTP, and HTTPS.
- [Add swap space](/add-swap-space-on-ubuntu) so a memory spike doesn't take the box down.

Skipping this step is how servers get compromised within hours of going online.

[\#](#content-2-install-the-web-server "Permalink")2. Install the web server
----------------------------------------------------------------------------

[Nginx](/how-to-install-nginx) is the front door — it answers every request, serves static files, and hands dynamic requests to your application. You'll set up a server block per site and learn the [try\_files directive](/nginx-try-files) that routes requests correctly.

[\#](#content-3-install-php "Permalink")3. Install PHP
------------------------------------------------------

[Install PHP and PHP-FPM](/how-to-install-php) from the ondrej/php repository, with the extensions your application needs. If you host more than one site, you'll likely want [multiple PHP versions side by side](/how-to-install-multiple-php-versions-on-same-server). Then [tune php.ini](/important-php-config-options) for production — the defaults are not.

[\#](#content-4-install-a-database "Permalink")4. Install a database
--------------------------------------------------------------------

[Install MySQL](/how-to-install-mysql) (or PostgreSQL), secure it, and create a dedicated database and user for your app — never let it connect as root. You'll want to know how to [import](/import-database-mysql-command-line) and [export](/export-database-mysql-command-line) data, too.

[\#](#content-5-install-nodejs "Permalink")5. Install Node.js
-------------------------------------------------------------

Most modern sites compile their frontend assets, so [install Node.js](/how-to-install-nodejs) to run the build step during deployment.

[\#](#content-6-point-your-domain-and-add-ssl "Permalink")6. Point your domain and add SSL
------------------------------------------------------------------------------------------

- Set your DNS records to point at the server — [Cloudflare](/what-is-cloudflare) is a fast, free option that adds a CDN and DDoS protection on top.
- Issue a trusted certificate with [Certbot](/how-to-install-certbot).
- Set up [automatic renewal](/renew-ssl-certificates-automatically) so it never expires.
- Tighten the configuration toward an [A+ SSL grade](/a-plus-grade-ssl-using-cloudflare).

Without a valid certificate, every visitor sees [your connection is not private](/your-connection-is-not-private).

[\#](#content-7-deploy-your-code "Permalink")7. Deploy your code
----------------------------------------------------------------

Now actually get your application onto the server. Doing it properly means [zero-downtime deployments](/zero-downtime-php-deployments): separate release folders, an atomic symlink swap, and the ability to roll back instantly — not overwriting live files in place.

[\#](#content-8-make-it-production-ready "Permalink")8. Make it production-ready
--------------------------------------------------------------------------------

The work that separates a hobby setup from a real one:

- **Performance** — [enable gzip/Brotli](/enable-gzip-compression-nginx) and [OPcache](/enable-opcache-php), and watch your [time to first byte](/ttfb).
- **Security** — set security headers, keep debug mode off, and review [application security](/optimize-web-application-security).
- **Backups** — schedule [database backups](/backup-mysql-databases-single-file) and test a restore. A backup you've never restored isn't a backup.
- **Monitoring** — uptime and error alerts so you hear about problems first.

[\#](#content-9-verify-before-you-launch "Permalink")9. Verify before you launch
--------------------------------------------------------------------------------

Run the [website validation tools](/tools-to-validate-website) and work through the [launch checklist](/website-checklist) so nothing slips through.

[\#](#content-so-should-you-do-all-this-yourself "Permalink")So… should you do all this yourself?
-------------------------------------------------------------------------------------------------

You absolutely can — and doing it once is the best way to understand how a server actually works. But notice what you've signed up for: not just the install, but the upkeep. Security patches, certificate renewals, PHP upgrades, backups you have to verify, and monitoring you have to watch — forever, for every site and every server.

[\#](#content-let-rocketeers-handle-it "Permalink")Let Rocketeers handle it
---------------------------------------------------------------------------

Everything on this page — securing the server, installing and tuning Nginx, PHP, MySQL, and Node, issuing and renewing certificates, wiring up Cloudflare, deploying with zero downtime, backups, and monitoring — is exactly what Rocketeers does for you. You connect a server and a repository; it provisions the stack the production way and keeps it running. The point of understanding all these steps is knowing what you're getting back when you stop doing them by hand.

### Subscribe to our newsletter

Do you want to receive regular updates with fresh and exclusive content to learn more about web development, hosting, security and performance? Subscribe now!

  Fill in your email address to receive updates  Subscribe 

#### More in [\#Hosting](https://rocketeersapp.com/knowledge/hosting)

- [How to get top processes with highest memory usage](https://rocketeersapp.com/knowledge/top-processes-memory)
- [How to get top processes with highest CPU usage](https://rocketeersapp.com/knowledge/top-processes-cpu)
- [How to add Swap Space on Ubuntu servers](https://rocketeersapp.com/knowledge/add-swap-space-on-ubuntu)
- [Disable unnecessary and unused PHP versions (FPM pools)](https://rocketeersapp.com/knowledge/disable-unused-php-fpm-pools)
- [Reclaim disk space on Ubuntu server](https://rocketeersapp.com/knowledge/reclaim-diskspace-on-ubuntu)
- [How to check Ubuntu version](https://rocketeersapp.com/knowledge/ubuntu-version)

 [View all 16 articles →](https://rocketeersapp.com/knowledge/hosting)
