---
name: netsendo-install
description: Install, update or back up a self-hosted NetSendo instance on a Linux server with Docker Compose, then check that it runs and guide the user through the first login and setup tasks. Use when a user asks an agent to install, update or repair NetSendo on their own server.
---

# Install and run NetSendo on your own server

For NetSendo 2.7.0. The full reference is https://netsendo.com/en/docs/quickstart; read it when something below does not match what you see.

## Before you run anything

- Confirm the target server and that the user wants NetSendo installed there. NetSendo is source-available software under the NetSendo EULA (https://netsendo.com/en/legal/eula); the SILVER licence is free for the user's own business.
- Check the requirements and stop if they are not met: `docker --version` (20.10 or newer), `docker compose version` (v2), `git --version`, at least 2 GB RAM (`free -h`) and 5 GB free disk (`df -h`). 4 GB RAM and 10 GB disk are recommended.
- Generate secrets on the server. Never print APP_KEY or DB_PASSWORD into the chat or a log.

## Install

```bash
git clone https://github.com/NetSendo/NetSendo.git
cd NetSendo
cp .env.example .env    # create .env BEFORE the first start, or Docker creates a folder named .env
sed -i.bak "s|^APP_KEY=.*|APP_KEY=base64:$(openssl rand -base64 32)|" .env
sed -i.bak "s|^DB_PASSWORD=.*|DB_PASSWORD=$(openssl rand -hex 24)|" .env    # the default is "root"
docker compose up -d
docker compose logs -f app    # the first start runs the database migrations; stop following with Ctrl+C
```

Check it: `docker compose ps` shows the services running and `curl -I http://127.0.0.1:5029` answers. The web server listens on 127.0.0.1:5029 only.

## First login (the user does this)

The first account registered on a fresh instance becomes the administrator, and registration closes after it. Have the user register before the instance is reachable from the internet, through an SSH tunnel from their own computer:

```bash
ssh -N -L 5029:127.0.0.1:5029 USER@SERVER
```

Then open http://localhost:5029, register, choose SILVER (free) or GOLD on the licence page and enter an email address to activate it.

## Make it public with HTTPS

Put a reverse proxy with HTTPS (nginx, Caddy, Traefik) in front of 127.0.0.1:5029, set APP_URL in .env to the public https URL and recreate the containers: https://netsendo.com/en/docs/config#https. Do not publish ports 5029, 5031 (Mailpit), 8085 (Reverb), MySQL or Redis to the internet.

## After the install: the first tasks

Guide the user step by step with these pages (exact menu names of the panel):

- Connect a sending provider: https://netsendo.com/en/docs/how-to/connect-amazon-ses
- DNS records for the sending domain: https://netsendo.com/en/docs/how-to/spf-dkim-dmarc
- A list with double opt-in: https://netsendo.com/en/docs/how-to/double-opt-in-list
- A signup form on the website: https://netsendo.com/en/docs/how-to/signup-form-wordpress
- Import contacts: https://netsendo.com/en/docs/how-to/import-contacts
- The first campaign: https://netsendo.com/en/docs/how-to/first-campaign
- A welcome sequence: https://netsendo.com/en/docs/how-to/welcome-sequence
- SMS (NetSendo 2.7.2 or newer): https://netsendo.com/en/docs/how-to/sms-gateway

All how-to pages: https://netsendo.com/en/docs/how-to. With the NetSendo MCP server (https://netsendo.com/mcp) you can search them with the `search_docs` tool and read one with `get_doc`.

## Update and back up

Back up first, then update: https://netsendo.com/en/docs/how-to/update-backup-migrate

```bash
cd NetSendo
git pull
docker compose pull
docker compose up -d
docker compose logs -f app    # migrations run in the app container; the others wait for it
```

## When it does not work

- Emails do not leave: https://netsendo.com/en/docs/how-to/emails-not-sending
- The app container keeps restarting: `docker compose logs app`; check that .env is a file (not a folder) and that APP_KEY is set.
- Database errors: `docker compose exec db mysqladmin ping -h localhost`.

## Never

- `docker compose down -v`: it deletes the volumes, including the database.
- Changing APP_KEY on a running instance: stored mailbox passwords and provider keys become unreadable.
- Running a public instance without HTTPS, or before the administrator account exists.
