1. BlissRADIUS™ installation requirements
-
Operating system: 32 or 64 bit Microsoft Windows® (XP or newer) or Linux (12 years old or newer) .
-
Database backend: PostgreSQL database server version 8 or newer. Server is not required to run on local machine, but it is advisable to be so.
-
Extra programs on shell path:
-
pg_dump program (part of PostgreSQL installation). It is used for automated local backup. If you install PostgreSQL server on local machine, then you have satisfied this requirement.
-
python language interpreter version 2.4 or newer. You need it only if you are migrating database from BlissRADIUS™ version 1 to version 2. Get it here.
-
sqlite3 executable. Only used during migration of database. Get it here.
-
psql program. Part of PostgreSQL installation. Used only during migration.
-
-
Socket bindings: Access to ports on host machine (UDP 1812 - 1813 for RADIUS protocol) as well as TCP ports for web portal and other services (ports above 8000).
2. Setting up PostgreSQL
2.1. Downloading
You have 2 options:
-
One click installer that works on both Windows and Linux.
-
Manual installation, used on Windows if first option doesn’t succeed.
2.2. One click installer
Download latest one click installer from here.
Installer will create superuser postgres, remember password you entered. It might be good idea to use same password as the one for root or Administrator account. Installer will initialize database cluster and add service to system startup, but it will not add PostgreSQL bin folder to the path. You will have to do it by yourself.
![]() |
If installing on Windows Vista / Server 2003, you might get errors during. Read this. If you are still unable to complete installation try manually as described in section below. |
2.3. Adding to the PATH
Example assumes PostgreSQL 9.1 with default values from one click installer.
On Linux edit /root/.bash_profile, replace:
PATH=$PATH:$HOME/bin
with:
PATH=$PATH:$HOME/bin:/opt/PostgreSQL/9.1/bin/
On Windows add to PATH variable by editing System Properties→Advanced→Environment Variables→Path→Edit and adding path:
C:\Program Files\PostgreSQL\9.1\bin
2.4. Manual install on Windows
Download latest binary archive from here.
Unpack it to c:\PostgreSQL and add c:\PostgreSQL\bin folder to system path.
Create Windows user postgres if needed. It must have Log on as service privilege. It must not be member of Administrators group.
We assume you want to store database cluster data into c:\PostgreSQL\data folder and name service PostgreSQL.
Run this as postgres:
mkdir c:\PostgreSQL\data
pg_ctl init -D "c:\PostgreSQL\data" -o "-E utf-8"
![]() |
If there are warnings about missing dll’s or files, check that user postgres have read privilege on c:\PostgreSQL folder. Also, make sure it has full privileges on c:\PostgreSQL\data folder. |
Run this as Administrator (replace with real password of user postgres):
pg_ctl register -N PostgreSQL -D "c:\PostgreSQL\data" -U postgres -P postgress_password -w -S auto
net start PostgreSQL
2.5. Creating database user
Create non privileged PostgreSQL user blissradius. It will be used by BlissRADIUS™ server when connecting to database. Enter twice new password for user blissradius (if BlissRADIUS™ is on the same machine as PostgreSQL then password should default to blissradius too) and then password of database superuser postgres.
./createuser -W -SRDP -U postgres blissradius
2.6. Creating database
Create database blissradius. It must be in UTF-8 encoding and owned by user blissradius. Enter superuser’s password on prompt.
./createdb -W -O blissradius -E utf-8 -U postgres blissradius
3. Setting up BlissRADIUS™
3.1. Installing
Download & unzip BlissRADIUS™ archive. You can store it where you like on your system, but for sake of easier maintenance and following of documentation it is advisable for it to be in /bliss2/current/ folder, or symbolic link with the same name on Linux machines.
Directory structure on Linux would look like:
/bliss2
./blissradius-2.0.0
./blissradius-2.1.0
./current -> ./blissradius-2.1.0
On Windows it is advised to store it on dedicated drive:
D:\bliss2
.\blissradius-2.0.0
.\current
This way upgrade process is simplified by simple adding of new folder and changing symbolic link (or renaming folder to current).
3.2. Configuring & making first run
-
Edit data/bliss.cfg file in BlissRADIUS™ folder to match values you set in previous section.
-
Start bin/bliss[.exe] for the first time. It will inform you of database structure initialization.
-
Open http://localhost:8800 in your browser. Use admin as username and password. If you login, BlissRADIUS™ is up and running.
-
Close console window (or use Ctrl+C to stop running process).
-
Add full path to bin/start[.exe] to system startup. On Windows you can drag it to Startup folder. On Linux, add /bliss2/current/bin/start line to /etc/rc.local file to be executed when machine boot up.
3.3. Migrating database from version 1.x
If you are migrating from BlissRADIUS™ version 1.x to version 2.x you will need to perform this steps so data from existing SQLite database of old server is correctly transfered to PostgreSQL database of new one.
-
Make sure you have installed PostgreSQL server and it is up and running, with logon role blissradius and empty UTF-8 encoded database blissradius.
-
Make sure sqlite3, python and psql (PostgreSQL) executable are on shell path.
-
Upgrade existing BlissRADIUS™ 1.x server to adleast version 1.24
-
Copy bliss.db and archive.db files from data folder of existing 1.x server to shared/migration folder.
-
Open shell in shared/migration folder and execute commands to make SQL dump. Last command will create bliss_dump2.sql file.
> sqlite3 bliss.db
> .read 'export.sql'
> .quit
> python strip.py
-
Then execute commands below to import dump to new database. Last command might take a while depending on dump size. It roughly takes 1 hour per 1Gb. It might vary greatly depending on machine specs.
> psql -f ../sql/postgres-1.sql -U blissradius -q
> psql -f bliss_dump2.sql -U blissradius -q
> psql -f finalize.sql -U blissradius
> psql -f archive_dump.sql -U blissradius -q
-
After import is complete, start BlissRADIUS™ and you are ready to go.
4. BlissRADIUS™ administration
4.1. Starting and stopping server
-
To start service use bin/start[.exe]. It runs bin/bliss[.exe] in background & redirects stdout and stderr output to log files. It will automatically restart process if unexpected crash occurs.
-
To query if server is running use bin/status[.exe]
-
To stop server use bin/stop[.exe]
-
You can use pkill bliss command on Linux or Task Manager on Windows to stop process. It will not corrupt data in any way, but it is not preferred way.
-
Use bin/bliss[.exe] to start process only when you need to check console output or during debug.
![]() |
bin/bliss[.exe] is foreground process. If you log out of shell account (or close console window) it will terminate BlissRADIUS™ server. Do not use this way to run unattended server. Use bin/start[.exe] to run service. |
4.2. Automated local backup
Local backup is created to data/backup folder. It requires pg_dump (comes with PostgreSQL installation) to be on shell path on local machine. Backup time and other parameters are configured in data/bliss.cfg file.
It is highly advisable to store backup copy of whole bliss2/current folder on remote machine. rsync or similar tool is perfect for this job.
4.3. Restoring backup
To restore snapshot you will need to run command below. Replace host name, port, database name to match your server. This command must be run as superuser postgres.
./pg_restore -h localhost -p 5432 -U postgres -d blissradius path_to_backup_file
![]() |
You will need empty database to restore snapshot into. It is advisable to create new database, eg. blissradius2, restore snapshot into it, then edit data/bliss.cfg file so BlissRADIUS™ connects to it instead of old one. |
4.4. Upgrading to newer version
-
Download and unpack newer version of BlissRADIUS™.
-
Stop running server.
-
Copy (or move) all contents of data folder to new version.
-
Rename new version’s folder to current.
-
Start new server.