Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
190 commits
Select commit Hold shift + click to select a range
9960763
move classes, add namespace
matthi4s Jan 22, 2026
355adb2
start implementing new config
matthi4s Jan 22, 2026
01fd6e2
refactor redis and mongo client
matthi4s Jan 22, 2026
e95a722
refactor id
matthi4s Jan 23, 2026
ff93bda
refactor storages
matthi4s Jan 23, 2026
477b114
Merge branch 'master' into two
JulianVennen Jan 23, 2026
30cee78
refactor storages even more
matthi4s Jan 23, 2026
ccb8f8e
refactor filters
matthi4s Jan 23, 2026
138be88
some log refactoring
matthi4s Jan 23, 2026
3eb8dc1
another storage refactor
matthi4s Jan 23, 2026
a55ab10
remove old config and core
matthi4s Jan 23, 2026
ccf78c7
api refactor
matthi4s Jan 23, 2026
9eb9628
reimplement caching
matthi4s Jan 23, 2026
1e429ef
adjust frontend
matthi4s Jan 23, 2026
32d7b3c
fix a few things
matthi4s Jan 23, 2026
5aa3fe5
remove debug output
matthi4s Jan 23, 2026
6cc6911
set source
matthi4s Jan 23, 2026
5672cf2
add log info/delete api endpoints
matthi4s Jan 25, 2026
5dffb1d
add more info to log info api
matthi4s Jan 26, 2026
b5c96e5
Refactor frontend page layout and UI styles.
tomjpeg Jan 26, 2026
469bb96
Include btn.css
tomjpeg Jan 26, 2026
9c0bf48
Update frontend files and add logo
tomjpeg Jan 26, 2026
789e2cf
add placeholder logo
tomjpeg Jan 26, 2026
b4a475d
adjust colors
tomjpeg Jan 26, 2026
f7e12bc
store token in cookie
matthi4s Jan 26, 2026
203c580
hide token in response
matthi4s Jan 26, 2026
e5491ff
adjust logo
tomjpeg Jan 26, 2026
6e0bbfb
output domain
matthi4s Jan 26, 2026
7055e2d
add imports
tomjpeg Jan 26, 2026
99b25f3
Fix missing import
tomjpeg Jan 26, 2026
dbd2158
Refactor logview.php to improve layout, separate version info
tomjpeg Jan 26, 2026
56ed415
enhance button styles, improve responsive layouts, and optimize UI el…
tomjpeg Jan 26, 2026
871ef5e
refactor routing
matthi4s Jan 26, 2026
264674b
fix path
matthi4s Jan 26, 2026
874f9ff
fix cookie deletion
matthi4s Jan 26, 2026
48f65ad
refactor frontend php
matthi4s Jan 26, 2026
b2c0197
added metadata output
matthi4s Jan 26, 2026
a27186a
output source and created time
matthi4s Jan 26, 2026
101c445
rename to start
matthi4s Jan 26, 2026
af7753c
update paste status
matthi4s Jan 26, 2026
ea88eeb
better metadata validation
matthi4s Jan 27, 2026
4eb4e03
use display function
matthi4s Jan 27, 2026
13ae3e7
Update varaibles
tomjpeg Jan 27, 2026
fcfccb7
style footer of log panel
tomjpeg Jan 27, 2026
fb798f4
refactor log panel metadata and detected info structure
tomjpeg Jan 27, 2026
ef0f51d
adjust text
tomjpeg Jan 27, 2026
fe3c726
fix spelling error
tomjpeg Jan 27, 2026
2ac87b0
Add 404 page
tomjpeg Jan 27, 2026
ce6a7d6
use button for paste placeholder element
tomjpeg Jan 27, 2026
2aeb1e4
restructure start js, remove fflate, add paste button functionality
matthi4s Jan 27, 2026
c6023d0
enhance drag and drop styling
tomjpeg Jan 27, 2026
0a356bb
adjust logo
tomjpeg Jan 27, 2026
3aa8fca
add paste error
tomjpeg Jan 27, 2026
e9410e4
color config
matthi4s Jan 27, 2026
fad4bb4
update css to use new var system
tomjpeg Jan 27, 2026
cb4da8e
added dynamic svg favicon
matthi4s Jan 27, 2026
8131324
Replace static colors
tomjpeg Jan 27, 2026
1bb257e
output errors
matthi4s Jan 27, 2026
db55d27
Use color mix for logs element
tomjpeg Jan 27, 2026
5a00861
Use color mix for lines
tomjpeg Jan 27, 2026
c70663d
allow pasting files
matthi4s Jan 27, 2026
f8f9535
inline header js
matthi4s Jan 27, 2026
0c4f251
change share to save button
matthi4s Jan 27, 2026
f421ba5
Round rem numbers and fix code highlighting in CSS
tomjpeg Jan 27, 2026
2ea6cb6
update footer
matthi4s Jan 27, 2026
d4ef47b
comments
matthi4s Jan 27, 2026
7bf5411
add syntax highlighting
tomjpeg Jan 27, 2026
d0d8a49
update fontawesome
matthi4s Jan 27, 2026
a9e156c
add fontawesome brands
matthi4s Jan 27, 2026
d89b4ca
fix paste
matthi4s Jan 27, 2026
1e24127
change footer
tomjpeg Jan 27, 2026
a9ea2d3
adjust footer
tomjpeg Jan 27, 2026
a838905
Center icon of placeholder
tomjpeg Jan 27, 2026
b835830
fix dragover
tomjpeg Jan 27, 2026
92a770e
improve footer
matthi4s Jan 27, 2026
7070802
Fix font weight usage
tomjpeg Jan 27, 2026
2086673
include fonts
matthi4s Jan 27, 2026
0d16024
change source icon, make abuse email optional
matthi4s Jan 27, 2026
a472fa7
Clean up more styles
tomjpeg Jan 27, 2026
86e012b
disable legal by default
matthi4s Jan 27, 2026
ab1b0fc
Adjust logo size on mobile
tomjpeg Jan 27, 2026
8045a1b
fix icon position
matthi4s Jan 27, 2026
fa511dd
remove working class again
matthi4s Jan 27, 2026
beb0596
Adjust padding on phone
tomjpeg Jan 27, 2026
d0329ae
move commend
tomjpeg Jan 27, 2026
3a9883c
Style scrollbar and add selection color
tomjpeg Jan 27, 2026
a79c2d7
Fix height unit, add transitions and improve selection styles
tomjpeg Jan 27, 2026
9ca82de
Reorder "Drop"
tomjpeg Jan 27, 2026
f2d5da9
Refactor button styles
tomjpeg Jan 27, 2026
79b1b91
Add transition to buttons
tomjpeg Jan 27, 2026
887681e
remove hover background for paste hints
tomjpeg Jan 27, 2026
687afdd
remove margin of h1
tomjpeg Jan 27, 2026
7fdf374
Use h1 for tagline main
tomjpeg Jan 27, 2026
caaa09b
grow log container
tomjpeg Jan 27, 2026
34100d0
Move error message and save button
tomjpeg Jan 27, 2026
83e215d
Adjust styling of error message
tomjpeg Jan 27, 2026
23322cc
Adjust line spacing
tomjpeg Jan 27, 2026
84d39f4
use frankenphp worker mode
matthi4s Jan 27, 2026
611a262
hide overflow
matthi4s Jan 27, 2026
96dcff5
configure worker threads, hide errors
matthi4s Jan 27, 2026
0553dfa
automatically create indexes
matthi4s Jan 27, 2026
fa736bb
add view transition
matthi4s Jan 27, 2026
43f7141
logo view transition
matthi4s Jan 27, 2026
5b074af
use router classes
matthi4s Jan 27, 2026
c02763b
add titles
matthi4s Jan 27, 2026
29e2d4b
start settings implementation
matthi4s Jan 27, 2026
88ca69b
add api documentation
tomjpeg Jan 28, 2026
fe1a39a
Add highlight box and text
tomjpeg Jan 28, 2026
faf3aa5
basic settings html
matthi4s Jan 28, 2026
7aeb2a7
add value
matthi4s Jan 28, 2026
729d54f
Use display grid instead of table
tomjpeg Jan 28, 2026
f9efcea
simplify colors and change styling of issue box
tomjpeg Jan 28, 2026
0d76b48
Style settings menu
tomjpeg Jan 28, 2026
536f10a
Adjust issue/solution element
tomjpeg Jan 28, 2026
ca79de7
Adjust padding
tomjpeg Jan 28, 2026
57579f9
Add -webkit-user-drag: none to logo element to prevent drag and drop …
tomjpeg Jan 28, 2026
467272f
update api docs
matthi4s Jan 28, 2026
37e01b1
Add table of contents to API documentation and improve responsive des…
tomjpeg Jan 28, 2026
6e4d180
link logo to start
matthi4s Jan 28, 2026
89a26f9
Update note box
tomjpeg Jan 28, 2026
5bc0656
save settings
matthi4s Jan 28, 2026
1c0bf3a
change body classes
matthi4s Jan 28, 2026
ff68df0
Move to css flex for log inner
tomjpeg Jan 28, 2026
e3fed69
Use display grid
tomjpeg Jan 28, 2026
f06dc9d
more escaping
matthi4s Jan 28, 2026
6c75a1b
more escaping
KurtThiemann Jan 28, 2026
8203bd6
set name in email subject
matthi4s Jan 28, 2026
14b88f0
Support settings on log
tomjpeg Jan 28, 2026
5644918
more escaping, add aria-label to textarea
KurtThiemann Jan 28, 2026
33fd62e
more escaping
KurtThiemann Jan 28, 2026
b7c2ab5
more escaping
KurtThiemann Jan 28, 2026
261f39c
skip metadata entries that are not objects
KurtThiemann Jan 28, 2026
af1bcf0
validate that content is a string
KurtThiemann Jan 28, 2026
c06c2cf
merge master
matthi4s Jan 28, 2026
4501a31
limit metadata entry count
matthi4s Jan 28, 2026
0a6a891
dont crash worker if mongodb isn't available
matthi4s Jan 28, 2026
53f5702
wait for mongodb to be healthy
matthi4s Jan 28, 2026
9fa7b6b
adjust docker image building, add github action to publish image
matthi4s Jan 28, 2026
0d29b55
fix
matthi4s Jan 28, 2026
a685202
added production compose example, build arm
matthi4s Jan 28, 2026
5f10917
Use display contents for log entries
tomjpeg Jan 29, 2026
8f805d9
return api error if request body content could not be decoded
KurtThiemann Jan 29, 2026
c3f5356
limit number of content-encoding steps
KurtThiemann Jan 29, 2026
b7ceafa
Improve log entry highlighting and adjust font-family fallback
tomjpeg Jan 29, 2026
e55f0ef
add share button to log header
tomjpeg Jan 29, 2026
09c6956
limit maximum read request body size to STORAGE_LIMIT_BYTES * 2
KurtThiemann Jan 29, 2026
e3de33c
suppress warnings when parsing input json
KurtThiemann Jan 29, 2026
164e5c9
Fix name of error message field in error responses
JulianVennen Jan 29, 2026
6eb812f
enforce label length limit for falsy strings
KurtThiemann Jan 29, 2026
2bfd388
enforce key length limit for falsy strings
KurtThiemann Jan 29, 2026
d6848ee
Accept content type headers with charsets and other parameters
JulianVennen Jan 29, 2026
a477368
add copyable short URL button to log header
tomjpeg Jan 29, 2026
947b094
Update data-clipboard source and button style in log view
tomjpeg Jan 29, 2026
21e3389
update readme
matthi4s Jan 29, 2026
d5e26cd
clean up tables
matthi4s Jan 29, 2026
3706205
Update logo and readme
tomjpeg Jan 29, 2026
ca5ddd0
copy button js
matthi4s Jan 29, 2026
4cfd577
Fix auto zoom on input field
tomjpeg Jan 29, 2026
11fe37d
reimplement error collapsing
matthi4s Jan 29, 2026
d339033
Add styles for error toggle and collapsed lines interactions
tomjpeg Jan 29, 2026
54fa682
Do not escape slashes in json output
JulianVennen Jan 29, 2026
e08a1ae
Add delete log UI and improved popover styling
tomjpeg Jan 29, 2026
aef6b82
generate log storage time string from config
KurtThiemann Jan 29, 2026
43e6956
Fix invalid json in docs
JulianVennen Jan 29, 2026
78ca801
Rename log-notice to log-details and set correct styling dynamically …
tomjpeg Jan 29, 2026
5a1c94e
Fix responsive layout of log-details
tomjpeg Jan 29, 2026
1ac694a
Adjust delete notice and update active state of error button
tomjpeg Jan 29, 2026
700f0b9
remove allow zoom out
tomjpeg Jan 29, 2026
bf651f0
add log delete button functionality
KurtThiemann Jan 29, 2026
98d0955
Clean up css files
tomjpeg Jan 29, 2026
40bb2d9
Add user-select none to prevent line numbers from being selectable
tomjpeg Jan 29, 2026
6d9fdd7
Clean up more css
tomjpeg Jan 29, 2026
8389394
reevaluate content status on page load in case textarea is filled by …
KurtThiemann Jan 29, 2026
1f319bc
hide delete popover using popovertarget instead of js
KurtThiemann Jan 29, 2026
11b76d1
fix drop area being triggered when dragging anything other than files
KurtThiemann Jan 29, 2026
50b1f71
fix drop area not being triggered anymore at all
KurtThiemann Jan 29, 2026
f8bfe54
Add title tags
tomjpeg Jan 29, 2026
73872af
allow dropping text/plain data
KurtThiemann Jan 29, 2026
cbbbe6e
highlight drop area for text
KurtThiemann Jan 29, 2026
a85ebcf
show error if log deletion fails
KurtThiemann Jan 29, 2026
120a27a
add styling for popover-error
tomjpeg Jan 29, 2026
1fe22c5
Change styling of problem solution area
tomjpeg Jan 29, 2026
c5e047c
Change logic of condition
tomjpeg Jan 29, 2026
2d881ee
remove unused import
pavog Jan 29, 2026
40eec1d
fix phpdoc
pavog Jan 29, 2026
1b61252
Add basic styles for floating scrollbar setting
tomjpeg Jan 29, 2026
a37db72
implement floating scrollbar
matthi4s Jan 29, 2026
39a5f0f
fix path to Dockerfile in dev/compose.yaml
pavog Jan 29, 2026
24a093d
prepare merge
matthi4s Jan 29, 2026
326c01f
change tag in example compose, parse bool env values
matthi4s Jan 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
vendor/
.git/
.github/
Dockerfile
67 changes: 67 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Publish Docker Image

