LarpManager is a free platform to manage live-action roleplaying (LARP) events.
If you don’t want to self-host, you can use the free hosted instance at: https://larpmanager.com
- Features and Permissions Guide - How to create new features, views, and permissions
- Roles and Context Guide - How to structure views with context and understand role-based permissions
- Configuration System Guide - How to add customizable settings without modifying models
- Localization Guide - How to write translatable code and manage translations
- Playwright Testing Guide - How to write and run end-to-end tests
- Feature Descriptions - Complete reference of all available features
- Developer Instructions - Architecture, commands and best practices
- Contributing - How to contribute to the project
- Deployment - Production deployment instructions
LarpManager is distributed under a dual license model:
-
Open Source (AGPLv3) — Free to use under the terms of the AGPLv3 license. If you host your own instance, you must publish any modifications and include a visible link to larpmanager.com on every page of the interface.
-
Commercial License — Allows private modifications and removes the attribution requirement. For details or licensing inquiries, contact commercial@larpmanager.com.
Refer to the LICENSE file for full terms.
If you want an easy and fast deploy, set the environment variables see below for instructions on their values:
cp .env.example .env
Now time for the docker magic (see below for instructions on installing it):
docker compose up --build
Now create a super user:
docker exec -it larpmanager python manage.py createsuperuser
Go to http://127.0.0.1:8264/admin/larpmanager/association/, and create your Organization. Put as values only:
- Name: you should get it;
- URL identifier: put
def; - Logo: an image;
- Main mail: the main mail of the organization (duh)
Leave the other fields empty, and save.
Now expose the port 8264 (we wanted a fancy one) to your reverse proxy of choice for public access. Example configuration for nginx, place this code in /etc/nginx/sites-available/example.com:
server {
listen 80;
server_name example.com;
location / {
proxy_pass http://localhost:8264;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
Now create the symlink:
ln -s /etc/nginx/sites-available/example.com /etc/nginx/sites-enabled/
nginx -t && systemctl reload nginx
Now you're ready for liftoff!
Windows user: On some cases the docker fails to start up, you might want to try
dos2unix scripts/entrypoint.sh
If you want some more extra juicy stuff, you can set an automatic execution of
docker exec -it larpmanager python manage.py automate
This command performs a bunch of stuff related to advanced features; it should be run each day (cron?), when low traffic is expected (night?). You should combine it with the daily backup of pgdata and media_data volumes.
In the future, if you want to pull the latest changes of the repo, go with:
git pull origin main
docker exec -it larpmanager scripts/deploy.sh
It will perform a graceful restart.
Suggested baseline for cloud VMs:
- OS: Ubuntu 24.04 LTS (required for Python 3.12)
- Instance type: burstable instance to handle activity spikes
Some typical options could be:
- EC2: t3.small / t3.medium
- GCP: e2-small / e2-medium
- Azure: B1ms / B2s
Set those values:
- GUNICORN_WORKERS: Rule of thumb is number of processors * 2 + 1
- SECRET_KEY: A fresh secret key, you can use an online tool
- ADMIN_NAME, ADMIN_EMAIL: Set your own info
- DB_NAME, DB_USER, DB_PASS, DB_HOST: The database will be generated based on those values if it does not exists
- TZ: The base timezone of the server
- GOOGLE_CLIENTID, GOOGLE_SECRET: (Optional) If you want Google SSO, follow the django-allauth guide
- RECAPTCHA_PUBLIC, RECAPTCHA_PRIVATE: If you want recaptcha checks, follow the django-recaptcha guide
To install everything needed for the quick setup, install some dependencies:
sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
add docker's repo:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
finally, install Docker:
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin
run it:
sudo systemctl start docker
sudo systemctl enable docker
The typical, recommended setup is to have:
- On a server the production instance, managed with docker, with the real user data, CI pipeline, automated backup and all other devops best practices;
- On your local machine, a development instance, managed with dedicated system installations, dummy test database and local development server.
Here are the step for a local setup on your machine, required for both Develop and Contributing.
Requirements:
- Python 3.12 or higher
- Ubuntu 24.04 LTS recommended
For a Debian-like system: install the following packages:
# On Ubuntu 24.04 LTS
sudo apt install python3.12 python3.12-venv python3.12-dev python3-pip redis-server git \
postgresql postgresql-contrib libpq-dev nodejs build-essential libxmlsec1-dev \
libxmlsec1-openssl libavif16 libcairo2-dev pkg-config
# On Ubuntu 22.04 or older (requires deadsnakes PPA for Python 3.12)
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.12 python3.12-venv python3.12-dev python3-pip redis-server git \
postgresql postgresql-contrib libpq-dev nodejs build-essential libxmlsec1-dev \
libxmlsec1-openssl libavif16 libcairo2-dev pkg-configCreate and activate a virtual environment:
python3.12 -m venv venv
source venv/bin/activateInstall Python dependencies:
pip install -r requirements.txtInstall and activate LFS to handle big files:
sudo apt install git-lfs
git lfs install
git lfs pullCreate the PostgreSQL database and user:
sudo -u postgres psqlThen run the following SQL commands (default credentials: user larpmanager, password larpmanager):
CREATE DATABASE larpmanager;
CREATE USER larpmanager WITH PASSWORD 'larpmanager';
ALTER USER larpmanager CREATEDB; -- Required for running tests
ALTER DATABASE larpmanager OWNER TO larpmanager;
GRANT ALL PRIVILEGES ON DATABASE larpmanager TO larpmanager;
\qNote: The CREATEDB privilege is required for running tests, as pytest creates temporary test databases.
-
Copy
main/settings/dev_sample.pytomain/settings/dev.py:cp main/settings/dev_sample.py main/settings/dev.py
-
The default database settings should work with the setup above. If you used different credentials, update the
DATABASESsection inmain/settings/dev.py. -
In
SLUG_ASSOC, put the slug of the organization that will be loaded (default isdef).
Install npm modules for frontend functionality:
cd larpmanager/static
npm install
cd ../..Install Playwright browsers for end-to-end tests:
playwright installThe codebase is based on Django; if you're not already familiar with it, we highly suggest you to follow the tutorials at https://docs.djangoproject.com/.
-
Follow the steps outlined in Local setup for setting up your local development instance
-
Run migrations to initialize the database:
python manage.py migrate
-
Load the initial test data:
python manage.py reset
(Since this command is dangerous, we added a check to prevent it to be executed on main branch; to execute, just create a new branch before)
- Now you can run the local server for manual testing and debugging:
python manage.py runserver- You can use default users "orga@test.it" and "user@test.it", both with password "banana"
Thanks in advance for contributing! Here's the steps:
-
Follow the steps outlined in Local setup for setting up your local development instance
-
Install and activate
pre-commit:pip install pre-commit pre-commit install
-
In the
main/settings/dev.pysettings file, add aDEEPL_API_KEYvalue. You can obtain a API key for the DeepL API Free (up to 500k characters monthly) here. -
Create a new branch:
git checkout -b prefix/feature-name
For the prefix please follow this naming strategy:
- hotfix for urgent fixes in production
- fix for correction to existing functions
- feature for introducing / upgrading functions
- refactor for code changes not related to functions
- locale for changes in translation codes.
-
When you'are ready with the code changes, to make sure that all entries have been translated (default language is English), run
./scripts/translate.sh
This will updated all your translations, have correct the untranslated / fuzzy ones with Deepl API. In the terminal, take some time to review them before proceeding.
-
If you're creating a new feature, write a playwright test suite that covers it. Look in the
larpmanager/testsfolder to see how it's done. (Standard users are "orga@test.it" and "user@test.it", both with password "banana"). Run./scripts/record-test.sh
To run an instance of playwright that will record all your actions, in code that can later be inserted into the test.
- If you wish to expand an existing test, you can place a
page.pause()at the end of it, and then run
PWDEBUG=1 pytest larpmanager/tests/playwright/ability_px_test.py --headed -s
It will execute the text up untile the pause, so you can record the actions after it (remember to remove the
page.pause()before committing) - If you wish to expand an existing test, you can place a
-
If you're changing the model or the fixtures, run:
python manage.py dump_test
to update the dump used by tests and ci.
-
Before pushing make sure that all the tests passes using:
./scripts/test.sh [workers] (default: 4 workers)
Note that the tests will take some time to complete.
-
When you're ready to push your new branch, run
./scripts/upgrade.sh
This will execute some helpful activities like making sure you're updated with main branch, deleting old local branches, and other small things like that.
-
Go and open a new pull request. Make sure to explain clearly in the description what's happening.
Pull Requests should include only the minimal changes necessary to achieve their goal. Avoid non-essential changes such as refactoring, renaming, or reformatting — unless explicitly approved beforehand.
This helps keep code reviews focused, reduces merge conflicts, and maintains a clean commit history. If you believe a refactor is needed, please open an issue or start a discussion first to get approval.