10 Setting The Server Up
Blender Dumbass ( J.Y. Amihud ) edited this page 2025-07-06 20:06:41 +02:00

This page will get you through the Basic setting up process of BDServer.

Installing ( Cloning Repository )

To install BDServer, go to your terminal and type:

git clone https://codeberg.org/blenderdumbass/BDServer

This will make a folder in the directory you are in called BDServer. Got into that directory.

cd BDServer

Then run it.

python3 run.py

This will show you options of what you can do, like so:


    BDServer Help

--help       - Prints this Help Page.
--run        - Run the server.
--analyse    - Analyse the website.

--set        - Use for changing settings.
--account    - Manage Accounts.

--create     - Start a new article.

--config     - Edit config file directly, bypassing --set.
--folder     - Open the folder of the website's data.

--federation - Federation settings with other BDServers.

--transfer   - Transfers legacy website data to the new format.
--ban        - Ban a cookie from DDosing your website.

To make the server actually server your website, do this:

Setup a port ( say 8080 ):

python3 run.py --set --port 8080

And run it:

python3 run.py --run

Then you can go to http://localhost:8080 from your browser to see the server work.

Setting up your server.

You may want to setup your server's things. Like what domain it thinks it is on. What CSS file to use for a theme. And so on and so forth. For this you may want to run the --set command.

python3 run.py --set

Which will give you the following options.

    BDServer Set Help 

    Set is used for setting up server configurations.

--title    - Set title of the website.
--tagline  - Set tagline of the website.
--domain   - Let the server know the clearnet domain.
--tor      - Let the server know the tor domain.
--email    - Set Email SMTP account for internal automatic messages.
--account  - Set the Main Account, for the footer and stuff.
--port     - Set port where to run the website.
--css      - Set a CSS file.
--css_edit - edit a CSS file.
--favicon  - Set a favicon file.
--add_tab  - Adds a category of articles.
--edit_tab - Edit the config of a category.
--tab_rows - Set in how many rows to draw the tabs.

--editor   - Set editor. Default nano.

--fc_api   - API for software Free Competitors search.

Favicon

For example, let's set the favicon the website's LOGO so to speak.

Let's say that your logo is called logo.png and it is on Desktop.

python3 run.py --set --favicon ~/Desktop/logo.png

This will change the logo of the website to the file you just specified.


Note: It is good to have the logo specifically as PNG, due to some parts of the code assume the file is always PNG.


Title and Tagline

Title and Tagline are the next 2 things under the Favicon on the main page.

Say you want the website to be called "Hello World" and the tagline to say "My new website".

python3 run.py --set --title "Hello World"
python3 run.py --set --tagline "My new website"

Change the CSS file

If you don't want your website to look like mine, you can setup your own custom CSS document, for the browser to render it differently. CSS is a text document describing the theme of the website.

python3 run.py --set --css ~/Desktop/mycssfile.css

Note: The CSS you choose should be compatible with BDServer. The best way to insure it is compatible is by editing default.css that comes with the software. It is setup for easy editing. If you want something crazy that isn't possible by simply editing the CSS file, you may want to look at Plugins.


Other things.

  • --email - setting up an email for things like petition signatures and other things where an automatic email needs to be sent.
  • --domain - telling the server what is the outside domain name is for your website ( like blenderdumbass.org ) which will help the server render proper links to itself.
  • --tor - telling the server what is the .onion link to the server. If added, the server will include a small metadata on pages, telling browsers that support TOR connection that a .onion of the site is available.
  • fc_api - telling the server where to get information about Free Software. If enabled it will search Free Software alternatives for people who are using the search. Relies on a working connection with some Free Competitors instance, even if on localhost.

Custom Icons

BDServer by default uses the icons that come with the repository. ( Those are, by the way, Blender icons, but scaled up a bit ). But you may want to have your own icons to look different that other sites.

You should have a folder like this:

~/.local/share/BDServer/icons

If you put into that folder .png images ( better with 40x40 resolution ), BDServer will try using those images first.

So if you want to change the folder.png icon for example. Make an image that is called folder.png and put into that folder.

Tabs

Your website will host categories of articles. For example: Movie Reviews, Game Reviews, Software Reviews, and so and so forth. Each of them will have a folder on the server dedicated to storing those articles. Internally they are called Tabs.

Let's add a generic "Blog" Tab:

python3 run.py --set --add_tab "Blog"

Then let's edit the tab.

python3 run.py --set --edit_tab "Blog"

This will show you file such as this:

{
    "icon": "folder",
    "title": "Articles"
}

This is a JSON file that is storing the data about how to render this tab. You have following options:

  • title - the text that it will render the tab as in the website itself.
  • icon - the image from icons that it will use for this tab.

Setting up account

Now you are ready to write your first blogpost.

But there is a catch you need to have an account on your own server to do so. You can make yourself an account very simply:

Let's say you want to be @admin on the site

python3 run.py --account --add admin

After you done with setting it up, you can go into the website itself and log in. Clicking on any of the tabs from the main page, will allow you to make new blog posts right from the website's UI.

Accounts could have links in their metadata. Like the link to Mastodon or Email or other social media links. If this account is yours, you may want to tell BDServer to advertise those links in a footer of every page. You can do that by specifically setting this account as "main", so to speak. If your account is admin, you can do it like so:

python3 run.py --set --account admin

Note: Accounts in BDServers have different ranks. Accounts created manually are rank 0 ( the main account set using --set --account is kind of even more main than rank 0 ). If rank 0 invites somebody in to register on the site, that new account will be rank 1. If rank 1 invites somebody it will be rank 2, and so on and so forth. Lower rank number meaning more power. Rank 1 accounts, for example, can moderate rank 2 accounts and so on and so forth.


Multiple Websites

You could notice that absolutely everything BDServer is doing is stored at:

~/.local/share/BDServer

But what if you want to have more than one websites running on the same machine? If everything is the same folder that would not work, right?

Well you can do that with an environment variable PROJECT.

Example:

PROJECT="MySecondProject" python3 run.py --run

Running BDServer like this will make a different, unrelated project folder at ~/.local/share/MySecondProject instead. In which everything related to this website will be stored.


NOTE: Running 2 websites on the same machine will require binding them to different ports on the machine.