all repos — weimar @ master

Unnamed repository; edit this file 'description' to name the repository.

30c984bb
feat: dynamic tab titles based on route

Uses /state +  in layout to set document.title per route
(browse, upload, settings, login, image/#id). Also updates title in
image viewer overlay when opening/closing/navigating between images.
Maxwell Jensen maxwelljensen@posteo.net
Thu, 14 May 2026 18:09:14 +0200
9b2b569d
feat: add gem system — like/react with diamond button, sort and filter

Adds image_gems table (migration 10), ToggleGem/GetUserGemStatus queries,
gem_count column on images, HandleToggleGem API, and frontend gem button
centered at bottom of viewer. Browse page has GEMS↓ sort and GEMMED filter.
Maxwell Jensen maxwelljensen@posteo.net
Thu, 14 May 2026 17:59:00 +0200
453d1fa3
feat: probe video dimensions and duration, show badge on thumbnails

Adds GetVideoDimensions via ffprobe, stores duration in DB (migration 9),
fixes 0x0 display for existing videos by extending rescan-innate to
backfill width/height/duration. Shows a play-icon + duration badge
on video thumbnail cards.
Maxwell Jensen maxwelljensen@posteo.net
Thu, 14 May 2026 17:31:08 +0200

weimar

A single-binary media repository for your home server. Share memes, screenshots, and short videos with your group without uploading to someone else’s cloud. Self-host on any Linux machine: all you need is the binary and a place to store files.

weimar is inspired by Chevereto but stripped down to the essentials: upload media, tag it, browse a gallery, and share a direct link.

What it looks like

The web interface is a modern single-page app with a full-screen image viewer, keyboard navigation, and tag-based discovery. Upload from your phone’s browser, browse on your laptop, download originals from anywhere. The design is clean and bold — Swiss typography with red accents.

What you get

The core loop is dead simple. Register an account (or have an admin make one for you), upload files through the web form with whatever tags make sense, and they appear in the gallery. Click any thumbnail to open the full image in an overlay viewer: arrow keys to browse, Esc to close, click outside to dismiss. The URL updates to a shareable link (/browse?image=<id>) that you can send to anyone — even people without an account, because browsing is public by default.

Tags are how you find things later. Type a few words when uploading and the autocomplete will suggest tags other people have used. Filter the gallery by clicking tags or adding ?tag=funny to the URL. If you’re the uploader, you can edit tags after the fact: a text field with the same autocomplete and ADD and REMOVE buttons appears below the tag display in the viewer.

Where data lives on disk

Everything lives in two directories you control: one for the SQLite database (user accounts, sessions, metadata) and one for the image files. Files are stored in a hash-partitioned folder structure (three levels of two-character subdirectories) so no single folder ever gets crowded. The config file points to these locations and you can put them anywhere.

How to install

The simplest path is to download a pre-built binary from the releases page. There are builds for Linux and macOS, both amd64 and arm64. Put the binary somewhere in your PATH like /usr/local/bin/weimar, make it executable with chmod +x, and you’re done.

If you want to build from source, you’ll need Go and Bun. Run make build and the binary lands in bin/weimar.

How to configure

Create a file called weimar.toml in the same directory you run the server from. This is the only required step. Everything has sensible defaults.

[server]
host = "0.0.0.0"
port = 8080

[database]
path = "./data/weimar.db"

[storage]
path = "./data/images"

[upload]
max_size_mb = 50

[auth]
allow_registration = true

If you’re putting weimar behind a TLS-terminating reverse proxy like Caddy or nginx (which you should if facing the Internet), add this:

[server]
behind_proxy = true

This enables the Secure flag on session cookies so your browser doesn’t refuse to send them over the HTTPS connection to the proxy. The security headers (X-Content-Type-Options: nosniff, X-Frame-Options: DENY, Referrer-Policy: same-origin) are always set regardless.

You can also require authentication to browse the gallery:

[auth]
require_auth_for_browse = true

If you don’t want to bother with a config file at all, you can set every option through environment variables prefixed with WEIMAR_. For example, WEIMAR_SERVER_PORT=9090 weimar serve overrides the default port.

How to run

The first time you start the server, create an admin account with --admin-email and --admin-password:

weimar serve --config weimar.toml --admin-email you@example.com --admin-password s3cur3

This flags only work on the very first run when no users exist yet. After that, admin accounts can be managed through the CLI or by other admins.

Once the server is running, open http://your-server-ip:8080 in a browser.

Running as a systemd service

For a proper home-server setup you’ll want weimar to start on boot and stay running.

[Unit]
Description=weimar media repository
After=network.target

[Service]
Type=simple
User=weimar
Group=weimar
WorkingDirectory=/home/weimar
ExecStart=/usr/local/bin/weimar serve
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target

Create a dedicated weimar system user, place the config and data directories under its home folder, enable the service with systemctl enable weimar, and start it with systemctl start weimar.

Admin commands

User management happens on the command line, not through the web interface.

weimar users list
weimar users create newuser password123
weimar users create adminuser str0ngp4ss --admin
weimar users delete bob
weimar users password-reset alice
weimar image delete 42

Every command accepts --config or WEIMAR_CONFIG to point at your config file.

What about video?

weimar handles short videos just fine. It stores them, streams them, and generates thumbnails. Thumbnails require ffmpeg on the server’s PATH. If ffmpeg isn’t available, videos still play in the browser; they just show a placeholder instead of a thumbnail in the gallery.

Things weimar doesn’t do

This is intentionally a simple tool. There’s no full-text search beyond tags, no albums or collections, no user profiles, no comment threads, no federation with other servers, no Redis or caching layer, and no Docker image. The database is a single SQLite file with one writer at a time: fine for a small group, probably not ideal for hundreds of concurrent users.

clone
git clone https://maxwelljensen.eu/weimar.git