Instrument of Resignation, Appointment and Acceptance



 Exhibit 4.05 
 INSTRUMENT OF RESIGNATION, 
 APPOINTMENT AND ACCEPTANCE 
 INSTRUMENT OF RESIGNATION, APPOINTMENT AND ACCEPTANCE (this “Agreement”) entered into as of March 31, 2008 among NuStar Logistics,
L.P. (formerly known as Valero Logistics Operations, L.P.), a Delaware limited partnership (the “Issuer”), NuStar Energy L.P. (formerly known as Valero L.P.), a Delaware limited partnership (the “Guarantor”),
Kaneb Pipe Line Operating Partnership, L.P., a Delaware limited partnership (“Affiliate Guarantor”), The Bank of New York Trust Company, N.A., as successor trustee to The Bank of New York, a New York banking corporation (the
“Resigning Trustee”) and Wells Fargo Bank, National Association, a national banking association organized and existing under the laws of the United States of America (the “Successor Trustee”). 
 W I T N E S S E T H 
 WHEREAS, the Issuer, the Guarantor and Resigning Trustee have entered into the Indenture, dated as of July 15, 2002 (the “Base
Indenture”), as amended and supplemented by (i) the First Supplemental Indenture thereto, dated as of July 15, 2002 (the “First Supplemental Indenture”), (ii) the Second Supplemental Indenture thereto, dated
as of March 18, 2003 (the “Second Supplemental Indenture”) and (iii) the Third Supplemental Indenture thereto, dated as of July 1, 2005, among the Issuer, the Guarantor, the Affiliate Guarantor and the Resigning
Trustee (the “Third Supplemental Indenture”) (the Base Indenture, as supplemented from time to time, including without limitation pursuant to the First Supplemental Indenture, the Second Supplemental Indenture and the Third
Supplemental Indenture, the “Indenture”), which provides for the issuance of the Issuer’s Securities, the outstanding series of which are set forth on Exhibit A hereto (collectively, the “Notes”);
and 
 WHEREAS, Resigning Trustee has been acting as Trustee under the Indenture with respect to all Securities; and 
 WHEREAS, Section 610(b) of the Indenture provides that Resigning Trustee may resign at any time by giving notice thereof to the Issuer; and

 WHEREAS, Section 610(e) of the Indenture provides that the Issuer shall promptly appoint a successor Trustee to fill a vacancy in the
office of Trustee under the Indenture; and 
 WHEREAS, Section 611 of the Indenture provides that any successor Trustee appointed in
accordance with the Indenture shall execute, acknowledge and deliver to the Issuer and the retiring Trustee an instrument accepting such appointment under the Indenture, and thereupon the resignation of the retiring Trustee shall become effective
and such successor Trustee, without any further act, deed or conveyance, shall become vested with all rights, powers, trusts and duties of the retiring Trustee under the Indenture; and 
 WHEREAS, the Issuer wishes to appoint Successor Trustee as successor Trustee, Security Registrar, Paying Agent and Authenticating Agent under the
Indenture to succeed Resigning Trustee in such capacities; and 







 WHEREAS, Successor Trustee is willing to accept such appointment as successor Trustee, Security
Registrar, Paying Agent and Authenticating Agent under the Indenture on the terms and conditions set forth herein and under the Indenture; and 
 WHEREAS, Successor Trustee is eligible to act as successor Trustee under the Indenture; 
 NOW, THEREFORE, pursuant to the
provisions of the Indenture and in consideration of the covenants herein contained, it is agreed among the Issuer, the Guarantor, the Affiliate Guarantor, the Resigning Trustee and the Successor Trustee as follows: 
 1. Pursuant to Section 610 of the Indenture, Resigning Trustee hereby resigns as Trustee under the Indenture with respect to all Securities.
Resigning Trustee hereby also resigns as Security Registrar, Paying Agent and Authenticating Agent under the Indenture. 
 2. Resigning
Trustee hereby assigns, transfers, delivers and confirms to Successor Trustee all rights, powers, duties, trusts and obligations of the Trustee under the Indenture with respect to all Securities. 
 3. Resigning Trustee represents and warrants to Successor Trustee that Resigning Trustee will promptly deliver the original Notes to Successor Trustee,
and will, upon Successor Trustee’s request, use reasonable commercial efforts to make available to Successor Trustee such originals, if available, or copies of material documentation relating to the Indenture, its administration and status as
are available on Resigning Trustee’s electronic document imaging system or are in the possession of the relationship manager of the Resigning Trustee responsible for this matter, but only to the extent that such documentation is not otherwise
available to Successor Trustee from the Issuer, Depositary Trust Corporation or from public sources. 
 4. The Issuer hereby accepts the
