Nginx 1.30.5 Content
Free credit available Limited time

Nginx static site hosting Your files online on HTTPS, with no config toย write.

Nginx static site hosting without the server block. Nginx runs on a dedicated server we provision, secure and run, already serving HTTPS. Copy your built files into its content folder over SSH and they are live at once. Add your own domain when you are ready.

No login to guard and nothing to configure. Your SSH key is the only way in.

One click. Nginx on HTTPS, ready for your files. The template deploys in about ten minutes.

+$5.00 added at signup ยท deployment choice preserved ยท no card

What the one click sets up before your files arrive.
In one line

What is Nginx static site hosting?

What it is

Nginx is an open source web server known for serving files fast. This template runs it on its own server to serve a static site: HTML, CSS, JavaScript and images, with no code running behind them.

Who it is for

Anyone with a built site, from a landing page to the output of a static site generator, who wants it on their own server.

When to use it

When the site is finished files and you want HTTPS without configuring Nginx. For PHP or server code, use an app template or deploy from GitHub.

Server

Nginx static site, set up for you

An Nginx static site by hand takes about 12 commands: install, a folder and its permissions, a server block, a symlink, a test, a restart, the firewall and Certbot. Most guides listen on port 80 and add HTTPS last. Here Nginx starts on HTTPS. Serving static files with Nginx is just copying them in.

The stack, end to end

Callers

Visitors

Edge

HTTPS

Your project server
Container

Nginx

Your files

Content folder

To publish

Your SSH key

An Nginx static site by handAn Nginx static site on Selfhost.dev
Install Nginx, then create the folder and set its ownerNginx running, with a welcome page to replace
Write a server block for port 80, symlink it, test it, restartNo server block to write
Certbot and a firewall rule for HTTPSHTTPS on a generated address from the start
Point a domain at the server, then reissue the certificateAttach your own domain in Settings
Visitors only ever reach the site; your key is the only way to change it. Deploy the stack
Container

Nginx Docker, already running on HTTPS

Nginx Docker guides start with docker run -p 8080:80, mount a folder into /usr/share/nginx/html and leave HTTPS for later. Here the container is already running behind a generated HTTPS address before you deploy a single file. Nothing to map, mount or rebuild when the site changes.

No port mapping

The site is served on its HTTPS address, not on a port you publish yourself.

No volume to mount

Your files go into the content folder shown in Overview, on the server itself.

No rebuild to update

Copy changed files over SSH and Nginx serves them straight away; no image to rebuild.

What you need

Nginx static site requirements

Nginx static site requirements here are short. The smallest server we offer, 4 GB on x86 or ARM, is plenty for serving files. Your built site. A project SSH key to copy them in. A domain is optional; the site works on its generated HTTPS address until you attach one.

What it needs

Server
4 GB, the smallest server we offer; x86 or ARM
Your site
Built files: HTML, CSS, JavaScript and images
Access
A project SSH key, added in the console
Domain
Optional; attach your own in Settings
Server size: 4 GB, enough for Nginx. Deploy on a 4 GB server
Quickstart

How to deploy an Nginx static site in 3 steps

Launch, copy your files, add your domain.

  1. Launch the template

    Launch opens the Nginx template in the console. Pick a 4 GB server. The template deploys in about ten minutes and starts with a welcome page.

  2. Copy your files in

    Add a project SSH key, then copy your built site into the content folder shown in Overview. Nginx serves it straight away.

  3. Attach your domain

    When you are ready, add your own domain in Settings. Until then the site answers on its generated HTTPS address.

Deploy NginxStep 1 starts in the console.
Launch Nginx
Billing

Nginx static site hosting cost

Nginx static site hosting here costs the server and nothing else. Prepaid credits pay for it by the hour: $0.02/hr for a European 4 GB server, about $15 to $16 a month. Traffic is included, so a busy day for your site adds nothing to the bill.

