From 30d132399ea415e8ed51d83d6f7dc774e930554b Mon Sep 17 00:00:00 2001 From: Nullum Idea <87717780+Nullum-Idea@users.noreply.github.com> Date: Thu, 9 Jul 2026 12:28:39 +0200 Subject: [PATCH 1/3] Add instruction on how to selfhost larapaper Including: Basic instructions and sample compose.yml file --- res/How to Home Server/04 First service.md | 2 +- res/TRMNL Hackathon/Self host larapaper.md | 47 ++++++++++++++++++++++ 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 res/TRMNL Hackathon/Self host larapaper.md diff --git a/res/How to Home Server/04 First service.md b/res/How to Home Server/04 First service.md index e1dd878..a1ea3cd 100644 --- a/res/How to Home Server/04 First service.md +++ b/res/How to Home Server/04 First service.md @@ -48,7 +48,7 @@ services: privileged: true # Allow access to the host network for device discovery # Usually, you wouln't do this either, but for HA we need it - # Because we use the host network we do not need to expose container ports + # Because we use the host network we do not need to expose container ports network_mode: host ``` diff --git a/res/TRMNL Hackathon/Self host larapaper.md b/res/TRMNL Hackathon/Self host larapaper.md new file mode 100644 index 0000000..8739eca --- /dev/null +++ b/res/TRMNL Hackathon/Self host larapaper.md @@ -0,0 +1,47 @@ +## Deploy your own Larapaper + +To self host larapaper with serverless transforms you have to use [our fork](https://github.com/spark-hpi/larapaper) of [larapaper](https://github.com/usetrmnl/larapaper). To deploy it on your server we will once again use [docker compose](../How to Home Server/03 Installing Docker.md). + +In this case you need to build the containers from source (the build section in the yml file). This is simply done by running `docker compose up` while in the same directory as the `compose.yml` file but might take a while. Now it should build an run without any problems and only rebuild on changes in the repo. + +`compose.yml`: + +```yml +services: + larapaper: + container_name: larapaper + build: https://github.com/spark-hpi/larapaper.git#main + ports: + - "4567:8080" + environment: + - APP_KEY=base64:zzPXBQPlgn0NHwVBTVG0B//8P/PVwVnBp2gk0ZWR0+k= + - PHP_OPCACHE_ENABLE=1 + - TRMNL_PROXY_REFRESH_MINUTES=15 + - DB_DATABASE=database/storage/database.sqlite + - TRANSFORM_RUNNER_URL=transform-runner:3000 + - TRANSFORM_TIMEOUT_SECONDS=30 + volumes: + - database:/var/www/html/database/storage + - storage:/var/www/html/storage/app/public/images/generated + restart: unless-stopped + #platform: "linux/arm64/v8" + + transform-runner: + container_name: transform-runner + build: https://github.com/spark-hpi/larapaper-serverless-runner.git#slopfest + security_opt: + - seccomp=unconfined + - no-new-privileges=false + - apparmor=unconfined + environment: + TRANSFORM_TIMEOUT: 30 + TRANSFORM_MEMORY_LIMIT: 134217728 + +volumes: + database: + storage: +``` + +If you plan to use it in production you need to generate a new `APP_KEY` with `docker exec -it larapaper php artisan key:generate --show` while the container is running. + +For more info read the [readme](https://github.com/spark-hpi/larapaper/blob/main/README.md) and create an issue or pull request if you have questions / improvements! From 8a06ec4eab881d0d4169890bb88ad2f09e0d2cc9 Mon Sep 17 00:00:00 2001 From: Nullum Idea <87717780+Nullum-Idea@users.noreply.github.com> Date: Thu, 9 Jul 2026 15:25:54 +0200 Subject: [PATCH 2/3] Change from build to downloading the image from ghcr --- res/TRMNL Hackathon/Self host larapaper.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/res/TRMNL Hackathon/Self host larapaper.md b/res/TRMNL Hackathon/Self host larapaper.md index 8739eca..3088c01 100644 --- a/res/TRMNL Hackathon/Self host larapaper.md +++ b/res/TRMNL Hackathon/Self host larapaper.md @@ -2,15 +2,15 @@ To self host larapaper with serverless transforms you have to use [our fork](https://github.com/spark-hpi/larapaper) of [larapaper](https://github.com/usetrmnl/larapaper). To deploy it on your server we will once again use [docker compose](../How to Home Server/03 Installing Docker.md). -In this case you need to build the containers from source (the build section in the yml file). This is simply done by running `docker compose up` while in the same directory as the `compose.yml` file but might take a while. Now it should build an run without any problems and only rebuild on changes in the repo. +We are currently working on merging our fork back into the main repo but this might take a while. Just check for updates on this topic. -`compose.yml`: +To download and start larapaper just create a `compose.yml` with the following content and run `docker compose up -d` ```yml services: larapaper: container_name: larapaper - build: https://github.com/spark-hpi/larapaper.git#main + image: ghcr.io/spark-hpi/larapaper:latest ports: - "4567:8080" environment: @@ -28,7 +28,7 @@ services: transform-runner: container_name: transform-runner - build: https://github.com/spark-hpi/larapaper-serverless-runner.git#slopfest + image: ghcr.io/spark-hpi/larapaper-serverless-runner:latest security_opt: - seccomp=unconfined - no-new-privileges=false From ded869a91b94fcfd3a4c9ff42370682cfe3f4b39 Mon Sep 17 00:00:00 2001 From: Nullum <87717780+Nullum-Idea@users.noreply.github.com> Date: Sat, 11 Jul 2026 14:34:24 +0200 Subject: [PATCH 3/3] Apply suggestions from code review Co-authored-by: Oskar Manhart <52569953+oskardotglobal@users.noreply.github.com> --- res/TRMNL Hackathon/Self host larapaper.md | 24 +++++++++------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/res/TRMNL Hackathon/Self host larapaper.md b/res/TRMNL Hackathon/Self host larapaper.md index 3088c01..8136cfc 100644 --- a/res/TRMNL Hackathon/Self host larapaper.md +++ b/res/TRMNL Hackathon/Self host larapaper.md @@ -1,10 +1,10 @@ ## Deploy your own Larapaper -To self host larapaper with serverless transforms you have to use [our fork](https://github.com/spark-hpi/larapaper) of [larapaper](https://github.com/usetrmnl/larapaper). To deploy it on your server we will once again use [docker compose](../How to Home Server/03 Installing Docker.md). +To self-host larapaper with serverless transforms, you have to use [our fork](https://github.com/spark-hpi/larapaper) of [larapaper](https://github.com/usetrmnl/larapaper). We will once again use [docker compose](../How to Home Server/03 Installing Docker.md) for this. -We are currently working on merging our fork back into the main repo but this might take a while. Just check for updates on this topic. +We are currently working on merging our fork back into the main repo, but this might take a while. Check for updates on this topic. -To download and start larapaper just create a `compose.yml` with the following content and run `docker compose up -d` +Begin by creating a `compose.yaml` with the following contents: ```yml services: @@ -14,34 +14,30 @@ services: ports: - "4567:8080" environment: - - APP_KEY=base64:zzPXBQPlgn0NHwVBTVG0B//8P/PVwVnBp2gk0ZWR0+k= + - APP_KEY=base64: - PHP_OPCACHE_ENABLE=1 - TRMNL_PROXY_REFRESH_MINUTES=15 - DB_DATABASE=database/storage/database.sqlite - TRANSFORM_RUNNER_URL=transform-runner:3000 - - TRANSFORM_TIMEOUT_SECONDS=30 + # - MULTI_USER_MODE=1 # if you are planning to use larapaper with multiple users volumes: - database:/var/www/html/database/storage - storage:/var/www/html/storage/app/public/images/generated restart: unless-stopped - #platform: "linux/arm64/v8" transform-runner: container_name: transform-runner image: ghcr.io/spark-hpi/larapaper-serverless-runner:latest - security_opt: - - seccomp=unconfined - - no-new-privileges=false - - apparmor=unconfined + security_opt: [seccomp=unconfined] environment: - TRANSFORM_TIMEOUT: 30 - TRANSFORM_MEMORY_LIMIT: 134217728 + - TRANSFORM_TIMEOUT=30 # maximum time a transform may run + - TRANSFORM_MEMORY_LIMIT=134217728 # (128MB) the amount of memory a single transform may use, killed if the limit is exceeded volumes: database: storage: ``` -If you plan to use it in production you need to generate a new `APP_KEY` with `docker exec -it larapaper php artisan key:generate --show` while the container is running. +Replace `` inside the `APP_KEY` with the output of the command `openssl rand -hex 16 | base64`. -For more info read the [readme](https://github.com/spark-hpi/larapaper/blob/main/README.md) and create an issue or pull request if you have questions / improvements! +For more information, refer to Larapapers [README](https://github.com/spark-hpi/larapaper/blob/main/README.md), create an issue or ask us if you have questions. Pull requests with improvements are also always welcome!