# Serverless v4 offline only

**URL:** <https://forum.serverless.com/t/serverless-v4-offline-only/20482>\
**Category:** Serverless Framework\
**Created:** [August 27, 2024, 4:24pm UTC](https://forum.serverless.com/t/serverless-v4-offline-only/20482 "2024-08-27T16:24:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jimmythomson](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/jimmythomson/32/8042_2.png) [@jimmythomson](https://forum.serverless.com/u/jimmythomson)\
**Post date:** [August 27, 2024, 4:24pm UTC](https://forum.serverless.com/t/serverless-v4-offline-only/20482/1 "2024-08-27T16:24:11Z")

</div>

I’ve been using serverless v3 with serverless-offline for local development for a while now. I don’t deploy to the cloud using serverless. I purely use it with serverless-offline for local dev work, and it’s fantastic for that. I deploy instead with CDK. This has been working really well, but v4 is now making that more awkward due to the login requirement.

So a couple of questions if I may:

- Is there any way to avoid needing a serverless login when only working locally?
- If not, is there any way for me to determine if I have a valid session, so that I can automate the bash command to `serverless login` if my session has expired?

Thanks very much.

---

<div class="post-metadata">

**Author:** ![garethmcc](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/garethmcc/32/2276_2.png) [@garethmcc](https://forum.serverless.com/u/garethmcc)\
**Post date:** [August 29, 2024, 1:40pm UTC](https://forum.serverless.com/t/serverless-v4-offline-only/20482/2 "2024-08-29T13:40:53Z")

</div>

Hey there. You will only need to login once. You can also set a SERVERLESS\_ACCESS\_KEY which can be created in your Serverless Dashboard account under settings to ensure you never need to run `serverless login`

---

<div class="post-metadata">

**Author:** ![jimmythomson](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/jimmythomson/32/8042_2.png) [@jimmythomson](https://forum.serverless.com/u/jimmythomson)\
**Post date:** [August 29, 2024, 8:24pm UTC](https://forum.serverless.com/t/serverless-v4-offline-only/20482/3 "2024-08-29T20:24:02Z")

</div>

Thanks - this is what I’m doing. I just wondered if there was a way to even avoid having to register/login. Since it’s only for local development it doesn’t feel like it should be necessary. I also have infosec asking questions about whether this now means data is being shared as a part of any built-in telemetry.

---

<div class="post-metadata">

**Author:** ![TomC](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/tomc/32/4002_2.png) [@TomC](https://forum.serverless.com/u/TomC)\
**Post date:** [September 2, 2024, 4:39pm UTC](https://forum.serverless.com/t/serverless-v4-offline-only/20482/4 "2024-09-02T16:39:28Z")

</div>

No way to avoid it other than sticking with v3, that’s EOL in 2 months.

You’d have to check the details with Serverless’ privacy policy, but they’ve stated they only send stack ids to record them against the correct account.
