This page describes how to set up Journyx to use an external PostgreSQL database. This covers Windows server for Journyx 8.0 and higher.


Journyx provides an "internal" copy of the open-source PostgreSQL database. The Internal Database does not require any special setup instructions. However, if you want Journyx to use your own externally controlled PostgreSQL server, you should follow the instructions on this page.


External PostgreSQL instructions


Follow these steps to install to an external PostgreSQL instance.


1. Make sure your PostgreSQL server is version 8.3 or later.
2. Make sure you have read the general instructions here.
3. Create a database for Journyx with the createdb -E UTF8 command. Consult the PostgreSQL documentation for more information on creating databases and users. For Journyx 8.0 and higher the encoding should always be UTF8. You set the encoding with the -E UTF8 argument to createdb. The locale, which influences things like collation (sort order), will normally be determined by the environment's locale settings, but you can override the locale with the -l locale option.
4. Create a "role" (user) in PostgreSQL for the Journyx account. Make sure the role has permissions to access the database you created above.
5. Make sure the plpgsql language is installed in the database. Run this command:


createlang plpgsql


See your PostgreSQL documentation on createlang for further information on createlang.
6. Follow the Windows instructions below.


Windows-only instructions:


1. Install the product by double-clicking on the installer and following the prompts. Even if you install the "internal" copy of PostgreSQL (which is included by default) you can still use an external PostgreSQL connection.
2. The installer will prompt you to reboot the system. Go ahead and reboot and when you log in it will run a program called "Setup Web Server and Database." This will guide you through installing to a web server and database connection.
3. After installing to the web server, it will ask you whether you want the Internal PostgreSQL connection or an external database system. Select "Connect to an external database system" then choose PostgreSQL.
4. Put in all the required information: Host, Port (default is 5432), Database Name, Username and Password, then click OK. If you made a mistake in the info such as a bad password, chose the option to "Try a new connection" then chose PostgreSQL again and correct the information.
5. When that finishes, you can run a "restoredb" command from the command line to populate your Journyx data from a .jx backup file.