Server for Thunderbird AI Compose plugin
This server should be run before using the Thunderbird AI Compose Thunderbird plugin. You can either selfhost this server on a VPS you own or you can run it locally on your machine.
Important
I do not provide a public instance of this server for you to use nor do I provide support for selfhosting this server.
You can either run the server directly or download a prebuilt binary from the releases page.
-
Make sure you have Go installed (version 1.25 or higher).
-
Clone this repository:
git clone https://github.com/luciferreeves/thunderbird-ai-compose-server.git cd thunderbird-ai-compose-server -
Install dependencies:
go mod download
-
Build the server:
go build -o thunderbird-ai-compose-server
-
Run the server: Make sure to set up the environment variables as described in the Setting up the server section before running the server.
./thunderbird-ai-compose-server
- Download the latest release for your operating system from the releases page.
- Make sure to set up the environment variables as described in the Setting up the server section before running the server.
- Run the binary:
./thunderbird-ai-compose-server
In order to setup the server, copy the .env.example file to .env and fill in the required environment variables. See the following table for details on environment variables:
| Variable | Description | Required | Default Value |
|---|---|---|---|
PORT |
The port the server will run on | ❌ | 3000 |
PROVIDER |
The AI provider to use. See Supported Providers | ❌ | Gemini |
Model |
The model to use for the selected provider. See Supported Models | ❌ | gemini-2.5-flash |
API_KEY |
The API key for the selected provider. | ✅ | N/A |
| Provider | Environment Variable Value | Available |
|---|---|---|
| Gemini | gemini |
✅ |
| OpenAI | openai |
❌ |
Note
Models marked with a ❌ are not yet implemented, but are planned for future releases.
| Provider | Supported Models |
|---|---|
| Gemini | See here for available models. The default is gemini-2.5-flash. |
| OpenAI | Unimplemented |
You can run the server as a systemd service for easier management. Create a file named thunderbird-ai-compose-server.service in /etc/systemd/system/ with the following content:
[Unit]
Description=Thunderbird AI Compose Server
After=network.target
Wants=network.target
StartLimitIntervalSec=0
StartLimitBurst=3
[Service]
Type=simple
Restart=always
RestartSec=5
User=your-username
WorkingDirectory=/path/to/thunderbird-ai-compose-server
ExecStart=/path/to/thunderbird-ai-compose-server/thunderbird-ai-compose-server
EnvironmentFile=/path/to/thunderbird-ai-compose-server/.env
[Install]
WantedBy=multi-user.targetMake sure to replace your-username with your actual username and update the paths accordingly.
Then, enable and start the service:
sudo systemctl daemon-reload
sudo systemctl enable thunderbird-ai-compose-server
sudo systemctl start thunderbird-ai-compose-server