on:
push:
branches:
- 'two'
- 'main'
tags:
- 'v*'

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels)
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
# Branch Name (e.g. 'two', 'main')
type=ref,event=branch
# Full Version (e.g. '1.2.3')
type=semver,pattern={{version}}
# Major Version (e.g. '1')
type=semver,pattern={{major}}
# Major.Minor (e.g. '1.2')
type=semver,pattern={{major}}.{{minor}}
# Latest (Only on release tags)
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/v') }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
cache-from: |
type=gha
type=gha,scope=refs/heads/main
cache-to: type=gha,mode=max
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*.log
.idea
/vendor/
core/config/mongo.php
config.json
38 changes: 38 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
FROM dunglas/frankenphp:1-php8.5

# System Setup
RUN install-php-extensions mongodb zip

ARG USER=mclogs
RUN useradd ${USER} && \
setcap CAP_NET_BIND_SERVICE=+eip /usr/local/bin/frankenphp

COPY --from=composer/composer:2-bin /composer /usr/bin/composer

WORKDIR /app

# Dependencies (Cached)
COPY composer.json composer.lock ./

RUN --mount=type=cache,target=/tmp/cache/composer \
COMPOSER_CACHE_DIR=/tmp/cache/composer \
composer install --no-dev --no-interaction --no-scripts --no-autoloader --prefer-dist --ignore-platform-req=ext-frankenphp

