..  GENERATED FILE, DO NOT EDIT DIRECTLY

    This file is automatically generated using https://codeberg.org/slidge/legacy-module-template/
    Its source is at:
    https://codeberg.org/slidge/legacy-module-template/src/branch/main/docs/source/admin/install.rst.jinja
    Open a pull request for this repository instead, to benefit the documentation of all slidge-based gateways.

Installation
------------

Containers
~~~~~~~~~~

A container is built on every push to the git repository and uploaded to `the codeberg package
registry <https://codeberg.org/slidge/-/packages/container/slidgram/latest>`__.

.. code:: sh

   docker run codeberg.org/slidge/slidgram  # works with podman too

Use the ``:latest`` tag for the latest release, ``:vX.X.X`` for release
X.X.X, and ``:main`` for the bleeding edge.


Python packages
~~~~~~~~~~~~~~~

.. image:: https://badge.fury.io/py/slidgram.svg
    :alt: PyPI package version
    :target: https://pypi.org/project/slidgram/

slidgram is available on the `python package index (PyPI) <https://pypi.org/project/slidgram/>`__.

If you are not familiar with python packaging, we recommend using `pipx <https://pypa.github.io/pipx/>`__ to
set up slidgram and its dependencies, isolated from the rest of your system.

.. code:: sh

   # for the latest stable release published to PyPI, if any
   pipx install slidgram

   slidgram --help

Bleeding edge versions are also available on `codeberg's python index <https://codeberg/slidge/-/packages/pypi/slidgram>`_.

.. code:: sh

   # for the bleeding edge
   pipx install slidgram \
       --pip-args='--extra-index-url https://codeberg.org/api/packages/slidge/pypi/simple/ --pre'

Unofficial debian package
~~~~~~~~~~~~~~~~~~~~~~~~~

If you are using debian you might be interested in installing the
`slidge (unofficial) debian
package <https://codeberg.org/slidge/debian>`__ which bundles slidgram
along with other slidge-based XMPP gateways.

Follow the instructions in the repository `README <https://codeberg.org/slidge/debian/src/branch/main/README.md>`_. In short:

- :ref:`Configure <setup-component>` your XMPP ;
- edit ``/etc/slidge/conf.d/common.conf``;
- edit ``/etc/slidge/telegram.conf``;
- run ``sudo systemctl start slidge@telegram``;
- watch the logs with ``sudo journalctl -u slidge@telegram -f``.


.. include:: install-custom.rst