$0.02
/hr, about $15 to $16 a month at 730 hours
European 4 GB server, $0.02/hr Deploy Nginx
What else you pay for
ItemCost
The Nginx template$0
Bandwidth to your site$0, traffic is included in the server price
Optional daily backups+20% of the server price
An app beside the site, deployed from GitHubShares the same server
ServerRAM, cores, diskWhereRateAbout a month
cx23 (recommended)4 GB, 2 cores, 40 GBEurope$0.02/hr$15.18
cax11 (ARM)4 GB, 2 cores, 40 GBEurope$0.02/hr$16.35
cpx214 GB, 3 cores, 80 GBUS$0.12/hr$87.75
cpx224 GB, 2 cores, 80 GBSingapore$0.10/hr$72.56

Monthly figures assume 730 hours.

If your balance reaches zero

With a card on file or a past top-up, the site keeps running for 5 days after your balance reaches zero. Then it is stopped and kept for 24 hours before it is deleted; a top-up in that time restarts it. After the delete, a copy of the server is kept for 14 days and you can restore the project from the Projects page. We email you when the balance reaches zero and again when it stops. Welcome-credit-only servers are deleted at zero, with a 3-day copy if the project went live.

Price another size or region in the calculator, no signup.

Options

Nginx static site vs a free static host

Free static hosts such as GitHub Pages and Cloudflare Pages publish from Git onto a shared platform. An Nginx static site here runs on a server of your own, in the same project as any app you deploy from GitHub. Your site and your apps share one server and one bill.

A free static hostNginx on Selfhost.dev
Where it runsA shared platformYour own server
Your app or API beside itA separate serviceThe same project, from GitHub
How you publishA Git push or a drag and dropCopy files over SSH
Status

Five checks behind every Nginx static site

  • Every service is health-checked every 60 seconds.
  • Your site files are never deployed over. Automatic retry is off for this template, so a failed deploy waits for you to review it.
  • HTTPS is on before your files are. The generated address serves the welcome page over HTTPS.
  • There is no login to attack. The site has no admin panel or password.
  • Only your keys can publish. Files go in with a project SSH key you add.
~10 min to deploy

The console estimates about ten minutes for the Nginx template after the server is ready; first-time server provisioning adds time.

Notes

Nginx static site limitations

  1. Static files only. No PHP or server code runs here. For WordPress, use the WordPress template; for an app, deploy it from GitHub into the same project.
  2. Publishing is over SSH. There is no browser uploader. Keep your site in Git or on your machine: a recreated service gets a new content folder that holds only the welcome page.
  3. No extra ports. The site is served on its HTTPS address and your domain. The template takes no custom port.

Nothing here in your way? The template deploys in about ten minutes.

Launch Nginx
Planning

Hosting more than one site or a site with an app?

Tell us what you plan to run beside it. We reply with the server we would pick and what it costs a month.

Help

Frequently asked questions

How do I upload my site to Nginx?

Add a project SSH key in the console, connect as the shell user and copy your built files into the content folder shown in Overview. Nginx serves the changes immediately, with no reload. There is no browser uploader, so any tool that copies over SSH works, from scp to rsync.

Can Nginx run server-side code?

No. This template serves static files only: HTML, CSS, JavaScript and images. There is no PHP. For a WordPress site, use the WordPress template. For an app or API, deploy it from GitHub into the same project, so it runs on the same server as the site.

Does an Nginx static site here come with HTTPS?

Yes, from the start. The template answers on a generated HTTPS address before you copy a single file, so there is no Certbot step and no port 80 server block to write. When you attach your own domain in Settings, the site serves on it too.

Is there a login or admin panel?

No. The site has no website login, admin panel or password to protect. Publishing works through a project SSH key: only keys you add in the console can copy files into the content folder. Visitors only ever see the site itself.

Should I pick Nginx or Caddy for a static site?

Both templates serve a static site the same way here: files copied over SSH into a content folder, on HTTPS, with no login. Pick the web server your team already knows. If you want Caddy, the Caddy template deploys it the same way.

Your site on HTTPS. No config to write.

  • Nginx serving your static site on its own server
  • HTTPS from the start, your domain when you want it
  • A European 4 GB server, about $15 to $16 a month
Launch Nginx

About Selfhost.dev

Selfhost.dev is a managed self hosting platform for developers and small teams. Open source apps and databases on dedicated servers you control, billed by the hour, in six locations across three continents.

Best for: Static sites beside the apps that feed them, WordPress, Strapi and managed PostgreSQL, MySQL and Redis.