How to start Structr with an empty database


To start Structr with a completely empty database, the following steps have to be executed.

  • Set superadmin password in structr.conf
  • Delete db/ and files/ directories. Note: You should backup your data before.
  • Move the out of the way
  • Start Structr
  • Create an initial user (username and password is admin here), using the superadmin credentials and set e.g. using curl:

    curl -si -HX-User:superadmin -HX-Password:password http://localhost:8082/structr/rest/User -d '
        "name": "admin",
        "password": "admin",
        "isAdmin": true
  • Create a ShadowDocument (necessary in order to use shared components)

    curl -si -HX-User:superadmin -HX-Password:sooper http://localhost:8888/structr/rest/ShadowDocument -d '
        "name": "__ShadowDocument__",
        "hidden": "true",
        "visibleToAuthenticatedUsers": true

Note: The following switches have to be configured in structr.conf for the example to work as is.

application.http.port = 8082
superuser.username = superadmin
superuser.password = password


About this article
Last change 2017-02-24
Topics ServerStructr 2.0