# Application Setup
COPY docker/Caddyfile /etc/frankenphp/Caddyfile
COPY docker/mclogs.ini /usr/local/etc/php/conf.d/mclogs.ini

COPY . .

RUN composer dump-autoload --optimize --no-dev --classmap-authoritative

# Permissions & Runtime
RUN chown -R ${USER}:${USER} /config/caddy /data/caddy /app

USER ${USER}

EXPOSE 80
EXPOSE 443
EXPOSE 443/udp

VOLUME ["/data"]
95 changes: 74 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,81 @@
# mclo.gs
**Paste, share & analyse your Minecraft logs**

## About
The project [mclo.gs](https://mclo.gs) was created in 2017 by the Aternos team after more
than 4 years of running free Minecraft servers and supporting users with
their problems. One of the main issues was the impossibility to easily share
the main source of errors: The Minecraft server log file. mclo.gs solves this
problem and even goes one step further with providing syntax highlighting and
suggestions based on the log content to simply solve common errors.
<p align="center">
<img src="web/public/img/logo.svg" width="260">
</p>
<p align="center">
<strong>Paste, share & analyse your logs</strong><br>
Built for Minecraft & Hytale
</p>

## Features
* Copy + paste log sharing
* Simple API for easy integration
* Share logs by pasting or uploading files
* Automatic removal of sensitive information (e.g. IP addresses)
* Short URLs for easy sharing
* Syntax highlighting
* Line numbers
* Direct links to specific lines
* Analysis and parsing using [codex](https://github.com/aternosorg/codex-minecraft)
* Different storage backends (mongodb, redis, filesystem)

### For developers
* Upload your logs using the API
* Add metadata to shared logs, e.g. version numbers, server ids, etc.
* Retrieve logs and their metadata from the API
* Open source and self-hostable

## Self-hosting
You can self-host mclogs using Docker. A [docker image](https://github.com/aternosorg/mclogs/pkgs/container/mclogs) is available in the GitHub Container Registry: `ghcr.io/aternosorg/mclogs`.
A MongoDB instance is also required to run mclogs.

An example docker compose files for self-hosting can be found here: [docker/compose.production.yaml](docker/compose.production.yaml).

### Config
You can configure mclogs by creating a `config.json` file in the root directory, see [example.config.json](example.config.json) or by setting
environment variables. Environment variables override settings in the config file.

Here is a list of all available config options:

| Variable / JSON Path | Default | Description |
|:--------------------------------------------------------------------|:--------------------|:--------------------------------------------|
| `MCLOGS_STORAGE_TTL` <br> `storage.ttl` | `7776000` (90d) | Time until logs are deleted after last view |
| `MCLOGS_STORAGE_LIMIT_BYTES` <br> `storage.limit.bytes` | `10485760` (10 MiB) | Maximum size of a log in bytes |
| `MCLOGS_STORAGE_LIMIT_LINES` <br> `storage.limit.lines` | `25000` | Maximum number of lines in a log |
| `MCLOGS_MONGODB_URL` <br> `mongodb.url` | `"mongodb://mongo"` | MongoDB connection URL |
| `MCLOGS_MONGODB_DATABASE` <br> `mongodb.database` | `"mclogs"` | Name of the MongoDB database |
| `MCLOGS_ID_LENGTH` <br> `id.length` | `7` | The default length for new IDs |
| `MCLOGS_LEGAL_ABUSE` <br> `legal.abuse` | `null` | Public email address to report abuse |
| `MCLOGS_LEGAL_IMPRINT` <br> `legal.imprint` | `null` | The imprint URL |
| `MCLOGS_LEGAL_PRIVACY` <br> `legal.privacy` | `null` | The privacy policy URL |
| `MCLOGS_FRONTEND_NAME` <br> `frontend.name` | `null` | Instance name (defaults to domain) |
| `MCLOGS_FRONTEND_COLOR_ACCENT` <br> `frontend.color.accent` | `#5cb85c` | The accent/primary color |
| `MCLOGS_FRONTEND_COLOR_BACKGROUND` <br> `frontend.color.background` | `#1a1a1a` | The background color |
| `MCLOGS_FRONTEND_COLOR_TEXT` <br> `frontend.color.text` | `#e8e8e8` | The text color |
| `MCLOGS_FRONTEND_COLOR_ERROR` <br> `frontend.color.error` | `#f62451` | The error color |
| `MCLOGS_WORKER_REQUESTS` <br> `worker.requests` | `500` | Max requests per single worker |

There are a few more environment variables that can be set to modify the FrankenPHP/Caddy setup directly:

| Variable | Default | Description |
|----------------------|---------|--------------------------------------------------------------------------------------------------------------------------------------------|
| `SERVER_NAME` | `":80"` | Set the Caddy server name, set this to your domain for [automatic SSL](https://caddyserver.com/docs/automatic-https#hostname-requirements) |
| `FRANKENPHP_WORKERS` | `16` | The number of [FrankenPHP workers](https://frankenphp.dev/docs/worker/) | |


## Development setup
* Install Docker Compose: https://docs.docker.com/compose/install/
* Clone repository: `git clone [URL]`
* `cd mclogs/docker`
* `docker-compose up`
* Open http://localhost in browser and enjoy

## License
mclo.gs is open source software released under the MIT license, see [license](LICENSE).
### Prerequisites
* [Docker](https://www.docker.com/get-started/) and [Docker Compose](https://docs.docker.com/compose/install/)
* [PHP 8.5+](https://www.php.net/downloads)
* [Composer](https://getcomposer.org/download/)

### Installation
```bash
# clone repository
git clone git@github.com:aternosorg/mclogs.git

# install composer dependencies
cd mclogs
composer install

# start development environment
cd dev
docker compose up
```
Open http://localhost in browser and enjoy.
17 changes: 0 additions & 17 deletions api/endpoints/analyse.php

This file was deleted.

18 changes: 0 additions & 18 deletions api/endpoints/insights.php

This file was deleted.

12 changes: 0 additions & 12 deletions api/endpoints/limits.php

This file was deleted.

21 changes: 0 additions & 21 deletions api/endpoints/log.php

This file was deleted.

9 changes: 0 additions & 9 deletions api/endpoints/rate-error.php

This file was deleted.

15 changes: 0 additions & 15 deletions api/endpoints/raw.php

This file was deleted.

Loading