How to start Structr with an empty database

Search
Feedback

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 seed.zip out of the way or rename it to anything other than seed.zip.
  • 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:<my-superadmin-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:<my-superadmin-password> http://localhost:8082/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 = <my-superadmin-password>

Graph-Browser

About this article
Last change 2017-06-08
Topics ServerStructr 2.0