Skip to content

Podman Quadlets

This content is not available in your language yet.

This guide will help you set up QSM.Web within Podman using Podman Quadlets. If you prefer Docker Compose, Refer to the Docker guide and adjust commands accordingly. Please note that all servers will run inside the container, so this method does not solve the lack of separation of concerns issue.

Since Podman does not have a daemon unlike Docker, Podman Quadlet integrates with systemd and allows Podman containers to start directly on startup.

  1. Podman
  2. Git

For CLI/script masters who do not wish to read through the explanation:

Terminal window
cd ~
git clone https://github.com/lines-of-codes/QSMSharp.git
cd QSMSharp
sudo cp -r ./misc/quadlet-build/* /etc/containers/systemd/
cd /etc/containers/systemd
sudo sed -i -e "s|# Replace this|$HOME/QSMSharp|" qsm-web.build
sudo mkdir /var/lib/qsm-web
sudo systemctl daemon-reload
sudo systemctl start qsm-web

You can, of course, replace the source location to a proper location instead of dumping it in your home folder.

  1. Choose a location to place QSMSharp’s source, it can simply be your home folder (cd ~), or somewhere like /usr/local/lib, then cd into it.

  2. Clone the Git repository and go into the directory by running:

    Terminal window
    git clone https://github.com/lines-of-codes/QSMSharp.git
    cd QSMSharp
  3. In the cloned repository, The folder misc/quadlet-build contains Podman Quadlet files, Which you can simply copy as such:

    Terminal window
    sudo cp -r ./misc/quadlet-build/* /etc/containers/systemd/
  4. Now, Edit the file /etc/containers/systemd/qsm-web.build and edit the following line:

    SetWorkingDirectory=# Replace this

    Replacing the comment # Replace this with the location of QSMSharp. For example:

    SetWorkingDirectory=/home/example/QSMSharp
  5. Create the data storage location for QSM.Web:

    Terminal window
    sudo mkdir /var/lib/qsm-web

    It can also be other locations, See Change data location

  6. Run systemd daemon-reload and run systemctl start qsm-web. It will take a bit long as this will build the container.

Note that QSM Web will now be enabled to run on startup by default. If you wish to change that, or change the installation target (by default installs to default.target), edit /etc/containers/systemd/qsm-web.container and run systemctl daemon-reload.

You’ll have to run systemctl daemon-reload every time you edit the files inside /etc/containers/systemd/.

To update QSM.Web, Simply run git pull within the project’s directory and run systemctl restart qsm-web.

Or you may want to go to a specific commit, you can do that by running git checkout <commit> instead. (For example, git checkout 4eeca32)

You can edit the /etc/containers/systemd/qsm-web.container file to change the default server location storage. For example, If you wish to use /mnt/storage/qsm-web instead, change it as follows:

Volume=/var/lib/qsm-web:/var/lib/qsm-web
Volume=/mnt/storage/qsm-web:/var/lib/qsm-web

Remember to run systemctl daemon-reload and then restart the service.