# Publish a drop

Source: https://dropshelf.ai/docs/use/publish

Put a folder of built files online from the dropshelf dashboard, with its address, how long it lives and who can open it.

Publish a folder from the dropshelf dashboard to turn it into a drop: a website at its own address
that only signed-in colleagues can open. This page is for members who publish from the browser.

## Prerequisites [#prerequisites]

- An account with your organisation's identity provider. Open `https://drop.example.com` and select
  **Sign in**, and you come back to the dashboard once you are signed in.
- A folder of built files with `index.html` at the top, or a zip of one.

## What to drop [#what-to-drop]

Drop the folder your build tool writes, usually `dist`, `build` or `out`. The drop's address serves
the `index.html` at the top of that folder, so it has to be there.

A zip works too. When every file in a zip sits inside one folder, dropshelf removes that folder from the
paths, so a zip of `dist` serves `dist/index.html` at the root.

Some files never go online:

- From a folder, the dashboard leaves out `.DS_Store`, `Thumbs.db`, and anything inside `.git` or
  `node_modules`.
- From a zip, dropshelf leaves out `.DS_Store`, `Thumbs.db` and the `__MACOSX` folder.

Your instance limits the size of one upload. **What can I drop?** in the account menu lists every
limit, and the [limits reference](/docs/reference/limits) gives the defaults.

## Publish a folder [#publish-a-folder]

To publish a folder:

1. Open **Home** or **My drops**.
2. Drag the folder anywhere on the page, or select **Choose folder** and pick it. To publish a zip,
   drag the zip onto the page. The **Publish a folder** dialog opens, with the folder's name, file
   count and size at the top.
3. Check the **Address**, which starts as the folder's name.
4. Under **Stays online** and **Who can view**, choose how long the drop lives and who can open it.
5. Select **Publish**, or **Publish as draft** to upload it without making it live.

From a terminal, `dropshelf push` publishes a folder; see [The dropshelf CLI](/docs/agents/cli). An AI
agent connected to dropshelf can publish for you; see [Connect an agent](/docs/agents/connect).

## Choose the address [#choose-the-address]

The address is the drop's name, and the drop is served at `<name>.drop.example.com`. A name has 1 to
53 lowercase letters, digits and hyphens, with no hyphen at either end and no two hyphens together.

The field checks the name as you type. When another drop already holds it, free names appear under
the field, each yours with a number on the end. Select one to use it. Some names are reserved on your
instance, such as `admin` and `login`, and those get no alternatives. Leave the field empty and the server
picks a name for you.

Under **Name and description**, the optional **Name** and **Description** start from your page's
title and description, and never change the address. To change the address later, edit **Address** under the
drop's **Settings**. The old address stops working at once.

## Choose how long it lives [#choose-how-long-it-lives]

**Stays online** offers your instance's lengths, **Forever** when your admin allows it, and
**Custom**, which asks for the day it goes offline. The date beside **Stays online** says when the
drop would go offline. On a default instance the lengths are 1 day, 1 week and 1 month, and a new
drop stays online for 1 month. The dialog remembers your last choice.

[Retention and Forever](/docs/use/retention) explains what happens when the time runs out.

## Choose who can view it [#choose-who-can-view-it]

**Who can view** offers three choices, and the dialog remembers your last one:

- **Public**: every member can open it. This is the default.
- **Restricted**: only the people you add, and admins, can open it.
- **Private**: only you and admins can open it. It appears only when your admin turns it on.

When you choose **Restricted**, type the email addresses of the people to add, separated by commas
or spaces, and choose whether they **Can view** or **Can edit**. They are added as soon as the drop
is created. To add or remove people later, use the drop's settings. See [Share a drop](/docs/use/share).

## Publish now or keep a draft [#publish-now-or-keep-a-draft]

**Publish** makes a new drop live as soon as it has uploaded. **Publish as draft** uploads its first
version without making it live: the card shows **Draft v1**, and you publish it from the drop's
versions. Every later version you add from the dashboard waits as a draft until you publish it, so
visitors keep seeing the published version meanwhile. From the CLI, `dropshelf push --draft` does
the same for a new drop. [Versions, drafts and previews](/docs/use/versions) covers drafts and publishing them.

## Confirm it worked [#confirm-it-worked]

While the files upload, the drop's card shows the progress. Once the drop is live, a message says
so, with **Copy address** and **Open**. Open `https://<name>.drop.example.com`, and your page loads.

## If it does not go to plan [#if-it-does-not-go-to-plan]

The problems members meet most often:

- **No `index.html` at the top of the folder.** The dialog stops before anything is sent. When the
  file is one folder down, select the button that uses that folder, such as **Use dist**. Otherwise
  select **Choose another folder**. The dashboard does not look inside a zip, so a zip without a top
  `index.html` publishes, and its root address answers "not found".
- **A limit is in the way.** For a folder, the dialog names the file count or size that is over the
  limit before anything is sent. When you own as many drops as your instance allows, or your storage
  is full, the bar at the top says so and offers **Choose what to delete**. Deleting a drop frees
  room at once.
- **The server refused the upload.** When the refusal comes before the upload starts, such as for a
  name someone took a moment ago, the dialog stays open with the reason under the address. Change what
  it names and select **Publish** again. When an upload fails later, a message gives the
  reason, and **Details** offers **Try again**, which keeps your files.

## Next steps [#next-steps]

- [Share a drop](/docs/use/share)
- [Versions, drafts and previews](/docs/use/versions)
- [Retention and Forever](/docs/use/retention)
- [Comments and change requests](/docs/use/comments)
- [The dropshelf CLI](/docs/agents/cli)
