To be able to create a new database, your user must be a PostgreSQL superuser. The following command creates a PostgreSQL superuser for the current Unix user:

$ sudo createuser --superuser $(whoami)

To create a new database, use the createdb command. Let's create a demo database:

$ createdb demo

To initialize this database with the Odoo data schema, we should run Odoo on the empty database using the -d option:

$ ~/odoo-dev/odoo/odoo-bin -d demo

This will take a couple of minutes to initialize a demo database, and it will end with an INFO log message, Modules loaded.

By default, this will initialize the database with demonstration data, which is often useful for development databases. To initialize a database without demonstration data, add the --without-demo-data=all option to the command.

Now open http://<server-name>:8069 with your browser to be presented with the login screen. If you don't know your server name, type the hostname command in the terminal in order to find it or the ifconfig command to find the IP address.

If you are hosting Odoo in a virtual machine, you might need to set some network configurations to be able to access it from your host system. The simplest solution is to change the virtual machine network type from NAT to Bridged. With this, instead of sharing the host IP address, the guest virtual machine will have its own IP address. It's also possible to use NAT, but that requires you to configure port forwarding so your system knows that some ports, such as 8069, should be handled by the virtual machine. In case you're having trouble, hopefully these details will help you find relevant information in the documentation for your chosen virtualization software.

The default administrator account is admin with its password admin. Upon login, you are presented with the Apps menu, displaying the available applications:

Initializing a new Odoo database

Whenever you want to stop the Odoo server instance and return to the command line, press Ctrl + in the bash prompt. Pressing the up arrow key will bring you the previous shell command, so it's a quick way to start Odoo again with the same options. The Ctrl + C keys followed by the up arrow key and Enter is a frequently used combination to restart the Odoo server during development.