resignation of Resigning Trustee as Trustee with respect to all Securities, Security Registrar, Paying Agent and Authenticating Agent under the Indenture. Pursuant to the authority vested in it by Section 610(e) of the Indenture, the Issuer
hereby appoints Successor Trustee as successor Trustee under the Indenture with respect to all Securities, with all the rights, powers, trusts and duties heretofore vested in Resigning Trustee under the Indenture. The Issuer also hereby appoints
Successor Trustee as successor Security Registrar, Paying Agent and Authenticating Agent under the Indenture. 
 5. The Issuer represents and
warrants to Resigning Trustee and Successor Trustee that: 
 (a) it is validly organized and existing under the laws of the state of its
formation; 
 (b) the Notes were validly and lawfully issued; 
 (c) it has performed or fulfilled each covenant, agreement and condition on its part to be performed or fulfilled under the Indenture; 







 (d) no default or Event of Default or any event which upon notice or lapse of time or both would become
and Event of Default under the Indenture has occurred and is continuing; 
 (e) it has not appointed any Security Registrar, Paying Agent and
Authenticating Agent under the Indenture other than Resigning Trustee; and 
 (f) it will continue to perform the obligations undertaken by
it under the Indenture. 
 6. Successor Trustee represents and warrants to Resigning Trustee and the Issuer that it is qualified and eligible
to act as Trustee under Section 611 of the Indenture. 
 7. Successor Trustee hereby accepts its appointment as successor Trustee with
respect to all Securities, Security Registrar, Paying Agent and Authenticating Agent under the Indenture, and accepts the obligations created thereby, and assumes all rights, powers, duties and obligations of the Trustee, Security Registrar, Paying
Agent and Authenticating Agent under the Indenture. Successor Trustee will perform said obligations and will exercise said rights, powers, duties and obligations upon the terms and conditions set forth in the Indenture. 
 8. Successor Trustee hereby accepts the designation of its Corporate Trust Office as the office or agency of the Issuer in Dallas, Texas where the Notes
may be presented for payment or registration of transfer. 
 9. Promptly after the execution and delivery of this Agreement, the Successor
Trustee will mail or cause to be mailed to each holder of the Notes a Notice of Succession of Trustee, a form of which is attached hereto as Exhibit B in accordance with Section 610(f) of the Indenture. 
 10. Pursuant to the written request of Successor Trustee and the Issuer hereby made, Resigning Trustee, upon payment of its outstanding charges,
confirms, assigns, transfers and sets over to Successor Trustee, as successor Trustee under the Indenture, upon the obligations expressed in the Indenture, any and all property and money and all the rights, powers, trusts, duties and obligations
which Resigning Trustee now holds under and by virtue of the Indenture. 
 11. The Issuer and Resigning Trustee hereby agree, upon the
request of Successor Trustee, to execute, acknowledge and deliver such further instruments of conveyance and assurance and to do such other things as may be reasonably required for more fully and certainly vesting and confirming in Successor Trustee
all of the applicable rights, powers and trusts of Resigning Trustee as Trustee, Security Registrar, Paying Agent and Authenticating Agent under the Indenture. 
 12. Capitalized terms not otherwise defined in this Agreement shall have the definitions given thereto in the Indenture. 
 13. This Agreement shall be governed by and construed in accordance with the laws of the State of New York. 







 14. In case any provision in this Agreement shall be invalid, illegal or unenforceable, the validity,
legality and enforceability of the remaining provisions shall not in any way be affected or impaired thereby. 
 15. This Agreement may be
simultaneously executed in any number of counterparts. Each such counterpart so executed shall be deemed to be an original, but all together shall constitute but one and the same instrument. 
 16. This Agreement and the resignation, appointment and acceptance effected hereby shall be effective as of the close of business on the date first above
written, upon the execution and delivery hereof by each of the parties hereto, and any and all payments required to be made by the Trustee under the Indenture shall be made by Successor Trustee following such effectiveness. 
 17. Notwithstanding the resignation of Resigning Trustee effected hereby, the Issuer shall remain obligated under Section 607 of the Indenture to
compensate, reimburse and indemnify Resigning Trustee in connection with its prior trusteeship under the Indenture. The Issuer also acknowledges and reaffirms its obligations to Successor Trustee as set forth in Section 610 of the Indenture,
which obligations shall survive the execution hereof. 
 18. All notices, whether faxed or mailed, will be deemed received when sent pursuant
to the following instructions: 
 TO RESIGNING TRUSTEE: 
 The Bank of New York Trust Company, N.A. 
 601 Travis
Street, 18th Floor 
 Houston, TX 77002

 Tel: 713-483-6563 
 Fax:
