# Session disconnects on web page refresh and not generating form links

**URL:** <https://forum.getodk.org/t/session-disconnects-on-web-page-refresh-and-not-generating-form-links/41389>\
**Category:** Development\
**Tags:** odk-central\
**Created:** [May 2, 2023, 10:23am UTC](https://forum.getodk.org/t/session-disconnects-on-web-page-refresh-and-not-generating-form-links/41389 "2023-05-02T10:23:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ono-T1m](https://getodk.b-cdn.net/letter_avatar_proxy/v4/letter/o/6bbea6/32.png) [@Ono-T1m](https://forum.getodk.org/u/Ono-T1m)\
**Post date:** [May 2, 2023, 10:23am UTC](https://forum.getodk.org/t/session-disconnects-on-web-page-refresh-and-not-generating-form-links/41389/1 "2023-05-02T10:23:29Z")

</div>

running a dev env using the testing (npm run dev) can access the login page and connect with the admin created  
when i refresh the webpage it logs out, and the link to share an uploaded form (from the builder tool) doesn't generate.  
does anyone know where the issue is or this is normal behaviour when running dev?  
ubuntu 20vm postgresql14 node16

---

<div class="post-metadata">

**Author:** ![Matthew\_White](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/matthew_white/32/1654_2.png) [@Matthew\_White](https://forum.getodk.org/u/Matthew_White)\
**Post date:** [May 2, 2023, 7:26pm UTC](https://forum.getodk.org/t/session-disconnects-on-web-page-refresh-and-not-generating-form-links/41389/2 "2023-05-02T19:26:15Z")

</div>

Hi @Ono-T1m! It sounds like you're trying to get things set up for local development.

> [@Ono-T1m](#):
>
> when i refresh the webpage it logs out,

Do you have cookies enabled in your browser? Also, are you using the development nginx config? The development config makes it possible for the frontend to use the session cookie even though localhost is not served over HTTPS. Note that the development nginx config is intended only for local development, not deploying to a server.

> [@Ono-T1m](#):
>
> the link to share an uploaded form (from the builder tool) doesn't generate.

You need to be running Enketo to generate Web Form links. See [these instructions](https://github.com/getodk/central-frontend/blob/master/docs/enketo.md) for local development.

---

<div class="post-metadata">

**Author:** ![Ono-T1m](https://getodk.b-cdn.net/letter_avatar_proxy/v4/letter/o/6bbea6/32.png) [@Ono-T1m](https://forum.getodk.org/u/Ono-T1m)\
**Post date:** [May 3, 2023, 12:38pm UTC](https://forum.getodk.org/t/session-disconnects-on-web-page-refresh-and-not-generating-form-links/41389/3 "2023-05-03T12:38:00Z")

</div>

thanks yes this is for a local dev instance without https, i still need to access it remotely (same lan). cookies are enabled could you provide the path for the development nginx config or a file sample? i'll look into Enketo on local dev

---

<div class="post-metadata">

**Author:** ![Matthew\_White](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/matthew_white/32/1654_2.png) [@Matthew\_White](https://forum.getodk.org/u/Matthew_White)\
**Post date:** [May 4, 2023, 1:33am UTC](https://forum.getodk.org/t/session-disconnects-on-web-page-refresh-and-not-generating-form-links/41389/4 "2023-05-04T01:33:38Z")

</div>

The development nginx config is currently located at main.nginx.config in the `central-frontend` repository. The development config wasn't set up for the use case you describe, so you will likely need to modify it. Typically development is done either entirely locally or using our Docker infrastructure (available in the `central` repository). If either of those options is available to you, you may find that more convenient.

---

<div class="post-metadata">

**Author:** ![Ono-T1m](https://getodk.b-cdn.net/letter_avatar_proxy/v4/letter/o/6bbea6/32.png) [@Ono-T1m](https://forum.getodk.org/u/Ono-T1m)\
**Post date:** [May 9, 2023, 9:09am UTC](https://forum.getodk.org/t/session-disconnects-on-web-page-refresh-and-not-generating-form-links/41389/5 "2023-05-09T09:09:34Z")

</div>

![odk docker error](https://getodk.b-cdn.net/uploads/default/original/3X/b/d/bdb7fba369713160982533296e6dc84ec229e612.jpeg)  
i'm facing this error in the docker version but this is for a separate build, something is wrong with my docker-compose ?
