# Prefilled URL and Port under "Server and Port"

**URL:** https://forum.duplicati.com/t/prefilled-url-and-port-under-server-and-port/15828
**Category:** Developer
**Created:** [March 7, 2023, 10:11pm UTC](https://forum.duplicati.com/t/prefilled-url-and-port-under-server-and-port/15828 "2023-03-07T22:11:00Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![pm\_s](https://forum.duplicati.com/user_avatar/forum.duplicati.com/pm_s/32/8020_2.png) [@pm\_s](https://forum.duplicati.com/u/pm_s)
#### Post date: [March 7, 2023, 10:11pm UTC](https://forum.duplicati.com/t/prefilled-url-and-port-under-server-and-port/15828/1 "2023-03-07T22:11:01Z")

</div>

Hi,

I am looking to add a prefilled URL under “Server and Port” section.

I tried digging to “\webroot\ngax\templates\backends\generic.html” file but didn’t succeed on passing the value=“URL” after \<input type=“text”

Can someone please shed some light on this?

---

<div class="post-metadata">

### Author: ![Lerrissirrel](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/l/dbc845/32.png) [@Lerrissirrel](https://forum.duplicati.com/u/Lerrissirrel)
#### Post date: [March 9, 2023, 5:26am UTC](https://forum.duplicati.com/t/prefilled-url-and-port-under-server-and-port/15828/2 "2023-03-09T05:26:21Z")

</div>

Hi pm\_s,

I’m not sure I’ll be able to help in any case, but I’d at least like to make sure I understand. Are you referring to the “Backup destination” configuration? For which backend type?

L

---

<div class="post-metadata">

### Author: ![pm\_s](https://forum.duplicati.com/user_avatar/forum.duplicati.com/pm_s/32/8020_2.png) [@pm\_s](https://forum.duplicati.com/u/pm_s)
#### Post date: [March 9, 2023, 5:07pm UTC](https://forum.duplicati.com/t/prefilled-url-and-port-under-server-and-port/15828/3 "2023-03-09T17:07:07Z")

</div>

Hi Lerrissirel,

Yes, i am looking upto “Backup destination” section. Where under the Server and Port field i want to add a prefilled server URL. [server.example.com](http://server.example.com)

Please let me know if i need to be more detailed

---

<div class="post-metadata">

### Author: ![Lerrissirrel](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/l/dbc845/32.png) [@Lerrissirrel](https://forum.duplicati.com/u/Lerrissirrel)
#### Post date: [March 10, 2023, 2:06am UTC](https://forum.duplicati.com/t/prefilled-url-and-port-under-server-and-port/15828/4 "2023-03-10T02:06:08Z")

</div>

I did a little digging but I should first warn you that this is the first time I’ve tried to delve into the web interface of Duplicati. What you tried would have been the first thing I tried, too.

However, I noticed that Angular is involved here. I have zero prior experience with Angular. From what I can tell, the ng-model=“$parent.Port” piece is the variable that can both be the default value you see, as well as holds the value that is entered. (See [Angular ng-model Directive](https://www.w3schools.com/angular/angular_model.asp)). What I couldn’t figure out is the appropriate place to set that variable. ngax/scripts/directives/backupEditUri.js seems promising (search for scope.Port) but I didn’t dig into what “parts[]” is or where it comes from.

Hopefully this gives you some ideas to pursue.

L

---

<div class="post-metadata">

### Author: ![ts678](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/t/8491ac/32.png) [@ts678](https://forum.duplicati.com/u/ts678)
#### Post date: [March 10, 2023, 2:44am UTC](https://forum.duplicati.com/t/prefilled-url-and-port-under-server-and-port/15828/5 "2023-03-10T02:44:36Z")

</div>

I have a theory, but does anyone know JavaScript and HTML well enough to chase it through code?

> <https://github.com/duplicati/duplicati/blob/666b2281032460254839fdc3b6e1055fdf7ce1db/Duplicati/Server/webroot/ngax/scripts/services/EditUriBuiltins.js#L333-L333>

This is perhaps what fills the fields on a re-edit with whatever values URI has. You can test this with:

![image](https://forum.duplicati.com/uploads/default/original/2X/9/9e5c502f4ab3c5e498ddc5b27802fba4396a1df9.png)

If [Storage Providers](https://duplicati.readthedocs.io/en/latest/05-storage-providers/) has a URI format where a partial will fill what you like, see if you can force that.  
For example, if Storage Type dropdown sets empty initial URI (maybe a scheme), can you expand?

Note that you’re kind of doing this at your own risk, so I hope there’s a good reason to be wanting it.
