1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
|
Installation
============
This guide covers various methods for installing Xandikos on different platforms.
System Requirements
-------------------
- Python 3 (check ``pyproject.toml`` for specific version requirements)
- Optional: A reverse proxy (nginx, Apache) for production deployments
Installation Methods
--------------------
Using pip
~~~~~~~~~
The simplest way to install Xandikos is using pip:
.. code-block:: bash
pip install xandikos
For development or to get the latest features:
.. code-block:: bash
git clone https://github.com/jelmer/xandikos.git
cd xandikos
pip install -e .
Using Package Managers
~~~~~~~~~~~~~~~~~~~~~~
**Debian/Ubuntu**
Xandikos is available in Debian and Ubuntu repositories:
.. code-block:: bash
sudo apt update
sudo apt install xandikos
To install all optional dependencies:
.. code-block:: bash
sudo apt install python3-dulwich python3-defusedxml python3-icalendar python3-jinja2
**NetBSD**
Xandikos is available in pkgsrc:
.. code-block:: bash
pkgin install py-xandikos
**Arch Linux (AUR)**
Xandikos is available in the Arch User Repository:
.. code-block:: bash
yay -S xandikos
# or using another AUR helper
**macOS (using Homebrew)**
First install Python and pip if not already available:
.. code-block:: bash
brew install python
pip install xandikos
**FreeBSD**
Xandikos is available in the FreeBSD ports tree:
.. code-block:: bash
pkg install py311-xandikos
Using Docker
~~~~~~~~~~~~
Pull and run the official Docker image:
.. code-block:: bash
docker pull ghcr.io/jelmer/xandikos:latest
docker run -p 8080:8080 -v /path/to/data:/data ghcr.io/jelmer/xandikos
For production use with docker-compose:
.. code-block:: yaml
version: '3'
services:
xandikos:
image: ghcr.io/jelmer/xandikos:latest
ports:
- "8080:8080"
volumes:
- ./data:/data
environment:
- AUTOCREATE=defaults
- CURRENT_USER_PRINCIPAL=/alice
restart: unless-stopped
Using Kubernetes
~~~~~~~~~~~~~~~~
Deploy using the example Kubernetes configuration:
.. code-block:: bash
kubectl apply -f examples/xandikos.k8s.yaml
From Source
~~~~~~~~~~~
To install from source with all dependencies:
.. code-block:: bash
git clone https://github.com/jelmer/xandikos.git
cd xandikos
python setup.py install
Or for development:
.. code-block:: bash
git clone https://github.com/jelmer/xandikos.git
cd xandikos
pip install -r requirements.txt
python setup.py develop
Verifying Installation
----------------------
After installation, verify that Xandikos is properly installed:
.. code-block:: bash
xandikos --version
To test the installation with a temporary instance:
.. code-block:: bash
xandikos --defaults -d /tmp/test-dav
Then navigate to http://localhost:8080 in your browser.
Post-Installation Steps
-----------------------
1. **Set up a reverse proxy** for authentication and SSL (see :ref:`reverse-proxy`)
2. **Configure storage location** for your calendar and contact data
3. **Set up automatic backups** of your data directory
4. **Configure systemd** or another init system for automatic startup
Troubleshooting Installation
----------------------------
**Missing Dependencies**
If you encounter import errors, install the required Python packages.
See the `pyproject.toml` file for a list of required and optional
dependencies.
**Permission Issues**
Ensure the user running Xandikos has read/write access to the data directory:
.. code-block:: bash
mkdir -p /var/lib/xandikos
chown -R xandikos:xandikos /var/lib/xandikos
**Port Already in Use**
If port 8080 is already in use, specify a different port:
.. code-block:: bash
xandikos --port 8090 -d /path/to/data
Next Steps
----------
- Configure your CalDAV/CardDAV clients (see :doc:`clients`)
- Set up a reverse proxy for production use (see :ref:`reverse-proxy`)
|