1
0
Fork
You've already forked ex-lichat
0
forked from shirakumo/ex-lichat
A Lichat server implementation in Elixir
  • Elixir 96.8%
  • Shell 2.6%
  • Dockerfile 0.6%
Find a file
2026年05月17日 19:34:54 +02:00
.woodpecker Woodpecker docker build 2026年05月16日 11:34:29 +02:00
config Start work on better logging reports, and fix an issue with the started_on time of connections. 2026年05月16日 15:06:53 +02:00
dev Add postgres to the docker compose file 2026年05月17日 16:57:37 +02:00
lib Whoops 2026年05月17日 16:15:36 +02:00
priv/lang Minor 2026年05月15日 23:20:43 +02:00
rel/overlays Use sighup for reload 2026年05月15日 09:44:50 +02:00
test Run mix format 2026年05月10日 12:25:06 +02:00
.dockerignore Add postgres to the docker compose file 2026年05月17日 16:57:37 +02:00
.formatter.exs Init 2020年06月17日 20:08:46 +02:00
.gitignore Install script 2023年12月21日 19:28:53 +01:00
docker-compose.yml Add postgres to the docker compose file 2026年05月17日 16:57:37 +02:00
Dockerfile Don't copy tests into the docker image 2026年05月17日 19:34:54 +02:00
install.sh Minor 2024年10月20日 19:37:00 +02:00
LICENSE License 2023年09月17日 12:39:19 +02:00
mix.exs Minor 2026年05月16日 20:27:28 +02:00
mix.lock Minor changes for easy credo fixes 2026年03月25日 22:21:23 +01:00
README.mess Add postgres to the docker compose file 2026年05月17日 16:57:37 +02:00
TODO.mess Add IP action logging 2023年12月21日 15:30:13 +01:00

# ExLichat
This is an implementation of a ''Lichat''(https://shirakumo.org/docs/lichat) server in Elixir, providing a very robust, scalable, and extensible chat server implementation.
## Supported Extensions
In addition to the core protocol, ExLichat also supports many of the specified extensions:
- shirakumo-backfill
- shirakumo-block
- shirakumo-bridge
- shirakumo-channel-info
- shirakumo-channel-trees
- shirakumo-data
- shirakumo-edit
- shirakumo-emotes
- shirakumo-icon
- shirakumo-ip
- shirakumo-last-read
- shirakumo-leave-message
- shirakumo-link
- shirakumo-localization
- shirakumo-pause
- shirakumo-persistent-channels
- shirakumo-quiet
- shirakumo-reactions
- shirakumo-replies
- shirakumo-search
- shirakumo-server-management
- shirakumo-typing
- shirakumo-user-info
## Running from a Release Binary
Download the latest ''release''(https://shirakumo.org/project/ex-lichat/releases/latest) tarball and extract it to somewhere on your server. We highly recommend creating a custom user for it as well. You can then use the ``bin/lichat help`` command to get information about what you can do to the server.
If you use Systemd, the distribution also includes a ``lichat.service`` file for you. It assumes that you created a user called ``lichat`` and that you extracted the release package to their home directory at ``/home/lichat``. You can then install the service to systemd with
::
cp /home/lichat/lichat.service /etc/systemd/system/
systemctl enable --now lichat
::
You'll likely also want to change the SSL keys in ``config/`` and configure the server with the ``config/secret.exs`` file. You can reference the ''``config/runtime.exs``''(link config/runtime.exs) file for the available options.
To reload the configuration at runtime you can send ``SIGHUP`` to the server. To make the server restart gracefully, you can send ``SIGUSR1``. This will cause it to write a notice message to all connected users, and then exit with code 221. If run via Systemd, this exit code will automatically make it restart.
A good way to upgrade a running server is thus to extract the new release on top of your installation, then send SIGUSR1 to the process. Like so:
::sh
curl -L https://shirakumo.org/project/ex-lichat/releases/download/latest/lichat-linux.tar.gz | tar xfz -C /home/lichat/
kill -USR1 $(systemctl show --property MainPID --value lichat)
::
## Running via OCI/Docker
A container image is also available, which you can get via ''codeberg.org/shirakumo/ex-lichat''(link https://codeberg.org/shirakumo/-/packages/container/ex-lichat/latest). The image exposes ports 1111 and 1112, as well as a volume that contains all the configuration files and other data files for the server.
## Running a Development Server
Setting up a Lichat server is very simple.
::
pacman -S elixir
git clone https://shirakumo.org/project/ex-lichat
cd ex-lichat
mix deps.get
iex -S mix
::
You can configure and override settings from the ''config''(config/runtime.exs) in the ``config/secret.exs`` file.
Alternatively, you can use Docker Compose to launch the server together with a postgres instance, which is required for testing history. In this case, you can configure the server with the ``dev/secret.exs`` file. The server listens on localhost.
To start:
::
docker compose up -d
::
To rebuild the image and restart the server with any local changes:
::
docker compose down lichat
docker compose up -d lichat
::
When you're finished:
::
docker compose down
::