Symbiotic bacteria from seagrass and molluscs have the potential to be a source of secondary metabolites. Compounds from these secondary metabolites, such as natural food preservatives, can be used in the bioindustry sector. This research aims to identify the potential secondary metabolites from symbiotic bacteria in molluscs and seagrass that can support the Sustainable Development Goals (SDG) public health program. The samples used in this study were symbiotic bacteria of mollusc from seagrass environments, symbiotic bacteria from seagrass, and seagrass samples. The seagrass samples were analysed phytochemically, while the symbiotic bacteria samples from molluscs and seagrass were tested for their antibacterial activity against food spoilage pathogens such as Staphylococcus aureus and Escherichia coli using the disc diffusion method. Bacteria that showed potential antibacterial activity were identified using molecular methods, and the content of active compounds was analysed using gas chromatography-mass spectrometry. The phytochemical analysis revealed that seagrass contains flavones, tannins, steroids, and compounds with potential antibacterial properties. GC-MS analysis indicated that seagrass is predominantly composed of unsaturated fatty acids, which have antimicrobial effects by damaging bacterial cell membranes and disrupting the function of enzymes essential for growth and reproduction. Ten symbiotic bacteria isolates demonstrated proteolytic, cellulolytic, and lipolytic enzyme activity, suggesting their potential as antibacterial agents due to their ability to break down cell walls. Molecular identification of selected bacteria revealed the presence of mollusc symbionts, including Vibrio owensii, Bacillus paramycoides, and Pseudoalteromonas flavipulchra. The symbiotic bacteria found in seagrass in this study included Bacillus velezensis, Bacillus paramycoides, Nocardiopsis alba, Nocardiopsis alba, Bacillus tropicus, Lysinibacillus fusiformis, and Bacillus tropicus. GC-MS analysis of selected symbiotic bacteria from seagrass showed that the dominant compound components were phthalic acid, bis(7-methyl octyl) ester (25.18, 43.84, 35.55 %), and trimethoxy-3-piperidyl-2,2'-binaphthalene-1,1',4,4'-tetrone (36.36, 47.71, 64.48 %). In conclusion, seagrass and its symbiotic bacteria, as well as symbiotic bacteria from molluscs living in seagrass, have the potential to serve as antibacterial agents and can be used as references for food preservatives. HIGHLIGHTS Seagrass and mollusc symbiotic bacteria produce secondary metabolites that have antimicrobial properties, making them suitable for food preservation The component that acts as an antibacterial agent is found in seagrass: Essential fatty acids, which can have antibacterial properties Symbiotic bacteria are microorganisms that live in mutualistic symbiosis with other organisms. The enzymatic activities of symbiotic bacteria can involve the production of enzymes that break down complex molecules into simpler molecules In food preservation, symbiotic bacteria, with their enzymatic activity, can be used as natural preservatives Using natural food preservatives derived from seagrass and mollusc symbiotic bacteria can contribute to a more sustainable and environmentally friendly approach to food preservation GRAPHICAL ABSTRACT