On-Premise installation
Deploy on Linux
Learn how to install on Linux manually
By default, the program runs with free Community features. To use Carbone Enterprise Edition, you need a Carbone license. Contact us to learn more, or request a free 30-day trial in our chat.
You can use Carbone with Docker on your Linux machine. To get started, see Deploy with Docker.
This guide explains how to run the application directly on Linux.
Installation
Download the Carbone On-premise binary for Linux from our changelog page.
In your terminal, run
chmod +x carbone-ee
to make the binary executable.Install LibreOffice (see instructions).
[Optional] Prepare the license key. You can do this in several ways:
- Set the environment variable
CARBONE_EE_LICENSE
with the license key as its value. - Pass the CLI option
--license
followed by the license key when starting the server (step 5). - Place the license file in the
config
directory. If the directory does not exist, create it next to the Carbone On-premise binary.
If multiple licenses are present, only the most recent one will be used.
The binary will not start if the license is outdated or invalid.
- Set the environment variable
Start the Carbone web server. You can pass options to Carbone On-Premise through the CLI:
./carbone-ee webserver --studio -p 4000
If an error appears during the start up, you must verify:
- if your license is valid
- if CLI options and values are valid
LibreOffice Install
Carbone uses efficiently LibreOffice to convert documents. Among all tested solutions, it is the most reliable and stable one in production for now. Behind the scene, Carbone server does:
- starts LibreOffice in "server-mode": headless, no User Interface loaded
- manages multiple LibreOffice workers to maximize performance (configurable number of workers)
- automatically restarts LibreOffice worker if it crashes or does not respond
- job queue, re-try conversion two times if something bad happen
# remove all old version of LibreOffice
sudo apt remove --purge libreoffice*
sudo apt autoremove --purge
# Download LibreOffice debian package. Select the right one (64-bit or 32-bit) for your OS.
# Get the latest from http://download.documentfoundation.org/libreoffice/stable
# or download the version currently "carbone-tested":
wget https://downloadarchive.documentfoundation.org/libreoffice/old/25.2.6.2/deb/x86_64/LibreOffice_25.2.6.2_Linux_x86-64_deb.tar.gz
# Install required dependencies on ubuntu server for LibreOffice 7.0+
sudo apt update
sudo apt install libxinerama1 libfontconfig1 libdbus-glib-1-2 libcairo2 libcups2 libglu1-mesa libsm6 libnss3
# Uncompress package
tar -zxvf LibreOffice_25.2.6.2_Linux_x86-64_deb.tar.gz
cd LibreOffice_25.2.6.2_Linux_x86-64_deb/DEBS
# Install LibreOffice
sudo dpkg -i *.deb
# If you want to use Microsoft fonts in reports, you must install the fonts
# Andale Mono, Arial Black, Arial, Comic Sans MS, Courier New, Georgia, Impact,
# Times New Roman, Trebuchet, Verdana,Webdings)
sudo apt install ttf-mscorefonts-installer
# If you want to use special characters, such as chinese ideograms, you must install a font that support them
# For example:
sudo apt install fonts-wqy-zenhei
Generate systemd script
Carbone On-Premise contains automatic installation scripts to daemonize with systemd. It has been carefully configured to provide a high level of security. The Systemd installation is working only for Ubuntu or Debian.
# Generate installation scripts
./carbone install
# Execute installation scripts and follow instructions
sudo ./install.sh
The service is configured to run with "carbone" user (automatically created) in the "/var/www/carbone-ee" directory.
It is possible to overwrite values through environment variables CARBONE_USER
and CARBONE_WORKDIR
.
You must install LibreOffice to generate PDF documents, read instructions.
Usage
By default, Carbone is executed at startup.
To check is service is running :
sudo service carbone-ee status
If running correctly, API is usable from :
http://localhost:4000
Stopping the service
When the Carbone server receives SIGTERM signal, (what we call "SOFT STOP")
- The
GET /status
API request returns HTTP status503
instead of200
. It can be used as a trigger (liveness, readiness probes) for a load balancer, reverse-proxy, or kubernetes. - If there is no report generation in progress, it will exist within 15 seconds.
- If there is a report in progress, it waits until the process is finished before exiting
- After 5 minutes, it still exists, even if there is some report generation in progress