Administrators

# Run your own Welley server

Our command-line tool installs everything Welley needs on one Linux machine. A cloud server works, and so does your own hardware.

[Read: Quick Start: Minimal Welley Deployment](https://welley.com/administrators/docs/quick-start/) [Read: Welley CLI](https://welley.com/administrators/docs/cli/) [Install Docker Engine](https://docs.docker.com/engine/install/)

We plan to release Welley as open source in the future. No release date or license is announced yet.

## Get the host, DNS and email ready

These are the starting requirements from the quick-start. How much capacity you need depends on your users and workload.

### Linux host

-   Ubuntu 24.04 LTS, or a similar current distribution.
-   Start with 2 vCPU, 4 GB of RAM and 60 GB of disk.
-   Use a fixed public IPv4 address and a non-root user with sudo.

### Network

-   Allow inbound TCP 80 and 443 from the internet. Allow TCP 22 from your own network.
-   Keep port 80 free for the certificate challenge and the weekly certificate renewal.

### Site DNS

-   Point your domain and storage.<domain> at the host's IP address.
-   Create both records before you install. The CLI checks them and stops if they don't resolve to the host.

### SMTP and administrator email

-   Have your SMTP host, user, password and from address ready. The default is STARTTLS on port 587.
-   You'll also need an administrator email for the first login and for password recovery.

### Email DNS

-   Set up SPF, DMARC and the DKIM your provider generates, for the domain of the from address.
-   Use the exact SPF value from your provider. Merge it into your existing SPF record instead of adding a second one.
-   The CLI warns you if SPF or DMARC is missing. It can't check your provider's DKIM selector.

## Install Docker Engine and Compose

Follow Docker's official instructions for your Linux distribution. Then give your deployment user access to Docker.

[Docker Engine installation](https://docs.docker.com/engine/install/)

### Add the user to the Docker group

Replace <user> with your non-root deployment user. After you run this command, log out and log back in.

```
sudo usermod -aG docker <user>
```

### Check Docker and Compose

Both commands need to work for that user.

```
docker ps
docker compose version
```

## Download the CLI

Pick the binary for the machine you'll run the CLI on. The deployment host itself has to run Linux.

### Linux, x86-64

```
curl -fL "https://appstore.allroads.social/v1/social.wellesley.wlycli/latest?channel=stable&platform=linux/amd64" -o wlycli
chmod +x wlycli
./wlycli -v
```

### Linux, ARM64

```
curl -fL "https://appstore.allroads.social/v1/social.wellesley.wlycli/latest?channel=stable&platform=linux/arm64" -o wlycli
chmod +x wlycli
./wlycli -v
```

### macOS, Apple silicon

```
curl -fL "https://appstore.allroads.social/v1/social.wellesley.wlycli/latest?channel=stable&platform=darwin/arm64" -o wlycli
chmod +x wlycli
./wlycli -v
```

### macOS, Intel

```
curl -fL "https://appstore.allroads.social/v1/social.wellesley.wlycli/latest?channel=stable&platform=darwin/amd64" -o wlycli
chmod +x wlycli
./wlycli -v
```

-   These commands download from the stable channel and show the CLI version.
-   The version changes with each new release. Use the latest CLI documentation when you install.

## Create the deployment

Run this command on the Linux host you prepared. Replace the example domain, email and SMTP values with your own.

```
./wlycli deploy create \
-d example.com \
-e admin@example.com \
--smtp-host smtp.example.com \
--smtp-user "$MAIL_USER" \
--smtp-password "$MAIL_PASSWORD" \
--smtp-from noreply@example.com
```

| Setting | Default |
| --- | --- |
| Install directory | ~/.welley/<project>. The example domain produces the project name example\_com. |
| Database | Bundled PostgreSQL, with data under the installation directory. |
| Stack | Welley platform, RAG pipeline, Nginx, Redis and PostgreSQL, with maintenance containers. |
| Certificates | Let’s Encrypt through Certbot, with weekly renewal. |
| Media | Uploads and static files at https://storage.<domain>. |
| Updates | Stable channel, checked daily. The update process avoids downtime where possible. |
| Optional services | The minimal setup does not add a managed database, CDN, telemetry or Slack integration. |

-   Before you run it, set MAIL\_USER and MAIL\_PASSWORD to your SMTP credentials.
-   The quick-start requires these six flags.
-   The command checks DNS, writes the deployment files, gets a certificate with Certbot and starts the containers.
-   The deploy command is an alias for deployment.

## Sign in and check the result

The generated administrator password is in the platform log. Keep that output private.

### Find the initial password

This container name is for example.com. For your own domain, change the project name.

```
docker logs example_com-platform-blue-1 | grep "Auto-init complete"
```

### Sign in

Open your domain and sign in with the administrator email you gave with -e. Change the generated password right away.

### Check the containers

The quick-start expects to see nginx, platform-blue, rag-pipeline-blue, postgres, redis, autoheal and snoopy.

```
docker ps
```

## Use the CLI for administration

The CLI also has commands for the platform API. Your account still needs the permissions for each operation.

-   Before you run an operation, check its current flags in the command help.
-   The login command takes the API base URL, email and password. It saves the session token it gets back.
-   Right now, the login command prints its session token in the success log. Keep that output private.

Command groups: `accounts`, `posts`, `apps`, `emojis`, `feeds`, `reports`, `rules`, `settings`.

### Show available commands

```
./wlycli --help
```

### Show deployment commands

```
./wlycli deployment --help
```

### Show login options

```
./wlycli login --help
```

### Show settings options

```
./wlycli settings --help
```

## Updates and recovery

By default, a deployment checks for stable updates every day. The server administrator can manage releases in the administration interface.

-   If your deployment files are still valid but some containers fail, the quick-start says to run restart, which recreates the containers.
-   Create won't run again while the project directory or its containers still exist.
-   The force-delete option removes the deployment files and the bundled database. It isn't a recovery step, and it doesn't keep your data.
-   The deploy-server skill still uses the name deployment update. The current CLI has deployment auto-update instead. Check the current CLI help before you do maintenance by hand.

### Recreate containers from the existing deployment

```
./wlycli deploy restart -d example.com
```

Recreates the containers from your saved configuration. It doesn't delete deployment data.

## Deploy with an AI assistant

If your AI assistant supports SKILL.md packages, download our official deploy-server skill. It guides a DigitalOcean deployment.

For now, the skill only covers DigitalOcean. The CLI quick-start also works with other clouds and your own Linux host.

### How to use it

-   Extract the package and load the deploy-server directory the way your assistant installs skills.
-   Ask the assistant to use $deploy-server.
-   The skill asks you for the domain, DNS access, SSH setup, SMTP details and administrator email.
-   It can set up a DigitalOcean VM and, if you want one, a managed PostgreSQL database. It confirms the deployment inputs and the managed database price with you.

### Before you download

-   The package is an unchanged copy of the original skill.
-   Its download and update examples are out of date. Get the current stable download URL from the quick-start on this website. Check the CLI help before maintenance.
-   The skill doesn't come with cloud credentials or a running server, and we can't guarantee it works with every assistant.

The package has `SKILL.md`, `agents/openai.yaml` and `references/digitalocean.md`. Both downloads have the same files.

[Download deploy-server.zip (10.7 KB)](https://welley.com/downloads/deploy-server.zip) [Download deploy-server.skill (10.7 KB)](https://welley.com/downloads/deploy-server.skill)

## Reference docs

The full CLI docs and the deployment skill files. You can read them here without an account.

-   [**Welley CLI** docs/index.md](https://welley.com/administrators/docs/cli/)
-   [**Quick Start: Minimal Welley Deployment** docs/quick-start.md](https://welley.com/administrators/docs/quick-start/)
-   [**Deploy Server** skills/deploy-server/SKILL.md](https://welley.com/administrators/docs/deploy-server-skill/)
-   [**openai.yaml** skills/deploy-server/agents/openai.yaml](https://welley.com/administrators/docs/deploy-server-openai-yaml/)
-   [**DigitalOcean Reference** skills/deploy-server/references/digitalocean.md](https://welley.com/administrators/docs/deploy-server-digitalocean/)
