# Navigating Multi-page app in deployment

**URL:** <https://discourse.holoviz.org/t/navigating-multi-page-app-in-deployment/6508>\
**Category:** Panel\
**Tags:** deployment, panel\
**Created:** [December 1, 2023, 9:04am UTC](https://discourse.holoviz.org/t/navigating-multi-page-app-in-deployment/6508 "2023-12-01T09:04:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![robml](https://discourse.holoviz.org/user_avatar/discourse.holoviz.org/robml/32/5187_2.png) [@robml](https://discourse.holoviz.org/u/robml)\
**Post date:** [December 1, 2023, 9:04am UTC](https://discourse.holoviz.org/t/navigating-multi-page-app-in-deployment/6508/1 "2023-12-01T09:04:52Z")

</div>

I am trying to get a Panel dashboard production ready, and part of that was deploying onto the server. It’s a multi-page app, however instead of navigating via the index page, there are buttons on the page itself that worked on a local server between pages.

Now, when it deploys to `IPADDRESS:5006/app` when a button is pressed to navigate to say, page 2 as `IPADDRESS:5006/page2` or even `IPADDRESS:5006/app/page2` I get a 404. Any idea why this may be happening?

---

<div class="post-metadata">

**Author:** ![Marc](https://discourse.holoviz.org/user_avatar/discourse.holoviz.org/marc/32/24_2.png) [@Marc](https://discourse.holoviz.org/u/Marc)\
**Post date:** [December 4, 2023, 7:08pm UTC](https://discourse.holoviz.org/t/navigating-multi-page-app-in-deployment/6508/2 "2023-12-04T19:08:35Z")

</div>

Hi @robml

Could you share some more information?

- What exactly does your command to start the panel application look like?
- What are the file names you are serving?

---

<div class="post-metadata">

**Author:** ![robml](https://discourse.holoviz.org/user_avatar/discourse.holoviz.org/robml/32/5187_2.png) [@robml](https://discourse.holoviz.org/u/robml)\
**Post date:** [December 5, 2023, 10:03pm UTC](https://discourse.holoviz.org/t/navigating-multi-page-app-in-deployment/6508/3 "2023-12-05T22:03:13Z")

</div>

Hi @Marc so here is what I have at the bottom of my `app.py` file that is the main application:

```auto
page1().servable()
page2().servable()
page3().servable()

pn.serve({
    "":page1,
    "last_page":page3,
    "content_page":page2,
},static_dirs={'assets': './static/assets','thumbnails':'./static/assets/thumbnails'},
websocket_origin=['*'],port=5506,allow_websocket_origin='localhost:5006')

```

where `page1`,`page2`,`page3` are all functions that return the appropriate page.

Consequently, I use the following command to run the server:

```auto
~$ panel serve app.py --address IPADDRESS --allow-websocket-origin=IPADDRESS:5006

```

where `IPADDRESS` is just a placeholder.

In this instance I am only serving the one file `app.py` but such that it has functions that each return a different page, kindly let me know if I have left something unclear.

---

<div class="post-metadata">

**Author:** ![robml](https://discourse.holoviz.org/user_avatar/discourse.holoviz.org/robml/32/5187_2.png) [@robml](https://discourse.holoviz.org/u/robml)\
**Post date:** [December 13, 2023, 1:09pm UTC](https://discourse.holoviz.org/t/navigating-multi-page-app-in-deployment/6508/4 "2023-12-13T13:09:56Z")

</div>

@Marc is this issue unsolvable at the moment? Would I need to integrate with another framework?