713-483-7083 
 Attn: Julie Hoffman-Ramos 
 TO SUCCESSOR TRUSTEE: 
 Wells Fargo Bank, National Association 
 1445 Ross Avenue – 2nd Floor 
 Corporate Trust Services 
 Dallas, Texas 75202-2812 
 Fax: 214-777-4086

 Tel: 214-740-1573 
 Attn:
Patrick Giordano- Vice President 
 with a copy to:  
 [                    ] 







 TO THE ISSUER: 
 Amy L. Perry 
 Assistant General Counsel 
 NuStar Energy L.P. 
 2330 North Loop 1604
West 
 San Antonio, Texas 78248 
 Fax: (210) 918-5469 
 Tel: (210) 918-2512 
 [remainder of page intentionally blank] 







 IN WITNESS WHEREOF, the parties hereto have caused this Instrument of Resignation, Appointment and
Acceptance to be duly executed as of the day and year first above written. 
  

			
	NUSTAR LOGISTICS, L.P.
	By:	 	NuStar GP, Inc., its general partner
		
	By:	 	 /s/ Steven A. Blank

	Name:	 	Steven A. Blank
	Title:	 	Senior Vice President, Chief Financial Officer and Treasurer
	
	NUSTAR ENERGY L.P.
	By:	 	Riverwalk Logistics, L.P., its general partner
		 	By:  NuStar GP, LLC, its general partner
		
	By:	 	 /s/ Steven A. Blank

	Name:	 	Steven A. Blank
	Title:	 	Senior Vice President, Chief Financial Officer and Treasurer
	
	KANEB PIPE LINE OPERATING PARTNERSHIP, L.P.
	 By: Kaneb Pipe Line Company LLC, its general
 partner

		
	By:	 	 /s/ Steven A. Blank

	Name:	 	Steven A. Blank
	Title:	 	Senior Vice President, Chief Financial Officer and Treasurer
	
	 The BANK OF NEW YORK TRUST COMPANY,
 N.A., as
Resigning Trustee

		
	By:	 	 /s/ Julie Hoffman-Ramos

	Name:	 	Julie Hoffman-Ramos
	Title:	 	Assistant Treasurer
	
	WELLS FARGO BANK, NATIONAL ASSOCIATION, as Successor Trustee
		
	By:	 	 /s/ Patrick Giordano

	Name:	 	Patrick Giordano
	Title:	 	Vice President









 EXHIBIT A 
 CHART OF OUTSTANDING SECURITIES 
  

						
	 ISSUE
	  	OUTSTANDING
PRINCIPAL
AMOUNT	  	CUSIP #
	 6.05% Senior Notes due 2013
	  	$	250,000,000	  	91914CAC1
	 6.875% Senior Notes due 2012
	  	$	100,000,000	  	91914CAA5








 EXHIBIT B 
 NOTICE OF SUCCESSION OF TRUSTEE 
 To the Holders of NuStar Logistics, L.P.’s (the
“Issuer”) 
  

			
	 ISSUE
	  	CUSIP #
	 6.05% Senior Notes due 2013
	  	91914CAC1
	 6.875% Senior Notes due 2012
	  	91914CAA5

 (collectively, the “Notes”) 
 NOTICE IS HEREBY GIVEN that, pursuant to Section 610(f) of the Indenture, dated as of July 15, 2002, as supplemented by (i) the First
Supplemental Indenture thereto, dated as of July 15, 2002 (the “First Supplemental Indenture”), (ii) the Second Supplemental Indenture thereto, dated as of March 18, 2003 (the “Second Supplemental
Indenture”) and (iii) the Third Supplemental Indenture thereto, dated as of July 1, 2005 (the “Third Supplemental Indenture”) (the Base Indenture, as supplemented from time to time, including without limitation
pursuant to the First Supplemental Indenture, the Second Supplemental Indenture and the Third Supplemental Indenture, the “Indenture”), under which the above mentioned Notes were issued, The Bank of New York Trust Company, N.A., as
successor-in-interest to The Bank of New York, has resigned as Trustee, Security Registrar, Paying Agent and Authenticating Agent. 
 NOTICE
IS HEREBY FURTHER GIVEN that pursuant to Section 610(f) of the Indenture, the Issuer has appointed Wells Fargo Bank, National Association, a national banking association organized and existing under the laws of the United States of America, as
successor Trustee, Security Registrar, Paying Agent and Authenticating Agent under the Indenture. Wells Fargo Bank, National Association has, pursuant to Section 611(a) of the Indenture, accepted such appointment, effective as of March 31,
2008. The address of the Corporate Trust Office of Wells Fargo Bank, National Association is 1445 Ross Avenue-2nd Floor Dallas, Texas 75202-2812, Attn: Corporate Trust Services. 
  

			
	WELLS FARGO BANK, NATIONAL ASSOCIATION
		
	By:	 	  

	Name:	 	  

	Title:	 	  



 Dated: March 31, 2008