# Deploy with Dokploy

> Run Social Crawl on a server managed with Dokploy instead of plain Docker: create a Compose service, set the environment, add two domains, deploy and check.

Source: https://crawl-docs.pdhq.win/guide/deploy-with-dokploy/
Last updated: 2026-12-04

[Dokploy](https://docs.dokploy.com) builds Social Crawl from its code, runs it, gives it web addresses with HTTPS, and updates it when the code changes. You do not need it: [Install the server](https://crawl-docs.pdhq.win/guide/install-the-server.md) runs Social Crawl with plain Docker. Follow this page only if your server already runs Dokploy and you want to deploy that way.

This is the way the project's own server is deployed: `main` is always deployable, and Dokploy deploys every push to it.

> [!NOT-TESTED]
> The steps follow the repository's `docker-compose.yml` and the README. A deploy of this stack on a real Dokploy host has been run, and [Troubleshooting](https://crawl-docs.pdhq.win/guide/troubleshooting.md) covers the failures that were seen there. The steps below were not run again while these pages were written, so a button may be called something slightly different in your version of Dokploy.

## What you need before you start

### The server and its addresses

- A server with Docker where Dokploy is installed. Install Dokploy first by following its own instructions at [docs.dokploy.com](https://docs.dokploy.com).
- Two web addresses that point at that server, for example `app.example.com` (the web app) and `api.example.com` (the extension talks to this one directly).
### Your code and secrets

- The Social Crawl code in a Git repository that Dokploy can reach (your copy of the repository), for example on GitHub.
- Your three secrets: `POSTGRES_PASSWORD`, `JWT_SECRET` and `ADMIN_PASSWORD_HASH`. [Step 2](https://crawl-docs.pdhq.win/guide/install-the-server.md#step-2-choose-your-secrets) and [step 3](https://crawl-docs.pdhq.win/guide/install-the-server.md#step-3-make-your-password-s-hash) of Install the server make them.

## Step 1: Create the Compose service in Dokploy

1. In Dokploy, create a project, then add a **Compose** service.
2. Set the provider to **GitHub** (or the Git provider you use), pick your Social Crawl repository and the `main` branch.
3. Set the compose path to `./docker-compose.yml`.

> [!IMPORTANT]
> Use `docker-compose.yml`, not `deploy/docker.compose.yml`. The second file is only for plain Docker: it takes out the `dokploy-network` that Dokploy needs the stack to join.

## Step 2: Set the environment

Open the service's **Environment** tab and paste these three lines, with your own values:

```text
POSTGRES_PASSWORD=the-48-letter-value
JWT_SECRET=the-64-character-value
ADMIN_PASSWORD_HASH=scrypt:...the whole 120-character line
```

The stack refuses to start without `JWT_SECRET` and `ADMIN_PASSWORD_HASH`. Every other setting has a default, and [Environment variables](https://crawl-docs.pdhq.win/advanced/environment-variables.md) lists them all. Do not add the `COMPOSE_FILE` line from the plain Docker steps.

## Step 3: Add the two domains

### The two domains

On the **Domains** tab add:

| Service | Port | Example address |
| --- | --- | --- |
| `web` | 3000 | `app.example.com` |
| `api` | 4000 | `api.example.com` |

Turn on HTTPS for both.

### Auto Deploy

Turn on **Auto Deploy**, so every change to the branch is built and started by itself.

## Step 4: Deploy

Press **Deploy**. Dokploy builds two images (the first build takes several minutes) and starts three containers: `db` (the database), `api` and `web`.

**What you should see:** the service's status turns to running, and the three containers are listed as healthy or running.

## Step 5: Check that it works

Open `https://api.example.com/health` in a browser. You should see:

```json
{"status":"ok"}
```

Then open `https://app.example.com`. You should see the sign-in page: the name **Social Crawl**, the line "Your saved posts, offline and in one place.", and a single **Password** box.

Go on to [Sign in for the first time](https://crawl-docs.pdhq.win/guide/first-sign-in.md).

## Updates and logs

### Updates

With **Auto Deploy** on, Dokploy rebuilds and restarts the stack whenever the branch changes. It does so whether or not the checks passed, so protect the branch.

### Logs

Read a container's log in the service's **Logs** tab. [Deploy and operate](https://crawl-docs.pdhq.win/advanced/deploy-and-operate.md) says more, and how to deploy these docs as their own Dokploy service.

## Changing a setting later

Settings such as `DATABASE_URL`, the R2 values or `API_TARGET` go in the **Environment** tab, then **Deploy** again. The pages that name a setting say "your `.env` file (on Dokploy, the **Environment** tab)".
