Docs›Get started›Install Emergic›Linux office server

Install the office server on Linux

The Emergic office server runs headless on Ubuntu 22.04 or later and Debian 12 or later, 64-bit Intel or AMD; on Rocky Linux, AlmaLinux and Red Hat Enterprise Linux 8 or later, 64-bit Intel or AMD (its own package); and on Ubuntu 24.04 or later on 64-bit ARM, such as NVIDIA DGX Spark. Older systems such as Ubuntu 20.04 and Debian 11 have an older system library (glibc) than the package needs, and apt refuses the package there. People use the Emergic app on their Mac, Windows or Linux computer or phone and join it with a code (Install on Linux).

Download#

Download Emergic-office-linux-x64.deb from the download page, or on the server:

curl -LO https://github.com/emergic/emergic-releases/releases/latest/download/Emergic-office-linux-x64.deb

Install it#

sudo apt install ./Emergic-office-linux-x64.deb

On a 64-bit ARM computer (NVIDIA DGX Spark, or another ARM server on Ubuntu 24.04 or later, including DGX OS), use Emergic-office-linux-arm64.deb in both commands. It answers on the graphics through Vulkan, which NVIDIA's driver provides on DGX Spark, or on the processor. The DGX Spark's graphics share its memory, so the office serves as many chats as that share holds (how many chats each computer serves). Emergic has not yet been tested on a DGX Spark.

The package makes the office in /var/lib/emergic-office and starts it as the systemd service emergic-office, run by the system account emergic. It starts at boot with nobody signed in. Web search (SearXNG) is set up at the same time and needs the internet for about a minute; without it the office works, and sudo emergic-office search sets it up later. Search runs on Python 3.11 or newer; on Ubuntu 22.04, whose own Python is 3.10, apt installs python3.11-venv with the package.

Open the console#

The console listens on this computer only. Print your sign-in token, then open it from another computer through SSH:

sudo emergic-office token
ssh -L 7700:127.0.0.1:7700 you@office-server

With the SSH session open, go to http://127.0.0.1:7700/admin on that computer and sign in with the token. On the server itself, open the same address in a browser.

Choose the office model and add people#

In the console, choose the office model and add a person each, as on any office. Admin console.

Join computers#

Each person installs the app and chooses Join with a code and types a code from People and codes. Computers on the office network find the server by itself. Join an office.

Rocky Linux, AlmaLinux and RHEL

On Rocky Linux, AlmaLinux or Red Hat Enterprise Linux 8 or later (64-bit Intel or AMD), use the RPM package. It holds the same office server, service and update timer as the .deb, built for the older system library (glibc 2.28) that version 8 has.

curl -LO https://github.com/emergic/emergic-releases/releases/latest/download/Emergic-office-linux-x64.rpm
sudo dnf install ./Emergic-office-linux-x64.rpm

dnf also installs Python 3.11 (python3.11, from the AppStream repository), which web search needs. The repositories carry it from version 8.8 and 9.2; on an older 8.x or 9.x release, web search waits until the system is updated, and the rest of the office works. If Python 3.11 was left out, run sudo dnf install python3.11, then sudo emergic-office search. The console, tokens and joining work as in the steps above.

Firewall. Rocky Linux turns on firewalld. Let the office network reach the server on port 7702 and let computers find it:

sudo firewall-cmd --permanent --add-rich-rule='rule family=ipv4 source address=192.168.0.0/16 port port=7702 protocol=tcp accept'
sudo firewall-cmd --permanent --add-service=mdns
sudo firewall-cmd --reload

Replace 192.168.0.0/16 with your office network.

SELinux. The office runs as an ordinary systemd service from /opt/emergic-office and brings no SELinux policy of its own. Emergic has not yet been tested with SELinux in enforcing mode, the Rocky Linux default. If the service does not start, sudo ausearch -m avc -ts recent lists what SELinux refused; send that to support@emergic.com.

Graphics. Without a graphics card the office answers on the processor. With a card that has a Vulkan driver: sudo dnf install vulkan-loader mesa-vulkan-drivers, then sudo systemctl restart emergic-office.

Remove it. sudo dnf remove emergic-office stops the office and keeps its data, so a reinstall brings it back. To delete the office as well (people, computers, its certificate authority): sudo rm -rf /var/lib/emergic-office /var/cache/emergic-office and sudo userdel emergic.

Answering questions on the server#

A server with 15 GB of memory or more also answers questions itself; a smaller one only routes them to the office's other computers. Change it with sudo emergic-office serve on or serve off. The model engine uses the processor, and a graphics card when the computer has a Vulkan driver. To add one, then restart the office so the engine finds it:

sudo apt install libvulkan1 mesa-vulkan-drivers
sudo systemctl restart emergic-office

On a slow processor the office may judge this computer too slow to answer and only route questions; the admin can change its class in the console.

Firewall#

Allow TCP port 7702 from the office network, where computers reach the server, and UDP port 5353 for discovery. With ufw (with firewalld on Rocky Linux, see above):

sudo ufw allow from 192.168.0.0/16 to any port 7702 proto tcp
sudo ufw allow 5353/udp

Replace 192.168.0.0/16 with your office network. Ports 7700, 7701 and 8888 serve this computer only and stay closed.

Upgrade#

The server installs a release when the office's update policy allows it: a root timer checks every 15 minutes, checks the Emergic signature and installs the package. The server keeps a copy of each package it installs this way. If a later release does not start, that copy goes back on. The first automatic update after a package installed by hand has no copy to go back to; if it does not start, the timer runs its setup again after a day, or sudo emergic-office setup retries it at once. To stop automatic installs, run sudo systemctl disable --now emergic-office-update.timer. To upgrade by hand, install the new package over the old one. How updates work.

Check it and read its logs#

sudo emergic-office status
sudo journalctl -u emergic-office
sudo tail /var/lib/emergic-office/hub.log

Remove it#

sudo apt remove emergic-office    # stops the office; keeps its data, so a reinstall brings it back
sudo apt purge emergic-office     # also deletes the office: people, computers, its certificate authority

Check a download#

Compare the file's SHA-256 with SHA256SUMS in the release:

sha256sum Emergic-office-linux-x64.deb    # or Emergic-office-linux-x64.rpm