Xylok Documentation
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Working with the Container

Xylok is installed by default to /opt/xylok. However, Xylok itself is running inside a container, via Docker or Podman. This introduces complications on working with it via the command line, because the processes inside the container can only access host files and directories that were explicitly mounted when the container was created. The majority of these mounts are in /var/lib/xylok and used to store the database and other data. For files that the user needs to access inside the container, a pass-through directory is mounted. On the host, this directory is at /opt/xylok/_passthrough by default. Inside the container, the same files can be accessed at /_passthrough.

The reverse is also true. When running a command that produces a file, it cannot write directly to the host. Instead, you should have commands inside the container write to /_passthrough and then access them on the host from /opt/xylok/_passthrough.

Some of the scripts described in Helper Scripts help with this process, others do not. The description of each will make note of this.

User Permissions

Inside the container all processes are run as the xylok user. To ensure file permissions are correct, the Xylok Manager will attempt to execute commands as this user before running commands inside the container. If you receive a permission error in this process, either become root and re-run the command or switch to the xylok user and re-run your command.

If you want to allow many people to use /opt/xylok/xylok to manage Xylok without givning them full sudo privileges, you could assign them to the xylok group and make it easy for people in that group to switch to the xylok user:

  1. Run sudo visudo
  2. Add the line %xylok ALL=(xylok) /opt/xylok/xylok * to the end
  3. Add your user to the xylok group: sudo usermod -aG xylok $(id -u -n)
  4. Logout and back in to activate the new group

If other users also need access to Xylok, add them to the xylok group as well.