libredesk ships as a single binary and needs PostgreSQL and Redis to run. Install it with Docker, from a release binary, or from source.
Installation methods
Docker (Recommended)
Binary
From Source
Docker installation
The latest image is available on DockerHub at libredesk/libredesk:latestQuick start with Docker Compose
Download configuration files
Configure libredesk
Set app.encryption_key in config.toml to a random 32-character string. See Encryption key. Visit http://localhost:9000 and login with:
- Email:
System
- Password: The password you just set
Binary installation
Download the latest release
Download the latest release for your platform and extract the libredesk binary. Configure libredesk
Edit config.toml:
- Set
app.encryption_key to a random 32-character string. See Encryption key.
- Set the
db credentials and set db.host to localhost.
- Set
redis.address to localhost:6379.
Create the uploads directory
With the default fs upload provider, files are stored in the directory set by upload.fs.upload_path (uploads, relative to the working directory). libredesk does not create this directory, and uploads fail if it is missing or not writable.If libredesk runs as a different user than the one that created the directory, give that user ownership with chown. Install database tables
Creates the tables in PostgreSQL.--install deletes existing libredesk data. Run it only on a new database.
To set the System user password during installation, use the environment variable: Set the System user password
Visit http://localhost:9000 and login with:
- Email:
System
- Password: The password you just set
Compile from source
Build the latest unreleased version from the main branch.Prerequisites:
- PostgreSQL ≥13
- Redis
- Go 1.25 or later
- Node.js 20 or later
- pnpm
Build the application
Generates the libredesk binary in the current directory. Configure libredesk
Edit config.toml:
- Set
app.encryption_key to a random 32-character string. See Encryption key.
- Set the
db credentials and set db.host to localhost.
- Set
redis.address to localhost:6379.
Create the uploads directory
With the default fs upload provider, files are stored in the directory set by upload.fs.upload_path (uploads, relative to the working directory). libredesk does not create this directory, and uploads fail if it is missing or not writable.If libredesk runs as a different user than the one that created the directory, give that user ownership with chown. Install database tables
Creates the tables in PostgreSQL.--install deletes existing libredesk data. Run it only on a new database.
To set the System user password during installation, use the environment variable: Set the System user password
Visit http://localhost:9000 and login with:
- Email:
System
- Password: The password you just set
Encryption key
app.encryption_key encrypts stored secrets such as inbox passwords. It must be exactly 32 characters. Generate one with openssl rand -hex 16.
Set it before the first start and do not change it, or saved secrets can no longer be read.
Configuration via environment variables
Instead of using a config.toml file, you can configure libredesk entirely through environment variables.
- All environment variables use the
LIBREDESK_ prefix
- Use double underscore (
__) for nested configuration keys
- To use environment variables exclusively (without a config file), pass
--config=""
Example:
Command-line flags
Rate limits
Public endpoints are rate limited per client IP. Change the limits in config.toml.
Nginx reverse proxy (recommended)
We recommend running libredesk behind Nginx as a reverse proxy.
Install nginx if you don’t have it:
The proxy must set X-Client-IP to $remote_addr. libredesk reads this header to identify the client for rate limiting and audit logs, and without it every request looks like it came from the proxy.
Save the following as /etc/nginx/sites-available/libredesk:
Then enable it and reload nginx: