Skip to main content

NGINX

Chances are you will run your MicroBin server behind some kind of reverse-proxy, such as NGINX. The below example should work well, just get your own SSL certificates, update the server name and check that the port is correct and you're good to go!

server {
# I have HTTPS enabled using certbot - you can use HTTP of course if you want!
listen 443 ssl; # managed by Certbot

server_name microbin.myserver.com;

location / {
# Make sure to change the port if you are not running MicroBin at 8080!
proxy_pass http://127.0.0.1:8080$request_uri;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

# Limit content size - I have 1GB because my MicroBin server is private, no one else will use it. Note that you can also limit the file size in MicroBin's configuration.
client_max_body_size 1024M;

ssl_certificate /etc/letsencrypt/live/microbin.myserver.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/microbin.myserver.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}