User Tools

Site Tools


This is an old revision of the document!

Piratebox with an imageboard

A lot people requesting an board installed on the piratebox-router. I reused my experiences from the lighttpd conecpt an created severall scripts for installing an imageboard on it.

Currently, it is developed on a debian system. For using it on a router, you may have to change a few things (I don't have a Buffalo for testing :-( ). These days I actually found the following things, I couldn't figure out completly

  1. other UserID for lighttpd than used on debian.
  2. Differences in the lighttpd config.

It's based on the Kareha Board.


You need the following packages installed on your system:

  • Perl
  • lighttpd ( remove it from default runlevel i.e. # update-rc.d lighttpd disable default )
  • hostapn ( remove it from default runlevel )
  • dnsmasq ( remove it from default runlevel )

Python not needed anymore!


You have to do the following steps for installing it on your laptop:

  • Download a this package: piratebox-imageboard-v02.tar.gz and unzip it in /tmp or /root
    tar xzf piratebox-imageboard-v02.tar.gz
  • Copy over the piratebox folder into /opt/ (as root)
     # sudo mkdir /opt 
          # sudo cp -rv piratebox /opt 
  • Create a Symlink for init.d
     # sudo ln -s /opt/piratebox/init.d/piratebox 
  • (Optional) Add piratebox to you runlevel
    sudo  update-rc.d piratebox defaults
  • Create a link from your share-device to /opt/piratebox/share
     # sudo ln -s /mnt/usbstick /opt/piratebox/share
  • Define your personall options in
    # /opt/piratebox/conf/piratebox.conf        # Start which services, IPs etc
    # /opt/piratebox/conf/hostapd.conf       # Some stuff about beeing an APN 
  • Now please mount your usb-stick, share drive .. If you an USB-Stick with FAT32, you have to change /etc/fstab and add the following line:
    </dev/usbdrive> /mnt/share vfat rw,noatime,user,umask=0 0 0

    If you use the package on a router, you can use the following mount command

    mount -o rw,noatime,umask=0  </dev/usbdrive> /mnt/share 
  • Run the follow script
    # /opt/piratebox/bin/ /opt/piratebox/conf/piratebox.conf part2    
  • If you want to install kareha, please do the following steps:
    • Download the Kareha imageboard from this Kareha_3.1.4
    • Unzip it and copy the content into /opt/piratebox/share/board
    • Then you can run
       # /opt/piratebox/bin/ /opt/piratebox/conf/piratebox.conf imageboard
    • This step installs a basic configuration for the board…
    • Edit /opt/piratebox/share/board/ and change ADMIN_PASS and SECRET

The Configuration

I created

  • /opt/piratebox/bin - Binarys and Scripts
  • /opt/piratebox/conf - Piratebox related configs (seperated from the normal system-configs!)
  • /opt/piratebox/share - Mountpoint (with the first start of piratebox, the correct permissions will be set)
  • /opt/piratebox/share/unsorted - Unsorted upload folder
  • /opt/piratebox/share/board - imageboard location
  • /opt/piratebox/share/tmp - Temp Upload-folder for lighttpd
  • /opt/piratebox/init.d - the init-script (later more?)
  • /opt/piratebox/www - Webfolder with cgi-scripts and static html pages
  • /opt/piratebox/tmp - Folder with the error-log

Basic board configuration

I'm publishing a basic kareha configuration with this package. I predefined the following points:

  • Title
  • Path to image
  • Title-Text
  • Path to favicon
  • Limitation for uploads is 10MB
  • Unknow Filetypes are possible to upload with renaming into .unknown
  • Disable reconvert of images to smaller ones (router don't have much power)
  • Enabled severall filetypes

Needed Perl Packages for routers

For using this package on a router, you need the following perl packages:

  • perl
  • perlbase-base
  • perlbase-bytes
  • perlbase-cgi
  • perlbase-config
  • perlbase-data
  • perlbase-db-file
  • perlbase-digest
  • perlbase-encode
  • perlbase-encoding
  • perlbase-essential
  • perlbase-fcntl
  • perlbase-file
  • perlbase-gdbm-file
  • perlbase-integer
  • perlbase-socket
  • perlbase-unicode
  • perlbase-utf8
  • perlbase-xsloader

and the following system packages:

  • dnsmasq
  • hostadp
  • lighttpd
  • lighttpd-mod-accesslog (only needed for debugging issues)
  • lighttpd-mod-cgi
  • lighttpd-mod-compress
  • lighttpd-mod-redirect
  • lighttpd-mod-rewrite

And NO Python!

lighttpd_imageboard.1449697650.txt.gz · Last modified: 2015/12/09 22:47 by matthias