---
title: "Deploy Libredesk | (Just Updated) Open Source Helpdesk, Customer Support Desk With Working Invite Links"
description: "Libredesk open source helpdesk, shared inbox customer support desk"
category: "Other"
url: https://railway.com/deploy/libredesk-or-just-updated-open-source-he
---

# Deploy Libredesk | (Just Updated) Open Source Helpdesk, Customer Support Desk With Working Invite Links

Libredesk open source helpdesk, shared inbox customer support desk

**[Deploy Libredesk | (Just Updated) Open Source Helpdesk, Customer Support Desk With Working Invite Links on Railway](https://railway.com/template/libredesk-or-just-updated-open-source-he)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/libredesk-or-just-updated-open-source-he/manifest.json

- **Creator:** SuperSlowSloth
- **Category:** Other

## Template content

### database

- **Image:** postgres:17-alpine@sha256:526f86d93c6ea08fd3f1fe5605650cacc781b2c6013169a0ad8f42c7d3d84f32

### cache

- **Image:** redis:8.2.1-alpine@sha256:987c376c727652f99625c7d205a1cba3cb2c53b92b0b62aade2bd48ee1593232
- **Start command:** `/bin/sh -c 'chown -R redis:redis /data && exec docker-entrypoint.sh redis-server --requirepass "$REDIS_PASSWORD" --appendonly yes --dir /data'`

### libredesk

- **Image:** ghcr.io/bon5co/libredesk-railway:2.9.2@sha256:8ecc70b5941a4fa4228227f6a2424cc69690e1dfc2bffc9400e25acb4328a5fe
- **Health check:** /health
- **Public domain:** Yes

## Documentation

# Deploy and Host Libredesk on Railway

**Built for an LLM agent to deploy and use.** The deploy form has no fields to fill: the `System` login, the encryption key and the database and Redis passwords are generated, the server cannot start without them, and there is no public registration endpoint, so nobody can claim a fresh instance. Libredesk is an open-source customer support desk (helpdesk): a shared inbox for email, live chat and web forms, with conversation assignment, SLAs, macros, automations and a REST API.

## About Hosting Libredesk

This template runs three services: **libredesk**, the official `libredesk/libredesk` image (v2.9.2) pinned by digest through a thin wrapper, with a volume at `/libredesk/uploads` that holds email attachments and uploaded files; **database**, a PostgreSQL 17 instance with a volume at `/var/lib/postgresql` that holds conversations, contacts and settings; and **cache**, a Redis 8 instance with a volume at `/data`. One public domain serves the agent app and the API. The healthcheck is `GET /health`.

**What the wrapper fixes.** The stock image installs nothing by itself: the schema, the `System` login and upgrades are separate commands, and the public URL (`app.root_url`) is a database setting that stays `http://localhost:9000` until someone signs in and changes it, so every invite link and notification mail points at localhost. The wrapper installs the schema and the `System` login from `LIBREDESK_SYSTEM_USER_PASSWORD`, runs `--upgrade` on each boot, binds the server to Railway's injected `PORT`, and on the first boot writes the Railway domain into `app.root_url` through Libredesk's own settings API, only while it still holds the localhost default, so a custom domain you set later is never overwritten. Measured on a Railway control deploy: the invite and mail base URL is the Railway domain from the first request. The generated password carries a fixed prefix so it always satisfies Libredesk's password rule (upper case, lower case, digit, special character).

**Using it.** Open the domain and sign in with email `System` and the value of `LIBREDESK_SYSTEM_USER_PASSWORD`. Create your own agents under Admin, then add an inbox. Outgoing and incoming email are not configured: add an SMTP/IMAP inbox in the admin area. Everything is stored in PostgreSQL, Redis and the uploads volume, so redeploys keep it. Libredesk is released under AGPL-3.0.

### Agent contract

- Public URL: `https://RAILWAY_PUBLIC_DOMAIN` (the generated domain of the `libredesk` service)
- Private URL: `http://libredesk.railway.internal:8080`
- Credentials: the variable `LIBREDESK_SYSTEM_USER_PASSWORD` on the `libredesk` service (plain text); the login email is `System`
- Auth: `POST /api/v1/auth/login` with JSON `{"email","password"}` sets a session cookie and a `csrf_token` cookie; send the session cookie on every call under `/api/v1/` and, on `POST`/`PUT`/`DELETE`, the `csrf_token` value as an `X-CSRFTOKEN` header. API keys can be minted for an agent in the admin area and sent as `Authorization: token KEY:SECRET`
- Health: `GET /health` returns 200 without credentials

```bash
#!/bin/sh
# needs: RAILWAY_PUBLIC_DOMAIN, LIBREDESK_SYSTEM_USER_PASSWORD (variables of the libredesk service); also curl, jq.
R="https://$RAILWAY_PUBLIC_DOMAIN"; J="content-type: application/json"; JAR=$(mktemp)
n=0; until [ "$(curl -s -o /dev/null -w '%{http_code}' "$R/health")" = 200 ]; do n=$((n+1)); [ "$n" -le 90 ] || break; sleep 5; done
curl -s -o /dev/null -w "health: %{http_code}\n" "$R/health"
# sign in as the generated System login: the session cookie plus the csrf_token cookie (echoed back as X-CSRFTOKEN on writes)
curl -s -o /dev/null -w "login: %{http_code}\n" -c "$JAR" -H "$J" -d "$(jq -nc --arg p "$LIBREDESK_SYSTEM_USER_PASSWORD" '{email:"System",password:$p}')" "$R/api/v1/auth/login"
CSRF=$(awk '$6=="csrf_token"{print $7}' "$JAR")
# a read with the session succeeds, the same read without it is refused
curl -s -o /dev/null -w "read with session: %{http_code}\n" -b "$JAR" "$R/api/v1/agents/me"
curl -s -o /dev/null -w "read without session: %{http_code}\n" "$R/api/v1/agents/me"
# the public URL used in invite links and mails is the Railway domain, not http://localhost:9000
SETTINGS=$(curl -s -b "$JAR" "$R/api/v1/settings/general")
echo "$SETTINGS" | jq -r '"root_url: " + .data["app.root_url"]'
# write-auth: saving the settings back with the session succeeds, the same write without a session is refused
BODY=$(echo "$SETTINGS" | jq -c '.data')
curl -s -o /dev/null -w "write with session: %{http_code}\n" -b "$JAR" -X PUT -H "$J" -H "X-CSRFTOKEN: $CSRF" -d "$BODY" "$R/api/v1/settings/general"
curl -s -o /dev/null -w "write without key: %{http_code}\n" -X PUT -H "$J" -H "Cookie: csrf_token=x" -H "X-CSRFTOKEN: x" -d '{}' "$R/api/v1/settings/general"
# signup: none - accounts are created by an administrator (POST /api/v1/agents) or by SSO; there is no registration endpoint
```

Expected output against a fresh deploy (measured on a Railway control deploy of the published template; the output is recorded in `template.md`):

```text
health: 200
login: 200
read with session: 200
read without session: 401
root_url: https://RAILWAY_PUBLIC_DOMAIN
write with session: 200
write without key: 401
```

The refusals are the contract: a read or write without a session answers 401 (`write without key: 401`). There is no registration endpoint, so there is nothing for a stranger to sign up to.

## Why Deploy Libredesk on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Libredesk on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.

- **Agent-ready** - no deployer fields, a contract block, and one script that proves the server is healthy, a stranger is refused, and the generated login can read and write.
- **Working invite links** - the public URL is the Railway domain from the first boot instead of `http://localhost:9000`.
- **Data survives redeploys** - conversations in PostgreSQL on a volume, sessions in Redis on a volume, attachments on a volume.
- **Pinned** - the upstream image is pinned by digest and the wrapper by tag and digest.

## Common Use Cases

- **Customer support inbox** - one shared inbox for email and chat with assignment, SLAs and canned replies.
- **Internal IT or HR helpdesk** - ticket intake and tracking for a team on your own server.
- **Support automation with AI agents** - manage conversations, contacts and settings through the REST API.

## Dependencies for Libredesk Hosting

- The libredesk service, a PostgreSQL service and a Redis service, each with its volume, created by the template.

### Deployment Dependencies

- [Libredesk repository](https://github.com/abhinavxd/libredesk)
- [Wrapper image source](https://github.com/bon5co/libredesk-railway)


## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — Self-hosted virtual tabletop for role-playing games (license required)
- [Double Commander in your browser](https://railway.com/deploy/double-commander-in-your-browser) — The Double Commander file manager in the cloud, from any device

Open this page in a browser: https://railway.com/deploy/libredesk-or-just-updated-open-source-he
