Skip to main content

Alternative

Installation methods not actively supported/maintained by the developers.

From AUR

Install microbin package from AUR on any Arch-based Linux distribution and start/enable microbin systemd service. Systemd will start server on 127.0.0.1:8080 with almost all features enabled, but this can be changed in /etc/microbin.conf.

Building MicroBin from Source

Simply clone the repository, build it with cargo build --release and run the microbin executable in the created target/release/ directory. It will start listening on 0.0.0.0:8080. You can change the port or bind address with CL arguments -p (--port) or -b (--bind) respectively .

git clone https://github.com/szabodanika/microbin.git cd microbin cargo build --release ./target/release/microbin -p 80

Caddy configuration

An example of running MicroBin behind the reverse proxy caddy on the path /paste (using systemd)

microbin.service

[Unit]
Description=Micobin Paste

[Service]
Type=simple
User=microbin
# Path to your binary
ExecStart=/home/microbin/microbin/target/release/microbin
# Set your desired working directory, eg where microbin places its data
WorkingDirectory=/home/pi/bin/micro

# bind to localhost, as its exposed via Caddy
Environment=MICROBIN_BIND=127.0.0.1
# bind to a unused port
Environment=MICROBIN_PORT=31333
# All your other config (change and add as needed)
Environment=MICROBIN_EDITABLE=true
Environment=MICROBIN_HIGHLIGHTSYNTAX=true
Environment=MICROBIN_THREADS=2
Environment=MICROBIN_FOOTER_TEXT="Bin the bytes"
# Set your **public** url. Eg the one you will later use to access microbin
# Ensure it either starts with http(s):// or with a /
Environment=MICROBIN_PUBLIC_PATH="http://100.127.233.32/paste"

[Install]
WantedBy=multi-user.target

Caddyfile

example.com {
# Your normal http root
root * /var/www/html
file_server

# Route all requests to past
handle_path /paste/* {
reverse_proxy http://127.0.0.1:31333
}
}