Now the LynxChan / PenumbraLynx front end is raw, you can use it as it is, customize it as you want or get a third party front end with all the functionality included like (You), catalog sorting, clipboardimage, a few more themes, rainbow text...
I will show you how to get the same front end as
https://bchan.net and how to customize it.
Simply delete the current front end
sudo rm -r -f /home/bchan/LynxChan/src/fe
get this front end, (keep in mind this front end haven't been tested on the 2.3.x version, it's made for the 2.4.x lynxchan version):
https://gitgud.io/bchan/bchan
and put it at the same location as the other one
cd /home/bchan/LynxChan/src
You can git clone it and rename the folder to "fe"
git clone https://gitgud.io/bchan/bchan.git
To clear cache and apply changes, run this command
lynxchan -cc -r -rfe -nd
Run this as root if you have some EACCES errors with /tmp/unix.socket
learn more about this here:
https://gitgud.io/LynxChan/LynxChan/-/tree/master/src/be
Now let's check a few settings in Lynxchan GUI, go to yoursite.ltd/globalSettings.js
Set this:
sudo chmod 676 /home/bchan/LynxChan/src/be/settings/general.json
connect with the root account you made earlier
set:
>Tor Port2: 9090 (we will come back to this latter, just set a Tor port and remember it)
>Maximum size for requests (MB): to something like 50mb
>Extension used for thumbnails (Will make all gif thumbs not animate): png
>Character limit for messages: 20000
>Maximum size for uploaded files (MB): 50mb
>Allowed MIME types1: bunch of MIME type you can include
image/png,image/jpeg,image/gif,image/bmp,video/webm,audio/mpeg,video/mp4,video/ogg,audio/ogg,audio/webm,application/pdf,image/webp,application/x-7z-compressed,application/zip,audio/webm,audio/x-wav,application/x-tar,application/x-rar-compressed,font/ttf,image/tiff,image/svg+xml,font/otf,application/vnd.oasis.opendocument.text,application/vnd.oasis.opendocument.spreadsheet,application/json,image/x-icon,text/html,application/epub+zip,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/msword,text/css,text/plain,application/octet-stream,video/x-ms-wmv
for webp images compatibility
sudo apt-get install webp
>Total limit of uploaded files on the site 30000
>Disable flood checks (to test your site after)
>Disable check on spammer IPs this (to allow VPNs and proxies to post)
>Captcha security level: easy
>Tor posting permission level: Allowed to post normally
>Bypass mode: this will require a block bypass to post, disable right now but activate in case of flood and for easier moderation
>Amount of latest posts to show on front-page:10
>Amount of latest images to show on front-page:4
>Amount of threads on the multi-board:10
>Amount of boards to be picked as top boards: 1
>Maximum amount of threads per board: 1000
>Maximum number of banners in boards: 1000
>Maximum size for banners (KB): 500
>Amount of days before removing IPs from posts (any value below 1 or null means to never remove): 1
>Maximum dimension for thumbnails, for both height and width: 200
>Overboard uri: overboard
>Site title: Title
>Addons1,2(They will be loaded in the order they appear in this list):
rainbow,CatalogSort,orange,sage,webring,fortune,jewtext
(we will come back to this)
>Use ffmpeg to generate animated gif thumbnails (requires ffmpeg installed)
>Allow global staff to moderate boards
>Make boards use global banners
>Generate thumbnails from media files (requires ffmpeg installed)
>Display total post count and total unique IPs on front-page
>Strip exif data from files
Save, if you get this message: Error: EACCES: permission denied
sudo chmod 676 /home/bchan/LynxChan/src/be/settings/general.json
Now let's add the add-ons.
You can get the addons here and clone them in LynxChan/src/be/addons
cd /home/bchan/LynxChan/src/be/addons
git clone https://gitgud.io/bchan/addons.git
This will put the addons folder in the addons folder, don't forget to fix that.
You need to change a few things, in addons/webring/config.js put your website then change permission for this to work.
find /home/bchan/LynxChan/src/be/addons/webring -type d -exec chmod 0777 {} \;
find /home/bchan/LynxChan/src/be/addons/webring -type f -exec chmod 0777 {} \;
To be visible in others webring nodes I think one of them have to manually add you first.
in the CatalogSort add-on, change the path to where is installed your LynxChan.
You can also change the fortunes messages.
Now just reboot and check there is no errors with the addons:
sudo reboot
sudo lynxchan -cc -r -rfe -nd
Now go in
https://yoursite/account.js
and create a board
Under Owned Boards click your board URI, you can manage your board here
Set the parameters you want, flags, ids...
Allow use of code tags
To change the logo change logo.png in the static folder by your image and for the animated logo go in /static/pages/logo.html and include your logo as base64.
You can do this here:
https://www.base64-image.de/
To personalize the front end more in depth play with the CSS, to change text in Bulk use some text editor like Notepad++ or Sublime Text 3 (like changing Bchan to MYchan quickly).
Now you'll need an onion address.
here is some tutorial:
https://chown.io/guide-host-your-own-onion-site-tor-nginx/
http://archive.vn/W6muG
echo -e "deb https://deb.torproject.org/torproject.org bionic main\ndeb-src https://deb.torproject.org/torproject.org bionic main" > /etc/apt/sources.list.d/tor.list
wget -qO- https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc | gpg --import
gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | apt-key add
apt update && apt -y upgrade && apt-get -y install nginx tor
systemctl enable nginx && systemctl enable tor && systemctl start tor.service
Open /etc/nginx/nginx.conf - turn off our server_tokens. Change hash_bucket_size to allow for a lengthy address. I tend to use nano:
nano /etc/nginx/nginx.conf
(don't froget to remove the #)
Within http {
server_names_hash_bucket_size 125;
server_tokens off;
}
Exit and Save: CTRL + x + y | ENTER
Do test for any errors, reload nginx.
nginx -t
nginx -s reload
Proceed to configure a Hidden Service within Tor, using your editor open /etc/tor/torrc
nano /etc/tor/torrc
Find and replace, remove the # like with the nginx config file.
HiddenServiceDir /var/lib/tor/nginx/
HiddenServicePort 80 127.0.0.1:9090
(remember the Tor port we set earlier in globalSettings.js)
Exit and Save: CTRL + x + y | ENTER
Reload Tor, to generate your .onion address.
(don't change "hostname" here)
service tor reload
cat /var/lib/tor/nginx/hostname
You may find; cat: /var/lib/tor/nginx/hostname: No such file or directory
Okay, speedy fingers! Wait a couple of seconds for Tor to load.
cat /var/lib/tor/nginx/hostname
Onion: vvhff6npqpyd3xsv5mfjuz64litpngve4kg7wlrth2ikugvt7vsfwhad.onion
Go check if you can access your generated address from the Tor browser.
Now let's generate a Vanity onion address with 5 characters, should take 1 minute, some tuto:
https://opensource.com/article/19/8/how-create-vanity-tor-onion-address
http://archive.vn/10WtN
You'll need mkp224o:
git clone https://github.com/cathugger/mkp224o.git
cd mkp224o
sudo apt install gcc libsodium-dev make autoconf
./autogen.sh
./configure
make
Type ./mkp224o -h to view Help
Type something like that to generate your address:
./mkp224o bchan -t 4 -v -n 4 -d ~/Extracts
ctrl+c to stop process.
Keep in mind that more than 5 characters will take a long time.
Now go in the folder where the address have been generated, something like /path/to/Extracts
Copy the three files, hostname, public and secret key
then replace the /var/lib/tor/nginx files with the one you just generated
sudo service tor reload
nginx -t
nginx -s reload
Now check that everything is working:
bchan46hwn7fxf67hav7khj3ca7v4avg7yhieahqyocgnaolazgi6tqd.onion
Setting up your sites favicon:
mongofiles -h localhost -d lynxchan -l /home/bchan/LynxChan/src/fe/static/favicon.ico put /favicon.ico
If you want to change it again delete the old one (learn MongoDB)
Everything should be working fine now.