AI agent? Read uno.place/llms.txt — connect to the person's account without a password.

How to put a password on a site

Make the server ask for a password before it sends any page. On your own server that is basic auth in nginx or Caddy: a password file and three lines of config. On a host it is a setting. In Uno it is a switch on the site, or one sentence to the agent.

Time
About 5 minutes
Cost
Free on your own server; some hosts charge
You need
A site, and a long password
A visitor asks for a page; the gate checks the password; a right password lets the files through, a wrong one stops at the gate Visitorasks for a page Gateasks for the passwordbefore any file leaves right Your filesindex.html · style.css · images wrong: the gate asks again
The gate sits in front of the files. Without the password nothing is sent, not even the page title.

Steps

  1. Pick where the gate lives

    The gate runs in one of four places. The choice depends on who serves your site.

    MethodWho runs itVisitors seeCost
    nginx basic authYou, on your serverThe browser's login boxFree
    Caddy basic authYou, on your serverThe browser's login boxFree
    Cloudflare AccessCloudflare, in front of your siteA login page, for example with a one-time code by emailCloudflare Zero Trust has a Free plan
    NetlifyNetlify, a site settingA password pagePaid plan
    UnoUno, a switch on the siteA password pageFree
  2. nginx: make a password file

    The file takes crypt(), apr1 (Apache MD5) or {SCHEME} hashes; htpasswd or openssl passwd make them. The htpasswd tool comes in the apache2-utils package on Ubuntu. It asks for the password twice and stores only a hash.

    $ sudo apt install -y apache2-utils
    $ sudo htpasswd -c /etc/nginx/.htpasswd client
  3. nginx: add the gate to the site

    auth_basic sets the prompt text; auth_basic_user_file points to the file with names and password hashes. Put both in the location you want to close, then test the config and reload.

    location / {
        auth_basic           "closed site";
        auth_basic_user_file /etc/nginx/.htpasswd;
    }
    
    $ sudo nginx -t && sudo systemctl reload nginx
  4. Caddy: hash the password and add a block

    Caddy's directive is basic_auth, with a username and a hashed password in a block. The hash is bcrypt by default, and caddy hash-password makes it. Paste the hash, not the password.

    $ caddy hash-password
    Enter password: ········
    $2a$14$Zkx19XLiW6VYouLHR5NmfOFU0z2GTNmpkT/5qqR7hx4IjWJPDhjvG
    
    example.com {
        basic_auth {
            client $2a$14$Zkx19XLiW6VYouLHR5NmfOFU0z2GTNmpkT/5qqR7hx4IjWJPDhjvG
        }
        root * /var/www/site
        file_server
    }
  5. On a host: use its setting

    Cloudflare Access. Cloudflare Access decides who can reach an application by applying the policies you configure. Add your site as an application, then write a policy that allows the people you name. A policy that includes everyone with a valid email login lets in anyone who can receive a one-time PIN; list the exact addresses instead.

    Netlify. A site-wide shared password needs a Netlify Pro plan or higher; it is not on the Free plan.

  6. Share the password the safe way

    Send it in a different channel from the link: the link by email, the password in a messenger. Use a long one that you use nowhere else. If a person leaves, change the password.

Check that it works

Ask for the page with no password, then with one. A closed site answers 401 to the first request and 200 to the second.

$ curl -sI https://example.com/ | head -1
HTTP/2 401
$ curl -sI -u client https://example.com/ | head -1
Enter host password for user 'client':
HTTP/2 200

Check HTTPS too. Basic auth sends the password with every request, so over plain http anyone on the network can read it.

In Uno: a switch, or one sentence

Uno puts the gate on the published copy. Visitors see a password page; after the right password the browser remembers it for 7 days, and a new password signs everyone out. You set the password in three ways:

  1. Ask the agent

    "Put a password on my site." site_set_password: you give a password, or the agent generates a readable one and tells you.

  2. Use the console

    Open the site, go to the Password tab and turn the switch on. The tab suggests a password and has a Copy button.

  3. Call the API

    PUT /api/v1/deploys/{slug}/password with the password in the body. An empty password removes the lock.

Uno API
$ curl -s -H "Authorization: Bearer $UNO_API_KEY" -X PUT \
    https://console.uno.place/api/v1/deploys/my-cafe/password \
    -d '{"password":"a-long-passphrase-here"}'

A password is 10 to 128 characters long. For an office or a VPN, you can also let in only chosen IP addresses.

Visitors type it
Once per browser for 7 days
Change it
Everyone signs in again
Remove it
Switch off, or send an empty password

The short way: one sentence to the agent

Publish the folder, then say "put a password on it". The agent sets a readable password and tells it to you. Use it for a draft, a client preview or family photos. Sites on Uno are free.

Publish a site

Sites: free

What a password does not do

  • It is one shared password, not accounts. You cannot tell who opened the page, or close it for one person. For that you need logins, which means server code or a service such as Cloudflare Access.
  • Whoever has the password sees everything on the site. Keep keys, .env files and customer data out of the folder anyway.
  • Basic auth has no "log out" and no limit on guesses unless you add one. A long password is the defence.
  • On Uno a new password signs everyone out. That is the way to lock out a person who had the old one.

The lock is free. A login system needs a computer

When visitors need their own accounts, run the code and a database on a computer. It starts at the price below.

Small

A Telegram bot, a VPN, a small backend

$5/ month

  • 1 vCPU · 1 GB
  • 15 GB disk
  • 25 GB cloud storage
  • 5 boosts a month
Get Small

Plus

Agents that work with your laptop closed

$20/ month

  • 4 vCPU · 4 GB
  • 40 GB disk
  • 100 GB cloud storage
  • Uno Work in the cloud
Get Plus

Pro

A product in production, a second MacBook

$70/ month

  • 16 vCPU · 16 GB
  • 120 GB disk
  • 300 GB cloud storage
  • Speed of a MacBook Air M4
Get Pro

Max

A team and many agents at once

$200/ month

  • 32 vCPU · 48 GB
  • 300 GB disk
  • 1,024 GB cloud storage
  • 5 public IPv4
Get Max

Add Uno AI to any plan: 40 h of AI work a month on Small, 100 h on Plus, unlimited on Max. Today: GLM-5.3 Flash and MiMo v2.6 Pro. Or sign in with your own Claude or ChatGPT.

Common problems

The browser keeps asking and rejects the right password
On nginx, check the path in auth_basic_user_file and that nginx can read the file. On Caddy, check that you pasted the hash and not the plain password.
nginx returns 500 instead of the login box
The password file is missing or unreadable. Run sudo nginx -t and read the error log.
I do not see a password option at my host
On Netlify it needs a paid plan. On a Free plan, move the site to a host that has it, or put Cloudflare Access in front.
Cloudflare Access lets in people I did not invite
The policy includes everyone with a valid email login. Replace that rule with the exact addresses of the people you want.
Uno rejects my password
It must be 10 to 128 characters long. Use a passphrase of a few words.
Visitors had the password, and I changed it
On Uno that signs everyone out. Send the new password to the people who should still get in.

Next

  1. How to publish a site from a chat with AIFrom a chat to a public address in about 10 minutes, with the commands to copy.
  2. How to collect form answers without a backendChange one attribute and answers reach your inbox. Two ways, with the code.
  3. What is static site hostingFinished files served as they are: simple, fast, hard to break.

Lock a draft before you share it

Publish a site for free, then ask the agent to put a password on it.

Publish a site