Self-Hosting, Minimalism, Linux, .NET, Philosophy, Psychology, Privacy, Security.

Join us on XMPP! Propaganda Stream

simplifying our image hosting service

Let’s cut out the middle-man

$ fuck FTP

Last time we’ve setup vsftp to handle our image uploads. This foolishness ends now. We’ve already got our SSH Server up and we can easily transfer files through it. Let’s do that, shall we?

apt remove vsftp -y

$ fuck Apache

Apache configs suck. Hello nginx.

apt remove apache2 -y && apt install nginx -y

$ setting up nginx

Let’s also change the domain from to as I’m not going to be using my homeserver anymore.

We’re going to use threaded async IO and sendfile for maximum throughput on potentially big files like binary data, audio and video but not for small things like images and assets (which are mostly css and js text files). There’s some added latency involved when using threaded async IO so its only worth paying that overhead if the file tansfer will usually take more than a couple seconds. We really don’t want to add any additional latency to image requests as that would unnecessarily slow down page loading speed.


server {
    listen 80;
    root /srv/http/;
    index index.html;

    location / {
    	try_files	$uri $uri/ =404;	
    location /bin {
    	sendfile	on;
    	aio		threads;
    	try_files	$uri $uri/ =404;	
    location /videos {
    	sendfile	on;
    	aio		threads;
    	try_files	$uri $uri/ =404;	
    location /audio {
    	sendfile	on;
    	aio		threads;
    	try_files	$uri $uri/ =404;	
    location /assets {
    	sendfile	on;
    	try_files	$uri $uri/ =404;	

Now let’s spin up the service and we’re done!

systemctl enable nginx --now

$ porting ImgUp to bash

if [ -z $filename ]; then 
    filename=$(basename $path)

scp -q $path$filename
echo "/assets/images/$filename" | xclip -sel clip
echo "/assets/images/$filename (added to clipboard)"


imgup /path/to/image.jpg [Optional remote filename]

Much better than the C# clusterfuck with multiple classes.

we did it again! :D

The first iteration brought down complexity and increased performance! Can’t ask for a better outcome considering how little effort this took.

whats left

  • imgup argument parsing
  • make universal script that can upload any kind of file
  • create multiple versions of the image (server sided?)
    • Raw image
    • Resized to Thumbnail Size


I love simplicity and minimalism. I'm an autodidact and taught myself everything I know. I hate the 'educational system' and never did my homework. I have no tolerance for stupid.