2024-11-12 22:20:32 +01:00

# ConvertX
[](https://github.com/C4illin/ConvertX/actions/workflows/docker-publish.yml)
2024-11-14 11:26:24 +01:00
[](https://github.com/C4illin/ConvertX/pkgs/container/ConvertX)
2024-11-27 17:06:35 +01:00
[](https://hub.docker.com/r/c4illin/convertx)
2024-11-12 22:20:32 +01:00
[](https://github.com/C4illin/ConvertX/pkgs/container/convertx)



2024-11-14 11:26:24 +01:00
<!--  -->
2024-11-12 22:20:32 +01:00
A self-hosted online file converter. Supports over a thousand different formats. Written with TypeScript, Bun and Elysia.
## Features
- Convert files to different formats
- Process multiple files at once
- Password protection
- Multiple accounts
## Converters supported
| Converter | Use case | Converts from | Converts to |
|------------------------------------------------------------------------------|---------------|---------------|-------------|
| [libjxl ](https://github.com/libjxl/libjxl ) | JPEG XL | 11 | 11 |
| [resvg ](https://github.com/RazrFalcon/resvg ) | SVG | 1 | 1 |
| [Vips ](https://github.com/libvips/libvips ) | Images | 45 | 23 |
2025-02-27 22:17:02 +01:00
| [libheif ](https://github.com/strukturag/libheif ) | HEIF | 2 | 4 |
2024-11-12 22:20:32 +01:00
| [XeLaTeX ](https://tug.org/xetex/ ) | LaTeX | 1 | 1 |
2024-12-11 11:09:03 +01:00
| [Calibre ](https://calibre-ebook.com/ ) | E-books | 26 | 19 |
2024-11-12 22:20:32 +01:00
| [Pandoc ](https://pandoc.org/ ) | Documents | 43 | 65 |
2024-11-26 17:18:48 +01:00
| [GraphicsMagick ](http://www.graphicsmagick.org/ ) | Images | 167 | 130 |
2024-11-16 11:34:47 +01:00
| [Inkscape ](https://inkscape.org/ ) | Vector images | 7 | 17 |
2024-11-26 17:18:48 +01:00
| [Assimp ](https://github.com/assimp/assimp ) | 3D Assets | 77 | 23 |
| [FFmpeg ](https://ffmpeg.org/ ) | Video | ~472 | ~199 |
2024-11-12 22:20:32 +01:00
<!-- many ffmpeg fileformats are duplicates -->
Any missing converter? Open an issue or pull request!
## Deployment
2025-04-24 18:03:21 +02:00
> [!WARNING]
> If you can't login, make sure you are accessing the service over localhost or https otherwise set HTTP_ALLOWED=true
2024-11-12 22:20:32 +01:00
```yml
# docker-compose.yml
services :
convertx :
image : ghcr.io/c4illin/convertx
container_name : convertx
restart : unless-stopped
ports :
- "3000:3000"
environment :
- JWT_SECRET=aLongAndSecretStringUsedToSignTheJSONWebToken1234 # will use randomUUID() if unset
volumes :
2024-12-26 07:04:26 -08:00
- ./data:/app/data
2024-11-12 22:20:32 +01:00
```
or
```bash
docker run -p 3000:3000 -v ./data:/app/data ghcr.io/c4illin/convertx
```
Then visit `http://localhost:3000` in your browser and create your account. Don't leave it unconfigured and open, as anyone can register the first account.
If you get unable to open database file run `chown -R $USER:$USER path` on the path you choose.
### Environment variables
All are optional, JWT_SECRET is recommended to be set.
| Name | Default | Description |
|---------------------------|---------|-------------|
| JWT_SECRET | when unset it will use the value from randomUUID() | A long and secret string used to sign the JSON Web Token |
| ACCOUNT_REGISTRATION | false | Allow users to register accounts |
| HTTP_ALLOWED | false | Allow HTTP connections, only set this to true locally |
| ALLOW_UNAUTHENTICATED | false | Allow unauthenticated users to use the service, only set this to true locally |
| AUTO_DELETE_EVERY_N_HOURS | 24 | Checks every n hours for files older then n hours and deletes them, set to 0 to disable |
2024-12-11 11:09:03 +01:00
| WEBROOT | | The address to the root path setting this to "/convert" will serve the website on "example.com/convert/" |
| FFMPEG_ARGS | | Arguments to pass to ffmpeg, e.g. `-preset veryfast` |
2025-04-02 15:02:56 +03:00
| HIDE_HISTORY | false | Hide the history page |
2024-11-12 22:20:32 +01:00
2024-11-27 17:06:35 +01:00
### Docker images
There is a `:latest` tag that is updated with every release and a `:main` tag that is updated with every push to the main branch. `:latest` is recommended for normal use.
The image is available on [GitHub Container Registry ](https://github.com/C4illin/ConvertX/pkgs/container/ConvertX ) and [Docker Hub ](https://hub.docker.com/r/c4illin/convertx ).
| Image | What it is |
|-------|------------|
| `image: ghcr.io/c4illin/convertx` | The latest release on ghcr |
| `image: ghcr.io/c4illin/convertx:main` | The latest commit on ghcr |
| `image: c4illin/convertx` | The latest release on docker hub |
| `image: c4illin/convertx:main` | The latest commit on docker hub |
2025-04-24 18:01:47 +02:00


2024-11-27 17:06:35 +01:00
<!-- Dockerhub was introduced in 0.9.0 and older releases -->
2024-11-12 22:20:32 +01:00
### Tutorial
2025-04-24 18:06:57 +02:00
> [!NOTE]
> These are written by other people, and may be outdated, incorrect or wrong.
2024-11-12 22:20:32 +01:00
Tutorial in french: <https://belginux.com/installer-convertx-avec-docker/>
2024-11-18 17:00:04 +01:00
2024-11-12 22:20:32 +01:00
Tutorial in chinese: <https://xzllll.com/24092901/>
## Screenshots

## Development
0. Install [Bun ](https://bun.sh/ ) and Git
1. Clone the repository
2. `bun install`
3. `bun run dev`
Pull requests are welcome! See below and open issues for the list of todos.
## Todo
- [x] Add messages for errors in converters
- [x] Add searchable list of formats
- [ ] Add options for converters
- [ ] Divide index.tsx into smaller components
- [ ] Add tests
- [ ] Make the upload button nicer and more easy to drop files on. Support copy paste as well if possible.
- [ ] Make errors logs visible from the web ui
- [ ] Add more converters:
- [ ] [deark ](https://github.com/jsummers/deark )
- [ ] LibreOffice
- [ ] [dvisvgm ](https://github.com/mgieseki/dvisvgm )
## Contributors
<a href="https://github.com/C4illin/ConvertX/graphs/contributors">
<img src="https://contrib.rocks/image?repo=C4illin/ConvertX" alt="Image with all contributors"/>
</a>
## Star History
<a href="https://github.com/C4illin/ConvertX/stargazers">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=C4illin/ConvertX&type=Date&theme=dark" />
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=C4illin/ConvertX&type=Date" />
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=C4illin/ConvertX&type=Date" />
</picture>
</a>