<!-- Generated from the canonical OpenPost public page. Do not edit this build artifact. -->

Title: Install on Coolify
Description: Deploy OpenPost on Coolify with the Git-repository Docker Compose build pack.
Canonical: https://docs.openpo.st/self-hosting/coolify
Source: [https://docs.openpo.st/self-hosting/coolify](https://docs.openpo.st/self-hosting/coolify)

# Install on Coolify

Deploy OpenPost from Git with Coolify's [Docker Compose build pack](https://coolify.io/docs/applications/builds/docker-compose) and the supplied [`deploy/coolify/docker-compose.yml`](https://github.com/getopenpost/openpost/blob/main/deploy/coolify/docker-compose.yml). The image supports x86_64 servers. Other architectures need amd64 emulation.

## What you need

- A Coolify project and environment.
- A domain pointed at the server (for example `post.example.com`).
- Two independent secrets generated with `openssl rand -base64 32`.

Add these values under **Configuration → Environment Variables** with Runtime scope:

| Variable                         | What to enter                                                              |
| -------------------------------- | -------------------------------------------------------------------------- |
| `OPENPOST_APP_URL`               | `https://post.example.com`                                                 |
| `OPENPOST_PUBLIC_URL`            | `https://post.example.com`                                                 |
| `OPENPOST_MEDIA_URL`             | `https://post.example.com/media`                                           |
| `OPENPOST_JWT_SECRET`            | Fresh output of `openssl rand -base64 32`                                  |
| `OPENPOST_ENCRYPTION_KEY`        | A second, independent `openssl rand -base64 32` value                      |
| `OPENPOST_DISABLE_REGISTRATIONS` | `true` once the first administrator exists (optional, defaults to `false`) |

Keep both secrets stable across restarts and restores. Do not commit them to the repository.

## Deploy

1. Create a **Public Repository** resource with `https://github.com/getopenpost/openpost`. Use a deploy key or GitHub App for a private fork.
2. Set the build pack to **Docker Compose**, with **Base Directory** `/` and **Docker Compose Location** `deploy/coolify/docker-compose.yml`.
3. Enter the environment variables above.
4. Set the `openpost` service domain to `https://post.example.com:8080`. The port suffix tells Coolify where to route traffic; visitors still use normal HTTPS.
5. Deploy, then verify:

```sh
curl https://post.example.com/api/v1/ready
```

Expect `"status":"ready"` and `"database":"ok"`. If it fails, inspect the deployment logs and confirm that all three URL variables use the same public origin.

Open the app and create the first account. It becomes the instance administrator. The deployment stores SQLite and media in the `openpost_data` volume.

## Updates and backups

Pin `image:` to a release tag, then redeploy that commit to upgrade. Before changing it, back up the `openpost_data` volume and environment values, and record the current image tag. Coolify stores the volume on its host, not inside the container.

Keep backups private and off the server. A rollback may require the backup made for the previous version. Follow the [maintenance checklist](https://docs.openpo.st/self-hosting/maintenance).

## Next steps

- [Configure integrations](https://docs.openpo.st/self-hosting/integrations) for your social platforms.
- [Set up email](https://docs.openpo.st/self-hosting/email) before requiring email verification.
