In 1829 President Andrew Jackson appointed Boyd Naval Officer of the Port of Boston, replacing Thomas Melvill, and he served until his death. (At ports in the United States, it was the job of the Collector, Naval Officer and Surveyor to receive copies of manifests from newly arrived ships, provide permits and clearances for the off-loading of cargo, inspect ship contents, estimate the customs duty due, collect the duty, and send collections to the Treasury. They also fined ship and cargo owners who underestimated or attempted to avoid paying duties. The holders of these positions were paid a portion of the fees collected and fines levied, making them lucrative and sought after political appointments.)