{"result":{"depiction_url":null,"edges":{"refers":{"objects":[{"created":"2026-10-07T11:13:11Z","object_id":{"id":1526,"is_a":["text","documentation","developerguide"],"name":"doc_developerguide_getting_started","title":{"_type":"trans","tr":{"en":"Set up a local development environment"}},"uri":"https:\/\/zotonic.com\/id\/1526"},"seq":1000000},{"created":"2026-10-07T11:13:11Z","object_id":{"id":2913,"is_a":["text","documentation","developerguide"],"name":"developer_build_start","title":{"_type":"trans","tr":{"en":"Build and start Zotonic"}},"uri":"https:\/\/zotonic.com\/id\/2913"},"seq":1000000},{"created":"2026-10-07T11:13:11Z","object_id":{"id":2914,"is_a":["text","documentation","developerguide"],"name":"developer_create_site","title":{"_type":"trans","tr":{"en":"Create your first site"}},"uri":"https:\/\/zotonic.com\/id\/2914"},"seq":1000000},{"created":"2026-10-07T11:13:11Z","object_id":{"id":3045,"is_a":["text","documentation","developerguide"],"name":"developer_local_postgresql","title":{"_type":"trans","tr":{"en":"Prepare local PostgreSQL"}},"uri":"https:\/\/zotonic.com\/id\/3045"},"seq":1000000}],"predicate":{"id":2409,"is_a":["meta","predicate"],"name":"refers","title":{"_type":"trans","tr":{"en":"Refers"}},"uri":"https:\/\/zotonic.com\/id\/refers"}},"relation":{"objects":[{"created":"2026-10-07T11:13:29Z","object_id":{"id":3045,"is_a":["text","documentation","developerguide"],"name":"developer_local_postgresql","title":{"_type":"trans","tr":{"en":"Prepare local PostgreSQL"}},"uri":"https:\/\/zotonic.com\/id\/3045"},"seq":1},{"created":"2026-10-07T11:13:29Z","object_id":{"id":2913,"is_a":["text","documentation","developerguide"],"name":"developer_build_start","title":{"_type":"trans","tr":{"en":"Build and start Zotonic"}},"uri":"https:\/\/zotonic.com\/id\/2913"},"seq":2}],"predicate":{"id":303,"is_a":["meta","predicate"],"name":"relation","title":{"_type":"trans","tr":{"nl":"Relatie","en":"Relation"}},"uri":"http:\/\/purl.org\/dc\/terms\/relation"}},"subject":{"objects":[{"created":"2026-10-07T11:13:29Z","object_id":{"id":2554,"is_a":["categorization","keyword","keyword_information_type"],"name":"zotonic_topic_how_to_guide","title":"How-to guide","uri":"https:\/\/zotonic.com\/id\/2554"},"seq":1},{"created":"2026-10-07T11:13:29Z","object_id":{"id":2564,"is_a":["categorization","keyword","keyword_audience"],"name":"zotonic_topic_backend_developer","title":"Backend developer","uri":"https:\/\/zotonic.com\/id\/2564"},"seq":2},{"created":"2026-10-07T11:13:29Z","object_id":{"id":2605,"is_a":["categorization","keyword","keyword_domain"],"name":"zotonic_topic_site_management","title":"Site management","uri":"https:\/\/zotonic.com\/id\/2605"},"seq":3},{"created":"2026-10-07T11:13:29Z","object_id":{"id":2603,"is_a":["categorization","keyword","keyword_domain"],"name":"zotonic_topic_configuration","title":"Configuration","uri":"https:\/\/zotonic.com\/id\/2603"},"seq":4},{"created":"2026-10-07T11:13:29Z","object_id":{"id":2670,"is_a":["categorization","keyword","keyword_technology"],"name":"zotonic_topic_erlang_otp","title":"Erlang\/OTP","uri":"https:\/\/zotonic.com\/id\/2670"},"seq":5},{"created":"2026-10-07T11:13:29Z","object_id":{"id":2671,"is_a":["categorization","keyword","keyword_technology"],"name":"zotonic_topic_postgresql","title":"PostgreSQL","uri":"https:\/\/zotonic.com\/id\/2671"},"seq":6}],"predicate":{"id":308,"is_a":["meta","predicate"],"name":"subject","title":{"_type":"trans","tr":{"en":"Keyword"}},"uri":"http:\/\/purl.org\/dc\/elements\/1.1\/subject"}}},"id":3046,"is_a":["text","documentation","developerguide"],"links":[{"rel":"self","target":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/3046"},{"rel":"hub","target":"https:\/\/zotonic.com\/.zotonic\/websub"}],"medium":null,"medium_url":null,"name":"developer_install_nix","page_url":{"en":"https:\/\/zotonic.com\/docs\/3046\/use-the-nix-development-shell","x-default":"https:\/\/zotonic.com\/docs\/3046\/use-the-nix-development-shell"},"preview_url":null,"resource":{"body":{"_type":"trans","tr":{"en":"<p>Use this route if you already work with Nix. Start from the checkout in <a href=\"\/id\/1526\">Set up a local development environment<\/a>. Install Nix using its <a href=\"https:\/\/nixos.org\/download\/\">official installation instructions<\/a> if needed.<\/p>\n<h2>1. Enter the supplied shell<\/h2>\n<p>From the repository root:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-sh\">nix-shell\n<\/code><\/pre>\n<p>Wait for dependencies to finish downloading or building. The checked-in <code>shell.nix<\/code> selects <code>erlang_28<\/code> and includes PostgreSQL tools and the platform&#39;s file watcher. Keep this shell open for all build and Zotonic commands.<\/p>\n<p>Check the runtime:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-sh\">erl -noshell -eval &#39;io:format(&quot;~s~n&quot;, [erlang:system_info(otp_release)]), halt().&#39;\n<\/code><\/pre>\n<p>Expect <code>28<\/code>.<\/p>\n<h2>2. Start a local database<\/h2>\n<p>The shell supplies PostgreSQL programs; it does not start a database server. If you already have a local server, follow <a href=\"\/id\/3045\">Prepare local PostgreSQL<\/a>.<\/p>\n<p>Otherwise, create a new development cluster in the checkout, as your normal user:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-sh\">initdb -D .local-postgres --auth-local=peer --auth-host=scram-sha-256\npg_ctl -D .local-postgres -l .local-postgres\/server.log -o &quot;-h localhost -p 5432 -k $(pwd)\/.local-postgres&quot; start\n<\/code><\/pre>\n<p>Add <code>.local-postgres\/<\/code> to <code>.git\/info\/exclude<\/code> so database files stay out of Git. Use an empty directory for <code>initdb<\/code>. If port 5432 is already occupied, use the existing local server or configure a different port throughout.<\/p>\n<p>Local peer authentication uses your operating-system username. Open <code>psql -h &quot;$(pwd)\/.local-postgres&quot; postgres<\/code> as that same user and follow the SQL in <a href=\"\/id\/3045\">Prepare local PostgreSQL<\/a>.<\/p>\n<h2>3. Build and try a site<\/h2>\n<p>Follow <a href=\"\/id\/2913\">Build and start Zotonic<\/a> and <a href=\"\/id\/2914\">Create your first site<\/a> inside the Nix shell. If you open another terminal for Zotonic commands, enter <code>nix-shell<\/code> there too.<\/p>\n<p>When finished, stop Zotonic with <code>bin\/zotonic stop<\/code>. If you started the cluster above, stop it with <code>pg_ctl -D .local-postgres stop<\/code> before leaving the shell. Keep the directory to reuse its data next time.<\/p>"}},"category_id":{"id":317,"is_a":["meta","category"],"name":"developerguide","title":"Developer guide","uri":"https:\/\/zotonic.com\/id\/developerguide"},"content_group_id":{"id":339,"is_a":["meta","content_group"],"name":"default_content_group","title":{"_type":"trans","tr":{"en":"Default Content Group"}},"uri":"https:\/\/zotonic.com\/id\/default_content_group"},"created":"2026-10-07T11:12:58Z","creator_id":{"id":1,"is_a":["person"],"name":"administrator","title":"Site Administrator","uri":"https:\/\/zotonic.com\/id\/1"},"doc_editorial_bundle":true,"doc_editorial_edges":{"relation":[2913,3045],"subject":[2554,2564,2603,2605,2670,2671]},"is_authoritative":true,"is_dependent":false,"is_featured":false,"is_protected":false,"is_published":true,"is_unfindable":false,"language":["en"],"modified":"2026-10-07T11:13:37Z","modifier_id":{"id":1,"is_a":["person"],"name":"administrator","title":"Site Administrator","uri":"https:\/\/zotonic.com\/id\/1"},"name":"developer_install_nix","pivot_geocode":null,"pivot_location_lat":null,"pivot_location_lng":null,"privacy":0,"publication_end":"9999-06-01T00:00:00Z","publication_start":"2026-10-07T11:12:58Z","slug":"use-the-nix-development-shell","summary":{"_type":"trans","tr":{"en":"Enter the supplied OTP 28 development shell, prepare PostgreSQL, and build."}},"title":{"_type":"trans","tr":{"en":"Use the Nix development shell"}},"title_slug":{"_type":"trans","tr":{"en":"use-the-nix-development-shell"}},"tz":"UTC","uri":null,"version":24,"visible_for":0},"uri":"https:\/\/zotonic.com\/id\/3046","uri_template":"https:\/\/zotonic.com\/id\/:id","websub":{"hub":"https:\/\/zotonic.com\/.zotonic\/websub","topic":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/3046"}},"status":"ok"}