# Docs

Install Mailpiece on your own server, connect your mail provider, and hand it to your agent.

## Install

- [Install with Kamal](https://mailpiece.dev/docs/install): Kamal builds the image from your clone on your computer and deploys it to your server, so you can change the code. To run the ready-made image as one container without Kamal, [install with Docker](https://mailpiece.dev/docs/docker).
- [Install with Docker](https://mailpiece.dev/docs/docker): Run Mailpiece as one ready-made container. There's nothing to build on the server.
- [Configuration](https://mailpiece.dev/docs/configuration): Set a few environment variables once and Mailpiece runs. Most are optional.

## Write and send

- [First steps](https://mailpiece.dev/docs/first-steps): From a fresh install to a first issue in your subscribers' inboxes.
- [Mail](https://mailpiece.dev/docs/mail): Your newsletter leaves through the mail provider you choose, under your own name. Your install's own mail, such as sign-in codes, goes its own way.
- [Send through a relay](https://mailpiece.dev/docs/relay): Send your newsletter through Resend, Postmark, SES or any provider's API, even where your host blocks SMTP.
- [Addresses and domains](https://mailpiece.dev/docs/domains): A newsletter always answers at its number, as in `https://app.example.com/834206594`. It can also answer at a handle and at a domain of its own.

## Keep it running

- [Backups](https://mailpiece.dev/docs/backups): Everything Mailpiece keeps is in its storage volume. Back it up and you can bring your newsletter back on any server.
- [Upgrading](https://mailpiece.dev/docs/upgrading): Run the new version. Migrations run each time the server starts. Read what changed first.

## Agents and the API

- [Agents and the CLI](https://mailpiece.dev/docs/agents): The `mailpiece` CLI works with your install from a terminal, and is also an MCP server and an agent skill.
- [JSON API](https://mailpiece.dev/docs/api): The app's screens also answer JSON, signed in with a personal access token.
